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, including a directory-backed file server centrals can upload to and download from
- 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 | — | Full (BlueZ) |
| GATT Server | Full | Full | Full | — | Full (BlueZ) - see notification limits |
| L2CAP CoC | Full | Full | API 29+ | — | Full (BlueZ socket) |
Changed files
- MyApp/
Delegates/MyGattHostingService.cs
MyGattHostingService.cs
1using Shiny.BluetoothLE.Hosting;23namespace MyApp.Delegates;45public class MyGattHostingService(IBleHostingManager manager, ILogger<MyGattHostingService> logger) : IShinyStartupTask6{7 // TODO: replace with your own 128-bit UUIDs8 const string ServiceUuid = "SERVICE-UUID";9 const string CharacteristicUuid = "CHARACTERISTIC-UUID";1011 public async void Start()12 {13 var access = await manager.RequestAccess(advertise: true, connect: true);14 if (access != AccessState.Available)15 return;1617 await manager.AddService(ServiceUuid, primary: true, sb =>18 {19 sb.AddCharacteristic(CharacteristicUuid, cb =>20 {21 cb.SetRead(req => Task.FromResult(GattResult.Success(System.Text.Encoding.UTF8.GetBytes("Hello"))));2223 cb.SetWrite(req =>24 {25 logger.LogInformation("Received {Bytes} bytes", req.Data.Length);26 if (req.IsReplyNeeded)27 req.Respond(GattState.Success);28 return Task.CompletedTask;29 }, WriteOptions.Write);3031 cb.SetNotification(sub =>32 {33 logger.LogInformation("Subscription change: {Sub}", sub.IsSubscribing);34 return Task.CompletedTask;35 }, NotificationOptions.Notify);36 });37 });3839 await manager.StartAdvertising(new AdvertisementOptions("MyApp", ServiceUuid));40 }41}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/skillsStep 2 — Install the plugin:
claude plugin install shiny@shinyOne plugin installs all 48 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.
Step 1 — Add the marketplace:
copilot plugin marketplace add https://github.com/shinyorg/skillsStep 2 — Install the plugin:
copilot plugin install shiny@shinyOne plugin installs all 48 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.


