BLE connection Security Mode 1, Level 4

bernd_mueller
Posts: 1
Joined: Thu Feb 17, 2022 7:47 am

BLE connection Security Mode 1, Level 4

Postby bernd_mueller » Thu Feb 17, 2022 7:56 am

I want to connect to a thirdparty device to which I do not have logging access so I can not see what is going on on the device besides a LED which indicates whether or not a connection is established. I have modified this example:

[https://raw.githubusercontent.com/nkolb ... asskey.ino][/https://raw.githubusercontent.com/nkolb ... asskey.ino]

I changed the example to this:

Code: Select all

  
  uint32_t onPassKeyRequest(){
    Serial.println("Got passkey request");
    return 111111;
  }

Code: Select all

    
  BLEDevice::setEncryptionLevel(ESP_BLE_SEC_ENCRYPT);
  BLEDevice::setSecurityCallbacks(new MySecurity());

  BLESecurity *pSecurity = new BLESecurity();
  pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_ONLY);
  pSecurity->setCapability(ESP_IO_CAP_KBDISP);
  pSecurity->setRespEncryptionKey(ESP_BLE_ENC_KEY_MASK | ESP_BLE_ID_KEY_MASK);
  BLEClient*  pClient  = BLEDevice::createClient();
The manufacturer states that:
The system’s security level is Security Mode 1, Level 4 (Authenticated LE Secure Connections pairing with encryption). Thereby the client I/O capabilities are KeyboardDisplay and the device DisplayOnly, allowing the usage of a fixed passkey to pair the devices. The device is the initiator of the secured connection.
I can see that no connection is established and I do not see any incoming passkey request either.
Have I put the correct combination of flags?

vallentb
Posts: 1
Joined: Sun Feb 27, 2022 10:33 am

Re: BLE connection Security Mode 1, Level 4

Postby vallentb » Sun Feb 27, 2022 10:34 am

I also stucked with BLE connection Security Mode 1, Level 4.
Any workaround, solution to pair and bond?

Who is online

Users browsing this forum: No registered users and 77 guests