diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2021-09-27 16:27:42 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-10-26 00:16:53 +1100 |
commit | 43467b9c719928ffaf2bc1cb314338bc402914e1 (patch) | |
tree | cc6d49282500833a703f30bdaebbb53e6732c9d1 /docs/library/bluetooth.rst | |
parent | 64e4bae129263278f72a6c3494f1e67c7895fcdd (diff) |
extmod/modbluetooth: Add connection interval to gap_connect.
This forwards through directly to the NimBLE and BTStack connect functions.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library/bluetooth.rst')
-rw-r--r-- | docs/library/bluetooth.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/library/bluetooth.rst b/docs/library/bluetooth.rst index 6ebceeed5..cfec804ea 100644 --- a/docs/library/bluetooth.rst +++ b/docs/library/bluetooth.rst @@ -359,7 +359,7 @@ Central Role A central device can connect to peripherals that it has discovered using the observer role (see :meth:`gap_scan<BLE.gap_scan>`) or with a known address. -.. method:: BLE.gap_connect(addr_type, addr, scan_duration_ms=2000, /) +.. method:: BLE.gap_connect(addr_type, addr, scan_duration_ms=2000, min_conn_interval_us=None, max_conn_interval_us=None, /) Connect to a peripheral. @@ -367,6 +367,15 @@ A central device can connect to peripherals that it has discovered using the obs On success, the ``_IRQ_PERIPHERAL_CONNECT`` event will be raised. + The device will wait up to *scan_duration_ms* to receive an advertising + payload from the device. + + The connection interval can be configured in **micro**\ seconds using either + or both of *min_conn_interval_us* and *max_conn_interval_us*. Otherwise a + default interval will be chosen, typically between 30000 and 50000 + microseconds. A shorter interval will increase throughput, at the expense + of power usage. + Peripheral Role --------------- |