Ahsoka.Extensions.Bluetooth 5.17.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ahsoka.Extensions.Bluetooth --version 5.17.0
                    
NuGet\Install-Package Ahsoka.Extensions.Bluetooth -Version 5.17.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ahsoka.Extensions.Bluetooth" Version="5.17.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ahsoka.Extensions.Bluetooth" Version="5.17.0" />
                    
Directory.Packages.props
<PackageReference Include="Ahsoka.Extensions.Bluetooth" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ahsoka.Extensions.Bluetooth --version 5.17.0
                    
#r "nuget: Ahsoka.Extensions.Bluetooth, 5.17.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ahsoka.Extensions.Bluetooth@5.17.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ahsoka.Extensions.Bluetooth&version=5.17.0
                    
Install as a Cake Addin
#tool nuget:?package=Ahsoka.Extensions.Bluetooth&version=5.17.0
                    
Install as a Cake Tool

Ahsoka.Extensions.Bluetooth

An OpenPV Bluetooth Extension that provides Bluetooth Classic (BR/EDR) and Bluetooth Low Energy (BLE) support through two Ahsoka services.

Services

Service Port Description
BluetoothService 5104 Bluetooth Classic adapter management, discovery, pairing, and profile services
BLEService 6108 Bluetooth Low Energy peripheral mode, GATT services, and advertisements

Both services auto-start and are configured via the extension info bundled with this package.

Bluetooth Classic

Manages Bluetooth Classic adapter operations and profile-based connections over BR/EDR.

Capabilities

  • Adapter power, discoverable, and pairable mode control (with configurable timeouts)
  • Device discovery with configurable timeout
  • Pairing, unpairing, and paired device management
  • Multi-adapter support
  • Profile service plugin architecture

Built-in Profile Services

Profile Description Status
A2DP Audio Sink + AVRCP Controller Receive audio from a phone and control its playback — transport commands, track metadata, album art, absolute volume Hardware-validated
A2DP Audio Source + AVRCP Target Stream audio out to a headset, publish "now playing" metadata, and receive headset button presses Hardware-validated
MAP (Message Access) SMS/MMS message access and composition Hardware-validated
PBAP (Phonebook Access) Contact synchronization with vCard and SQLite storage API present, not hardware-validated
HFP (Hands-Free) Voice call management via oFono telephony integration API present, not hardware-validated
SPP (Serial Port) Serial data communication over RFCOMM API present, not hardware-validated

The last three ship and compile, but have not been validated against real hardware — treat them as a starting point reserved for future development rather than as supported features. Apple iAP is not supported; BluetoothProfilesFlags.Iap detects that a remote device advertises it, nothing more.

PBAP and MAP are OBEX-based profiles, and album art is retrieved over an OBEX/BIP session. OBEX itself is shared transport infrastructure managed by Ahsoka.Obex.service, not a profile you connect to directly.

Client Usage

var client = new BluetoothServiceClient();

// Listen for notifications, then start the client. Order matters: results arrive
// as notifications, so register before issuing any request.
client.NotificationReceived += OnBluetoothNotification;
client.Start();

// Control adapter
client.EnableAdapter(adapterIndex, pairingAgentTimeout);
client.StartDiscovery(new BluetoothDiscoveryRequest { AdapterIndex = adapterIndex, DiscoveryTimeout = timeoutSeconds });
client.RequestToPair(new BluetoothPairRequest { DeviceInfo = deviceInfo });

Bluetooth Low Energy (BLE)

Provides BLE peripheral mode functionality including GATT server and advertisement management.

BLE Capabilities

  • BLE stack lifecycle management
  • Advertisement creation and management (including manufacturer data)
  • GATT service, characteristic, and descriptor management
  • Characteristic read, write, and notify operations
  • Pairing confirmation flow

Attribute-Based Service Definition

Define BLE services declaratively using attributes and a ViewModel base class:

[BLEService("Battery Service", "180F")]
public class BatteryService : BLEServiceViewModelBase
{
    byte batteryLevel;

    [BLECharacteristic("Battery Level", "2A19",
        BLECharacteristicFlag.Read, BLECharacteristicFlag.Notify)]
    public byte BatteryLevel
    {
        get => batteryLevel;
        set => OnSetValue(ref batteryLevel, value);
    }
}

