module documentation

BLE Advertise - Broadcast as a peripheral and accept connections

Function bluetooth_callback Handle Bluetooth connection and disconnection events.
Function on_data_received Store data received from the connected central.
Function run Run the app and update the display.
Function start Start the app and advertise this device for connections.
Function stop Stop the app and clean up the BLE connection.
Constant STATE_ADVERTISING Undocumented
Constant STATE_CONNECTED Undocumented
Constant STATE_IDLE Undocumented
Variable _advertising Undocumented
Variable _bluetooth Undocumented
Variable _connections Undocumented
Variable _last_update Undocumented
Variable _received_data Undocumented
def bluetooth_callback(event, data):

Handle Bluetooth connection and disconnection events.

Parameters
event:intBluetooth event code.
data:tupleEvent payload with connection handle and address.
def on_data_received(data):

Store data received from the connected central.

Parameters
data:bytesRaw data received over BLE.
def run(view_manager):

Run the app and update the display.

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

Start the app and advertise this device for connections.

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

Stop the app and clean up the BLE connection.

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

Undocumented

Value
const(1)
STATE_CONNECTED =

Undocumented

Value
const(2)
STATE_IDLE =

Undocumented

Value
const(0)
_advertising: bool =

Undocumented

_bluetooth =

Undocumented

_connections: list =

Undocumented

_last_update: int =

Undocumented

_received_data: list =

Undocumented