summaryrefslogtreecommitdiff
path: root/extmod/btstack/modbluetooth_btstack.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-11-25 00:06:16 +1100
committerDamien George <damien@micropython.org>2020-12-02 14:41:26 +1100
commit801e8ffacff0d2ed15e82136db2a8a45afbfab7b (patch)
tree1102e234887e533f7a1933e7dfd6f7a8e33e0bda /extmod/btstack/modbluetooth_btstack.c
parentf822557cbb79decb6947e1e35b8cddce18f4c06f (diff)
extmod/modbluetooth: Add gap_pair(conn_handle) func to intiate pairing.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/btstack/modbluetooth_btstack.c')
-rw-r--r--extmod/btstack/modbluetooth_btstack.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c
index ae4bac009..f6af664a4 100644
--- a/extmod/btstack/modbluetooth_btstack.c
+++ b/extmod/btstack/modbluetooth_btstack.c
@@ -1167,6 +1167,14 @@ int mp_bluetooth_gap_disconnect(uint16_t conn_handle) {
return 0;
}
+#if MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING
+int mp_bluetooth_gap_pair(uint16_t conn_handle) {
+ DEBUG_printf("mp_bluetooth_gap_pair: conn_handle=%d\n", conn_handle);
+ sm_request_pairing(conn_handle);
+ return 0;
+}
+#endif // MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING
+
#if MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
STATIC btstack_timer_source_t scan_duration_timeout;