summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2020-11-04 18:21:59 +1100
committerDamien George <damien@micropython.org>2020-12-02 14:40:15 +1100
commit05fef8c6a4113bc05dd09ddd8d0bf7d136d59f39 (patch)
treeb2bb8f26199614ae31fa30aeccedc77ac023baa1 /docs/library
parentac89267fef8b2396cf46c6ba19ccbe3d10acff9a (diff)
extmod/modbluetooth: Add _IRQ_ENCRYPTION_UPDATE event.
This allows the application to be notified if any of encrypted, authenticated and bonded state change, as well as the encryption key size. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/ubluetooth.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/library/ubluetooth.rst b/docs/library/ubluetooth.rst
index f65020d2a..d402c6a9e 100644
--- a/docs/library/ubluetooth.rst
+++ b/docs/library/ubluetooth.rst
@@ -202,6 +202,9 @@ Event Handling
elif event == _IRQ_CONNECTION_UPDATE:
# The remote device has updated connection parameters.
conn_handle, conn_interval, conn_latency, supervision_timeout, status = data
+ elif event == _IRQ_ENCRYPTION_UPDATE:
+ # The encryption state has changed (likely as a result of pairing or bonding).
+ conn_handle, encrypted, authenticated, bonded, key_size = data
The event codes are::
@@ -233,6 +236,7 @@ The event codes are::
_IRQ_L2CAP_RECV = const(25)
_IRQ_L2CAP_SEND_READY = const(26)
_IRQ_CONNECTION_UPDATE = const(27)
+ _IRQ_ENCRYPTION_UPDATE = const(28)
For the ``_IRQ_GATTS_READ_REQUEST`` event, the available return codes are::