Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
Damian edited this page Apr 11, 2022 · 1 revision

Welcome to the Plugin.BlueZ wiki!

Usage Samples

Get a Bluetooth adapter

using Plugin.BlueZ;
...

// Get first adapter (useful for single BLE adapter system)
IAdapter1 adapter = (await BlueZManager.GetAdaptersAsync()).FirstOrDefault();

// Get specific adapter
IAdapter1 adapter = await BlueZManager.GetAdapterAsync(adapterName: "hci0");

Scan for Bluetooth devices

adapter.DeviceFound += adapter_DeviceFoundAsync;

await adapter.StartDiscoveryAsync();
...
await adapter.StopDiscoveryAsync();
Clone this wiki locally