LESC passkey pairing work well

This commit is contained in:
hathach committed 2020-02-13 18:54:38 +07:00
1 parent 844e5cae23
commit 5b1eeab956
2 files changed
+3 -7

No files matched your search

@@ -439,12 +439,8 @@ void BLEConnection::_eventHandler(ble_evt_t* evt)
{
_paired = true;
// Save LTK if peer distribute to us
if ( status->kdist_peer.enc )
{
_ediv = _bond_keys->own_enc.master_id.ediv;
bond_save_keys(_role, _conn_hdl, _bond_keys);
}
_ediv = _bond_keys->own_enc.master_id.ediv;
bond_save_keys(_role, _conn_hdl, _bond_keys);
}
rtos_free(_bond_keys);
+1 -1
View File
@@ -755,7 +755,7 @@ bool AdafruitBluefruit::setPairingDisplayCallback(pair_display_cb_t fp)
// _sec_param.lesc = 0;
// _sec_param.io_caps = BLE_GAP_IO_CAPS_DISPLAY_ONLY;
_sec_param.lesc = 1;
_sec_param.io_caps = BLE_GAP_IO_CAPS_NONE;
_sec_param.io_caps = BLE_GAP_IO_CAPS_DISPLAY_ONLY;
ble_opt_t opt;
opt.gap_opt.passkey.p_passkey = NULL; // generate Passkey randomly