Skip to content

Commit e35e4bb

Browse files
authored
Merge pull request #745 from ViezeVingertjes/fix-pin-display
Fix: Set device as connected after successful authentication
2 parents 8ddabfc + c10c010 commit e35e4bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/helpers/esp32/SerialBLEInterface.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool SerialBLEInterface::onSecurityRequest() {
6666
void SerialBLEInterface::onAuthenticationComplete(esp_ble_auth_cmpl_t cmpl) {
6767
if (cmpl.success) {
6868
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Success");
69-
//deviceConnected = true;
69+
deviceConnected = true;
7070
} else {
7171
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Failure*");
7272

@@ -88,8 +88,6 @@ void SerialBLEInterface::onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t
8888

8989
void SerialBLEInterface::onMtuChanged(BLEServer* pServer, esp_ble_gatts_cb_param_t* param) {
9090
BLE_DEBUG_PRINTLN("onMtuChanged(), mtu=%d", pServer->getPeerMTU(param->mtu.conn_id));
91-
92-
deviceConnected = true;
9391
}
9492

9593
void SerialBLEInterface::onDisconnect(BLEServer* pServer) {

0 commit comments

Comments
 (0)