strand

bluetooth

Bluetooth, from BlueZ, followed live: the first adapter, the devices paired with it, and the devices in range while a pairing page reads them.

FieldType
poweredbool rwThe adapter is on. Writable.
devices[BluetoothDevice]Paired devices, keyed by address.
availableboolBlueZ answers and has an adapter: false without them (or without a system bus), so a menu can hide what cannot work.
nearby[BluetoothDevice]Unpaired devices in range that have a name, keyed by address, found by discovery. Discovery runs only while a visible reader reads them (a pairing page that is open).
scanningboolThe adapter is discovering devices, for nearby or for another program.
Event
on bluetooth.failed(address: text, error: text)Connecting, disconnecting, pairing or forgetting a device failed (out of range, turned off, timed out, or the service not running): on bluetooth.failed(address, error) { … }.

This page as Markdownllms.txt