on_bt_event Event

Function:

Generated when a BLE event occurs.

Declaration:

on_bt_event(bt_event as pl_bt_events)

See Also:

Bringing up and enabling the BLE interface, Disabling BLE and detecting failures, Handling BLE connections


Part

Description

bt_event

One of the events from the pl_bt_events enum:

0 — PL_BT_EVENT_CONNECTED: The BLE interface has accepted an incoming connection.

1 — PL_BT_EVENT_DISCONNECTED: The BLE interface is no longer engaged in a connection.

2 — PL_BT_EVENT_ENABLED: The BLE interface has been enabled (through bt.enable).

3 — PL_BT_EVENT_DISABLED: The BLE interface has been disabled (through bt.disable).