is not called on my client when uint32_t onPassKeyRequest() returns the wrong passkey.
This leaves my client "connected", but it can't communicate. No callbacks occur so I can't react to this state.
I can see the example code shows this for the client:
void onAuthenticationComplete(NimBLEConnInfo& connInfo){
Serial.println("onAuthenticationComplete");
if(!connInfo.isEncrypted()) {
Serial.println("Encrypt connection failed - disconnecting");
/** Find the client with the connection handle provided in connInfo */
NimBLEDevice::getClientByID(connInfo.getConnHandle())->disconnect();
return;
}
};
Except onAuthenticationComplete isnt called at all...
Client Debug:
D NimBLEClient: Got Client event
D NimBLEClient: Enter the passkey
uint32_t onPassKeyRequest() called (returns wrong value)
D NimBLEClient: ble_sm_inject_io result: 3
D NimBLEClient: Got Client event
Server debug:
I NimBLEServer: subscribe event; attr_handle=12, subscribed: true
I NimBLECharacteristic: New subscribe value for conn: 0 val: 1
uint32_t onPassKeyRequest() called
void onAuthenticationComplete(NimBLEConnInfo& connInfo)
is not called on my client when
uint32_t onPassKeyRequest()
returns the wrong passkey.This leaves my client "connected", but it can't communicate. No callbacks occur so I can't react to this state.
I can see the example code shows this for the client:
Except onAuthenticationComplete isnt called at all...
Client Debug:
Server debug:
What am I missing?
Thanks