Merge pull request #745 from ViezeVingertjes/fix-pin-display
Fix: Set device as connected after successful authentication
This commit is contained in:
@@ -66,7 +66,7 @@ bool SerialBLEInterface::onSecurityRequest() {
|
|||||||
void SerialBLEInterface::onAuthenticationComplete(esp_ble_auth_cmpl_t cmpl) {
|
void SerialBLEInterface::onAuthenticationComplete(esp_ble_auth_cmpl_t cmpl) {
|
||||||
if (cmpl.success) {
|
if (cmpl.success) {
|
||||||
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Success");
|
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Success");
|
||||||
//deviceConnected = true;
|
deviceConnected = true;
|
||||||
} else {
|
} else {
|
||||||
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Failure*");
|
BLE_DEBUG_PRINTLN(" - SecurityCallback - Authentication Failure*");
|
||||||
|
|
||||||
@@ -88,8 +88,6 @@ void SerialBLEInterface::onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t
|
|||||||
|
|
||||||
void SerialBLEInterface::onMtuChanged(BLEServer* pServer, esp_ble_gatts_cb_param_t* param) {
|
void SerialBLEInterface::onMtuChanged(BLEServer* pServer, esp_ble_gatts_cb_param_t* param) {
|
||||||
BLE_DEBUG_PRINTLN("onMtuChanged(), mtu=%d", pServer->getPeerMTU(param->mtu.conn_id));
|
BLE_DEBUG_PRINTLN("onMtuChanged(), mtu=%d", pServer->getPeerMTU(param->mtu.conn_id));
|
||||||
|
|
||||||
deviceConnected = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialBLEInterface::onDisconnect(BLEServer* pServer) {
|
void SerialBLEInterface::onDisconnect(BLEServer* pServer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user