agentsclimarketplace

Connectivity ble

Skill beriberikix/zephyr-agent-skills/skills/connectivity-ble

A complete catalog of Agent Skills (agentskills.io) for Zephyr RTOS development.

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

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

2.9 KB, as published. Nobody here has run it

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
  • 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
  • Key Tools: k_work_delayable, Workqueues, SMF integration.

3. Power Optimization

Fine-tune intervals and connection parameters for maximum battery life.

Quick Start (Advertising)

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
#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

Examples & Templates

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:
    • 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:
    • ble_timing_helper.py: BLE interval conversion helper.
  • Assets:
    • gatt_service_template.c: Custom service template for GATT.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.