summaryrefslogtreecommitdiff
path: root/docs/library/ubluetooth.rst
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2020-08-14 11:49:41 +1000
committerDamien George <damien@micropython.org>2020-08-26 15:00:11 +1000
commita80a146858b3c9a7fbae4030a524666ab19f7a47 (patch)
tree0de2574a6e87c825fe60212dfc5db374cdd8154f /docs/library/ubluetooth.rst
parent0bc2c1c1057d7f5c1e4987139062386a8f9fe5f2 (diff)
extmod/bluetooth: Support active scanning in BLE.gap_scan().
This adds an additional optional parameter to gap_scan() to select active scanning, where scan responses are returned as well as normal scan results. This parameter is False by default which retains the existing behaviour.
Diffstat (limited to 'docs/library/ubluetooth.rst')
-rw-r--r--docs/library/ubluetooth.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/library/ubluetooth.rst b/docs/library/ubluetooth.rst
index e103932ef..0cac16f5f 100644
--- a/docs/library/ubluetooth.rst
+++ b/docs/library/ubluetooth.rst
@@ -204,7 +204,7 @@ Broadcaster Role (Advertiser)
Observer Role (Scanner)
-----------------------
-.. method:: BLE.gap_scan(duration_ms, [interval_us], [window_us])
+.. method:: BLE.gap_scan(duration_ms, [interval_us], [window_us], [active])
Run a scan operation lasting for the specified duration (in **milli**\ seconds).
@@ -228,6 +228,8 @@ Observer Role (Scanner)
* 0x03 - ADV_NONCONN_IND - non-connectable undirected advertising
* 0x04 - SCAN_RSP - scan response
+ ``active`` can be set ``True`` if you want to receive scan responses in the results.
+
When scanning is stopped (either due to the duration finishing or when
explicitly stopped), the ``_IRQ_SCAN_DONE`` event will be raised.