‹ 首页

connectivity-ble

@beriberikix · 收录于 昨天 · 上游提交 2 个月前

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 开发需要 BLE 的嵌入式设备

/ 通过 npx 安装 校验哈希
npx oh-my-skill add beriberikix/zephyr-agent-skills/connectivity-ble
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- beriberikix/zephyr-agent-skills/connectivity-ble
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify beriberikix/zephyr-agent-skills/connectivity-ble
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
58GitHub stars
~552最小装载
~2.1K含声明引用
~2.2K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 ed63cdf · 表述以原文为准
它做什么

帮助开发者配置 Zephyr RTOS 的蓝牙低功耗功能,包括广播、GATT 服务、连接管理和功耗优化,并实现空闲时发送模式来减少无线电唤醒。

什么时候触发

当需要为 Zephyr 设备添加 BLE 连接、优化电池寿命或实现自定义 GATT 配置文件时触发。

装好后可以这样说
Claude 会生成广播启动代码和 GATT 服务模板。
Claude 会提供连接参数调整和电源优化策略。
Claude 会给出使用延迟工作队列和空闲打包的示例。
技能原文 SKILL.md作者撰写 · Apache-2.0 · ed63cdf

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)
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
  • [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.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。