Skip to content
Back to skills

Connectivity Ble

ASecurity

Bluetooth Low Energy (BLE) integration for Zephyr RTOS. Covers GATT Services/Characteristics, GAP advertising, connection parameters, power optimization strategies, and the professional Send-When-Idle design pattern. Trigger when adding BLE connectivity, optimizing battery life for wireless devices, or implementing custom GATT profiles.

  • 63 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 1, 2026
ai-agentsgo

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 1, 2026

npx -y skills add beriberikix/zephyr-agent-skills --skill connectivity-ble --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Connectivity Ble?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Connectivity Ble
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/beriberikix-connectivity-ble/badge)](https://www.skillsdirectory.com/skills/beriberikix-connectivity-ble)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: connectivity-ble
description: Bluetooth Low Energy (BLE) integration for Zephyr RTOS. Covers GATT Services/Characteristics, GAP advertising, connection parameters, power optimization strategies, and the professional Send-When-Idle design pattern. Trigger when adding BLE connectivity, optimizing battery life for wireless devices, or implementing custom GATT profiles.
---

# Zephyr Connectivity: BLE

Implement robust, low-power Bluetooth Low Energy applications using Zephyr's industry-standard BLE stack.

## Core Workflows

### 1. BLE Fundamentals
Set up advertising, define GATT services, and manage connections.
- **Reference**: **[ble_fundamentals.md](references/ble_fundamentals.md)**
- **Key Tools**: `BT_GATT_SERVICE_DEFINE`, `bt_le_adv_start`, `BT_CONN_CB_DEFINE`.

### 2. Send-When-Idle Pattern
Optimize radio usage by bundling data and transmitting only during idle periods.
- **Reference**: **[send_when_idle.md](references/send_when_idle.md)**
- **Key Tools**: `k_work_delayable`, Workqueues, SMF integration.

### 3. Power Optimization
Fine-tune intervals and connection parameters for maximum battery life.
- **Reference**: **[power_optimization.md](references/power_optimization.md)**
- **Key Tools**: `bt_le_conn_param`, Advertising intervals, PHY selection.

## Quick Start (Advertising)
```kconfig
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
```
```c
#include <zephyr/bluetooth/bluetooth.h>

void start_simple_adv(void) {
    bt_enable(NULL);
    bt_le_adv_start(BT_LE_ADV_CONN_NAME, NULL, 0, NULL, 0);
}
```

## Professional Patterns (Wireless Design)
- **Aggressive Latency**: Increase peripheral latency to allow the radio to stay off longer during quiet periods.
- **Decoupled Messaging**: Use Zbus to feed data into the BLE module, keeping the radio logic separate from the application logic.
- **Idle Bundling**: Use the "Send-When-Idle" pattern specifically to reduce the number of wake-ups for the radio controller.

## Automation Tools
- **[ble_timing_helper.py](scripts/ble_timing_helper.py)**: Convert advertising/connection intervals from ms to BLE timing units.

## Examples & Templates
- **[gatt_service_template.c](assets/gatt_service_template.c)**: Starter custom GATT service definition.

## Validation Checklist
- [ ] Device advertises with expected name/flags and is discoverable by a BLE scanner.
- [ ] Central can connect, exchange GATT data, and disconnect without stack errors.
- [ ] Configured connection parameters are reflected after negotiation.
- [ ] Send-When-Idle flow batches traffic instead of transmitting every sample immediately.

## Resources

- **[References](references/)**:
  - `ble_fundamentals.md`: GATT, GAP, and connection basics.
  - `send_when_idle.md`: Implementing the idle-bundle pattern.
  - `power_optimization.md`: Parameter tuning and power-saving Kconfigs.
- **[Scripts](scripts/)**:
  - `ble_timing_helper.py`: BLE interval conversion helper.
- **[Assets](assets/)**:
  - `gatt_service_template.c`: Custom service template for GATT.

Files in this skill

  • SKILL.md2.9 KB
  • assets/gatt_service_template.c1.1 KB
  • references/ble_fundamentals.md2.6 KB
  • references/power_optimization.md1.7 KB
  • references/send_when_idle.md2.1 KB
  • scripts/ble_timing_helper.py1.7 KB
  • skill-meta.yaml545 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.