module documentation

BLE Pair - Scan, connect, and pair with BLE devices

Function bluetooth_callback Handle Bluetooth scan and connection events.
Function run Run the pairing app and handle input.
Function start Start the pairing app and begin scanning for devices.
Function stop Stop the pairing app and clean up.
Constant STATE_CONNECTED Undocumented
Constant STATE_CONNECTING Undocumented
Constant STATE_DISCOVERING Undocumented
Constant STATE_IDLE Undocumented
Constant STATE_PAIRED Undocumented
Constant STATE_PAIRING Undocumented
Constant STATE_SCANNING Undocumented
Function __addr_to_str Convert address bytes to a colon-separated string.
Variable _addresses Undocumented
Variable _bluetooth Undocumented
Variable _loading Undocumented
Variable _menu Undocumented
Variable _scanned_devices Undocumented
Variable _selected_device Undocumented
def bluetooth_callback(event, data):

Handle Bluetooth scan and connection events.

Parameters
event:intBluetooth event code.
data:tupleEvent payload.
def run(view_manager):

Run the pairing app and handle input.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
def start(view_manager) -> bool:

Start the pairing app and begin scanning for devices.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
Returns
boolTrue if the app started, False on failure.
def stop(view_manager):

Stop the pairing app and clean up.

Parameters
view_manager:ViewManagerThe view manager instance for display and storage access.
STATE_CONNECTED =

Undocumented

Value
const(5)
STATE_CONNECTING =

Undocumented

Value
const(2)
STATE_DISCOVERING =

Undocumented

Value
const(3)
STATE_IDLE =

Undocumented

Value
const(0)
STATE_PAIRED =

Undocumented

Value
const(6)
STATE_PAIRING =

Undocumented

Value
const(4)
STATE_SCANNING =

Undocumented

Value
const(1)
def __addr_to_str(addr) -> str:

Convert address bytes to a colon-separated string.

Parameters
addr:bytesThe device address bytes.
Returns
strThe formatted address string.
_addresses: list =

Undocumented

_bluetooth =

Undocumented

_loading =

Undocumented

_menu =

Undocumented

_scanned_devices: list =

Undocumented

_selected_device =

Undocumented