From 1e86365167339f5d4fe9006298cd845531be534a Mon Sep 17 00:00:00 2001 From: geeksville Date: Sun, 19 Jul 2020 15:00:27 -0700 Subject: [PATCH] MITM_BOND supposedly doesn't have the problem mentioned in #266 (and it is good / more secure anyways - the old code was just based on the example docs) --- src/esp32/BluetoothUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esp32/BluetoothUtil.cpp b/src/esp32/BluetoothUtil.cpp index 224b8c0a..03b7c974 100644 --- a/src/esp32/BluetoothUtil.cpp +++ b/src/esp32/BluetoothUtil.cpp @@ -309,7 +309,7 @@ BLEServer *initBLE(StartBluetoothPinScreenCallback startBtPinScreen, StopBluetoo // FIXME - really should be ESP_LE_AUTH_REQ_SC_BOND but it seems there is a bug right now causing that bonding info to be lost // occasionally? - pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_BOND); + pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); pSecurity->setInitEncryptionKey(ESP_BLE_ENC_KEY_MASK | ESP_BLE_ID_KEY_MASK);