blatann.examples.central_async module

This example demonstrates implementing a central BLE connection using async/asyncio event loop. Each bluetooth operation performed is done sequentially in a linear fashion, but the event loop is unblocked during the bluetooth operations (such as connecting, reading characteristics, etc.).

This is designed to run alongside the peripheral example running on a separate Nordic nRF52 device

async blatann.examples.central_async.handle_counting_char(characteristic)

Example of a coroutine that subscribes to characteristic notifications and uses the AsyncEventQueue to create an iterable that returns each notification received by the server

Parameters:

characteristic (GattcCharacteristic)

blatann.examples.central_async.on_passkey_entry(peer, passkey_event_args)

Callback for when the user is requested to enter a passkey to resume the pairing process. Requests the user to enter the passkey and resolves the event with the passkey entered

Parameters:
blatann.examples.central_async.main(serial_port)