Client v5: BLE, BLE Hosting, HTTP, Jobs - Linux, MacOS, & Blazor Support! Full AOT, RX on BLE only & MANY other features! Power up!
BluetoothLE Hosting
Getting Started
Section titled “Getting Started”| GitHub | |
| Downloads | |
| Linux |
Frameworks
.NET
.NET MAUI
Operating Systems
Android
iOS
macOS
Windows
Linux
BluetoothLE Hosting allows your device to act as a BLE peripheral (server). You can advertise services, create GATT services with characteristics, and communicate with central devices that connect to you.
Features
Section titled “Features”- Advertise as a BLE peripheral
- Create GATT services with read/write/notify characteristics via the imperative
AddServicebuilder - iBeacon broadcasting
- L2CAP CoC channel listeners for high-throughput streaming
- Cross-platform: iOS, macOS, Android, Linux (Windows hosting is currently stubbed)
Platform Notes
Section titled “Platform Notes”| Feature | iOS | macOS | Android | Windows | Linux |
|---|---|---|---|---|---|
| Advertising | Foreground + limited background | Full | Full | — | WIP |
| GATT Server | Full | Full | Full | — | WIP |
| L2CAP CoC | Full | Full | API 29+ | — | Full (BlueZ socket) |
Changed files
- MyApp/
Delegates/MyBleGattCharacteristic.cs
MyBleGattCharacteristic.cs
1using Shiny.BluetoothLE.Hosting.Managed;23namespace MyApp.Delegates;45[BleGattCharacteristic("SERVICE UUID", "CHARCATERISTIC UUID")]6public class MyBleGattCharacteristic : BleGattCharacteristic7{8 public MyBleGattCharacteristic()9 {10 }1112 // public override Task OnStart() => base.OnStart();13 // public override void OnStop() => base.OnStop();1415 // public override Task<GattResult> OnRead(ReadRequest request) => base.OnRead(request);16 // public override Task OnWrite(WriteRequest request) => base.OnWrite(request);17 // public override Task OnSubscriptionChanged(IPeripheral peripheral, bool subscribed) => base.OnSubscriptionChanged(peripheral, subscribed);18}Requesting Access
Section titled “Requesting Access”IBleHostingManager hostingManager; // injected
var access = await hostingManager.RequestAccess(advertise: true, connect: true);Advertising
Section titled “Advertising”// Start advertising with a local name and service UUIDsawait hostingManager.StartAdvertising(new AdvertisementOptions( LocalName: "MyDevice", ServiceUuids: new[] { "Your-Service-UUID" }));
// Check advertising statevar isAdvertising = hostingManager.IsAdvertising;
// Stop advertisinghostingManager.StopAdvertising();AI Coding Assistant
Section titled “AI Coding Assistant”Step 1 — Add the marketplace:
claude plugin marketplace add shinyorg/skills Step 2 — Install the plugin:
claude plugin install shiny-client@shiny Step 1 — Add the marketplace:
copilot plugin marketplace add https://github.com/shinyorg/skills Step 2 — Install the plugin:
copilot plugin install shiny-client@shiny