Available attributes:

  • BLEServiceAttribute — (name, uUID, isPrimary = true, advertise = true)
  • BLECharacteristicAttribute — (name, uUID, params flags) where flags are BLECharacteristicFlag values (Read, Write, Notify, Indicate, and encrypted variants)
  • BLEManufactureDataAttribute — (key, params data) for manufacturer-specific advertisement data

Arguments are positional. Use OnSetValue for value-typed properties and OnSetObject for reference types such as string and byte[] — the setter helper is what pushes the value into the GATT database and notifies subscribers.

BLE Client Usage

var client = new BLEServiceClient();
client.Start();

// Start BLE stack; wait for StackStarted / ClientReady before registering services
client.StartStack("My Device");

// Register attribute-defined services and begin advertising
var batteryService = new BatteryService();
client.StartServiceModels(batteryService);

Platform Support

The production platform is Linux using the BlueZ Bluetooth stack over D-Bus. A desktop stub stack lets demos and applications run on Windows with no Bluetooth hardware attached.

Radio OpenView Pro OpenView Select
Bluetooth Classic (BR/EDR) Supported Not supported
Bluetooth Low Energy Supported Supported

Bluetooth Classic is OpenView Pro only — multi-adapter support, device discovery, the Classic pairing flow, and all profile services. BLE peripheral mode works on both platforms and has its own single adapter and its own pairing flow. Both platforms run BlueZ 5.84, so BLE feature availability does not vary between them.

This extension manages Bluetooth transports, gives you control and metadata, and carries a connected phone's audio to its routed headset or the cabin. Everything else about audio on the platform — mixing, output selection, platform volume — is owned by the companion Audio extension. The Audio extension also starts the platform's audio server, which the A2DP profiles depend on, so an application using AudioSink or AudioSource needs Ahsoka.Extensions.AudioManager alongside this package.

Documentation

Full documentation ships with this package. In the OpenPV Developer Toolkit, select the Bluetooth extension on the Extensions tab and choose Docs & Help.

Companion Package

Ahsoka.Extensions.Bluetooth.UX — An OpenPV Developer Toolkit plugin providing an Avalonia-based UI for configuring Bluetooth Classic adapters, profiles, and Class of Device settings.

Requirements

  • .NET 10.0
  • Ahsoka.Core 5.x
  • Ahsoka.Extensions.AudioManager — for the audio profiles (AudioSink, AudioSource)
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Ahsoka.Extensions.Bluetooth:

Package Downloads
Ahsoka.Extensions.Bluetooth.UX

Package Description

Ahsoka.Extensions.CygnusReach

Reach Service Extension for OpenPV 5.0 // 60f365e6af3b712659435adb8e2f8c34e4c7c2f5 - OpenPV_Extension_Info { "extensionName": "Reach Service Extension", "packageName": "Ahsoka.Extensions.CygnusReach", "uxpackageName": "Ahsoka.Extensions.CygnusReach.UX", "uxViewModelName": "CygnusReachSetupViewModel", "serviceConfigurations": [ { "socketType": "TcpSocket", "serviceName": "ReachService", "tcpListenAddress": "localhost", "tcpConnectionAddress": "localhost", "dataChannel": 6112, "behaviors": "AutoStart" } ], "hasCommands": "false", "hasUx": "true" }

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.1 56 11/24/2026
6.0.0 63 11/23/2026
5.17.2 236 10/26/2026
5.17.1 248 9/30/2026
5.17.0 245 9/10/2026
5.16.1-zzz-develop.1 108 8/25/2026
5.16.0 283 8/24/2026
5.15.1-zzz-develop.15 106 8/24/2026
5.15.1-zzz-develop.14 107 8/21/2026
5.15.1-zzz-develop.13 117 8/14/2026
5.15.1-zzz-develop.12 123 8/12/2026
5.15.1-zzz-develop.10 99 8/11/2026
5.15.1-zzz-develop.9 108 8/10/2026
5.15.1-zzz-develop.8 92 8/7/2026
5.15.1-zzz-develop.7 95 8/7/2026
5.15.1-zzz-develop.6 102 8/6/2026
5.15.1-zzz-develop.5 104 8/3/2026
5.15.1-zzz-develop.4 104 7/24/2026
5.15.1-zzz-develop.3 95 7/23/2026
Loading failed