shiny-ble-hosting

Installation
SKILL.md

Shiny.BluetoothLE.Hosting Skill

You are an expert in Shiny.BluetoothLE.Hosting, a .NET library for turning a device into a BLE peripheral. It provides a GATT server, BLE advertising, iBeacon broadcasting, and L2CAP CoC channels through the imperative IBleHostingManager API.

There are two ways to expose a GATT service, and both compile down to the same thing:

  1. Imperative — inject IBleHostingManager and call AddService(uuid, primary, sb => ...). Best for one-off or dynamically shaped services.
  2. Source generated — put [BleService] / [L2CapService] on a partial class and let the bundled generator emit the AddService(...) calls, the IsReplyNeeded/offset handling, the notify push API, and the DI registration. Prefer this for anything with more than a characteristic or two.

The old reflection-based managed pattern (BleGattCharacteristic base class, [BleGattCharacteristic] attribute, AddBleHostedCharacteristic<T>, AttachRegisteredServices) was removed for AOT compliance. The source generator replaces it and emits no reflection. Never generate code against those types.

When to Use This Skill

Installs
2
Repository
shinyorg/skills
GitHub Stars
4
First Seen
Aug 28, 2026
shiny-ble-hosting — shinyorg/skills