Skip to content

Can not get BLE to prompt for Pincode on client connect #1198

@cherbin

Description

@cherbin

Hello,

I am using an esp32 and need to connect to the device BLE, and also ask for a pincode.
right now I am using the example : https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/security/StaticPIN/StaticPIN.ino

And I have added these lines to my BLEServer setup

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

pService->start();

BLESecurity *pSecurity = new BLESecurity();

pSecurity->setAuthenticationMode(ESP_GATT_PERM_READ_ENC_MITM | ESP_GATT_PERM_WRITE_ENC_MITM);
pSecurity->setStaticPIN(123456);

But when I connect using NRF Connect, it is not prompting the Mobile App NRF Connect for a PinCode ?

Can you please let me know what I need to add ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions