Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cherbin opened this issue Sep 6, 2024 · 0 comments
Open

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

cherbin opened this issue Sep 6, 2024 · 0 comments

Comments

@cherbin
Copy link

cherbin commented Sep 6, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant