{"id":"1001196f-9131-4ece-89e9-067ba557d4e3","shortId":"tCwaM5","kind":"skill","title":"connectivity-ble","tagline":"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 f","description":"# Zephyr Connectivity: BLE\n\nImplement robust, low-power Bluetooth Low Energy applications using Zephyr's industry-standard BLE stack.\n\n## Core Workflows\n\n### 1. BLE Fundamentals\nSet up advertising, define GATT services, and manage connections.\n- **Reference**: **[ble_fundamentals.md](references/ble_fundamentals.md)**\n- **Key Tools**: `BT_GATT_SERVICE_DEFINE`, `bt_le_adv_start`, `BT_CONN_CB_DEFINE`.\n\n### 2. Send-When-Idle Pattern\nOptimize radio usage by bundling data and transmitting only during idle periods.\n- **Reference**: **[send_when_idle.md](references/send_when_idle.md)**\n- **Key Tools**: `k_work_delayable`, Workqueues, SMF integration.\n\n### 3. Power Optimization\nFine-tune intervals and connection parameters for maximum battery life.\n- **Reference**: **[power_optimization.md](references/power_optimization.md)**\n- **Key Tools**: `bt_le_conn_param`, Advertising intervals, PHY selection.\n\n## Quick Start (Advertising)\n```kconfig\nCONFIG_BT=y\nCONFIG_BT_PERIPHERAL=y\n```\n```c\n#include <zephyr/bluetooth/bluetooth.h>\n\nvoid start_simple_adv(void) {\n    bt_enable(NULL);\n    bt_le_adv_start(BT_LE_ADV_CONN_NAME, NULL, 0, NULL, 0);\n}\n```\n\n## Professional Patterns (Wireless Design)\n- **Aggressive Latency**: Increase peripheral latency to allow the radio to stay off longer during quiet periods.\n- **Decoupled Messaging**: Use Zbus to feed data into the BLE module, keeping the radio logic separate from the application logic.\n- **Idle Bundling**: Use the \"Send-When-Idle\" pattern specifically to reduce the number of wake-ups for the radio controller.\n\n## Automation Tools\n- **[ble_timing_helper.py](scripts/ble_timing_helper.py)**: Convert advertising/connection intervals from ms to BLE timing units.\n\n## Examples & Templates\n- **[gatt_service_template.c](assets/gatt_service_template.c)**: Starter custom GATT service definition.\n\n## Validation Checklist\n- [ ] Device advertises with expected name/flags and is discoverable by a BLE scanner.\n- [ ] Central can connect, exchange GATT data, and disconnect without stack errors.\n- [ ] Configured connection parameters are reflected after negotiation.\n- [ ] Send-When-Idle flow batches traffic instead of transmitting every sample immediately.\n\n## Resources\n\n- **[References](references/)**:\n  - `ble_fundamentals.md`: GATT, GAP, and connection basics.\n  - `send_when_idle.md`: Implementing the idle-bundle pattern.\n  - `power_optimization.md`: Parameter tuning and power-saving Kconfigs.\n- **[Scripts](scripts/)**:\n  - `ble_timing_helper.py`: BLE interval conversion helper.\n- **[Assets](assets/)**:\n  - `gatt_service_template.c`: Custom service template for GATT.","tags":["connectivity","ble","zephyr","agent","skills","beriberikix","agent-skills","agentic-coding","zephyr-rtos"],"capabilities":["skill","source-beriberikix","skill-connectivity-ble","topic-agent-skills","topic-agentic-coding","topic-zephyr-rtos"],"categories":["zephyr-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/beriberikix/zephyr-agent-skills/connectivity-ble","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add beriberikix/zephyr-agent-skills","source_repo":"https://github.com/beriberikix/zephyr-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.462","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 25 github stars · SKILL.md body (2,624 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T07:01:41.561Z","embedding":null,"createdAt":"2026-04-18T23:04:52.280Z","updatedAt":"2026-04-24T07:01:41.561Z","lastSeenAt":"2026-04-24T07:01:41.561Z","tsv":"'0':179,181 '1':62 '2':91 '3':120 'ad':33 'adv':85,164,171,175 'advertis':16,67,143,149,271 'advertising/connection':249 'aggress':186 'allow':192 'applic':51,220 'asset':344,345 'assets/gatt_service_template.c':262 'autom':244 'basic':321 'batch':305 'batteri':37,132 'ble':3,7,34,42,58,63,211,254,280,340 'ble_fundamentals.md':75,316 'ble_timing_helper.py':246,339 'bluetooth':4,48 'bt':79,83,87,139,152,155,166,169,173 'bundl':101,223,327 'c':158 'cb':89 'central':282 'checklist':269 'config':151,154 'configur':293 'conn':88,141,176 'connect':2,17,35,41,73,128,284,294,320 'connectivity-bl':1 'control':243 'convers':342 'convert':248 'core':60 'cover':12 'custom':264,349 'data':102,208,287 'decoupl':202 'defin':68,82,90 'definit':267 'delay':116 'design':29,185 'devic':270 'disconnect':289 'discover':277 'enabl':167 'energi':6,50 'error':292 'everi':310 'exampl':257 'exchang':285 'expect':273 'f':39 'feed':207 'fine':124 'fine-tun':123 'flow':304 'fundament':64 'gap':15,318 'gatt':13,69,80,259,265,286,317,346,353 'helper':343 'idl':28,95,107,222,229,303,326 'idle-bundl':325 'immedi':312 'implement':43,323 'includ':159 'increas':188 'industri':56 'industry-standard':55 'instead':307 'integr':8,119 'interv':126,144,250,341 'k':114 'kconfig':150,336 'keep':213 'key':77,112,137 'latenc':187,190 'le':84,140,170,174 'life':38,133 'logic':216,221 'longer':198 'low':5,46,49 'low-pow':45 'manag':72 'maximum':131 'messag':203 'modul':212 'ms':252 'name':177 'name/flags':274 'negoti':299 'null':168,178,180 'number':235 'optim':20,36,97,122 'param':142 'paramet':18,129,295,330 'pattern':30,96,183,230,328 'period':108,201 'peripher':156,189 'phi':145 'power':19,47,121,334 'power-sav':333 'power_optimization.md':135,329 'profession':24,182 'quick':147 'quiet':200 'radio':98,194,215,242 'reduc':233 'refer':74,109,134,314,315 'references/ble_fundamentals.md':76 'references/power_optimization.md':136 'references/send_when_idle.md':111 'reflect':297 'resourc':313 'robust':44 'rtos':11 'sampl':311 'save':335 'scanner':281 'script':337,338 'scripts/ble_timing_helper.py':247 'select':146 'send':26,93,227,301 'send-when-idl':25,92,226,300 'send_when_idle.md':110,322 'separ':217 'servic':70,81,260,266,347,350 'services/characteristics':14 'set':65 'simpl':163 'skill' 'skill-connectivity-ble' 'smf':118 'source-beriberikix' 'specif':231 'stack':59,291 'standard':57 'start':86,148,162,172 'starter':263 'stay':196 'strategi':21 'templat':258,351 'template.c':261,348 'time':255 'tool':78,113,138,245 'topic-agent-skills' 'topic-agentic-coding' 'topic-zephyr-rtos' 'traffic':306 'transmit':104,309 'trigger':31 'tune':125,331 'unit':256 'up':239 'usag':99 'use':52,204,224 'valid':268 'void':161,165 'wake':238 'wake-up':237 'wireless':184 'without':290 'work':115 'workflow':61 'workqueu':117 'y':153,157 'zbus':205 'zephyr':10,40,53 'zephyr/bluetooth/bluetooth.h':160","prices":[{"id":"784f5cbb-7e50-4957-906b-5a535e068e04","listingId":"1001196f-9131-4ece-89e9-067ba557d4e3","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"beriberikix","category":"zephyr-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T23:04:52.280Z"}],"sources":[{"listingId":"1001196f-9131-4ece-89e9-067ba557d4e3","source":"github","sourceId":"beriberikix/zephyr-agent-skills/connectivity-ble","sourceUrl":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/connectivity-ble","isPrimary":false,"firstSeenAt":"2026-04-18T23:04:52.280Z","lastSeenAt":"2026-04-24T07:01:41.561Z"}],"details":{"listingId":"1001196f-9131-4ece-89e9-067ba557d4e3","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"beriberikix","slug":"connectivity-ble","github":{"repo":"beriberikix/zephyr-agent-skills","stars":25,"topics":["agent-skills","agentic-coding","zephyr-rtos"],"license":"apache-2.0","html_url":"https://github.com/beriberikix/zephyr-agent-skills","pushed_at":"2026-04-20T21:40:18Z","description":"A complete catalog of Agent Skills (agentskills.io) for Zephyr RTOS development.","skill_md_sha":"33c5bb493e9c8bdbacd79509b97add251bdc8d00","skill_md_path":"skills/connectivity-ble/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/connectivity-ble"},"layout":"multi","source":"github","category":"zephyr-agent-skills","frontmatter":{"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."},"skills_sh_url":"https://skills.sh/beriberikix/zephyr-agent-skills/connectivity-ble"},"updatedAt":"2026-04-24T07:01:41.561Z"}}