Ahsoka.Extensions.Bluetooth 6.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ahsoka.Extensions.Bluetooth --version 6.0.0
                    
NuGet\Install-Package Ahsoka.Extensions.Bluetooth -Version 6.0.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="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ahsoka.Extensions.Bluetooth" Version="6.0.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 6.0.0
                    
#r "nuget: Ahsoka.Extensions.Bluetooth, 6.0.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@6.0.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=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Ahsoka.Extensions.Bluetooth&version=6.0.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 Description
BluetoothService Bluetooth Classic adapter management, discovery, pairing, and profile services
BleService Bluetooth Low Energy peripheral mode, GATT services, and advertisements

Adding the extension in the OpenPV Developer Toolkit sets both services to auto-start and assigns their ports.

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
HFP (Hands-Free) Phone call control via oFono telephony integration: phone status, answer, reject, dial, hang up. Call audio through the display is not supported yet Hardware-validated
PBAP (Phonebook Access) Contact synchronization with vCard and SQLite storage API present, not hardware-validated
SPP (Serial Port) Serial data communication over RFCOMM API present, not hardware-validated

The last two 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(new BluetoothEnableRequest { AdapterIndex = adapterIndex, PairingAgentTimeout = 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(new BleStackRequest { LocalName = "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 and gives you control and metadata. Its media relay turns a headset's buttons into commands for the phone it is routed to and pushes the phone's now-playing to the headset, with no application wiring. Audio itself — routing, mixing, output selection, platform volume — is owned by the companion Audio extension; the optional Bluetooth Audio Routing extension (Ahsoka.Extensions.Bluetooth.AudioRouting) asks it to play a connected phone's audio in its routed headset or the cabin. 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 Packages

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.

Ahsoka.Extensions.Bluetooth.AudioRouting — The Bluetooth Audio Routing extension: plays a connected phone's audio in the headset the media relay routes it to, or in the cabin.

Requirements

  • .NET 10.0
  • Ahsoka.Core 5.x
  • Ahsoka.Extensions.AudioManager in the application — 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