Hello!
I have a custom board with nRF52810 and s132. BLE connection is secured with passcode. it works.
I would like to get exact passcode entered by User if the passcode is wrong. Is it possible and how?
Thanks in advance
Hello!
I have a custom board with nRF52810 and s132. BLE connection is secured with passcode. it works.
I would like to get exact passcode entered by User if the passcode is wrong. Is it possible and how?
Thanks in advance
Is the code being entered on your device?
Yes, it is my device. I can not find which event of PM I have to handle and how I can get entered code.
Surely, you must know how the code is entered?
You must have provided the code which reads whatever input device is used?
If you don't know - when it's your device - how can anyone else possibly know?!
Let me clarify it:
1. I have nRF52840 board with NUS service and BLE connection requires passcode
2. I connect to the device using lets say iPhone and nRF Connect or Bluefruit app.
3. iOS asks for passcode, I enter some, lets say `123456`
4. Right passcode on the device is `654321`
5. So I get the PM_EVT_CONN_SEC_FAILED event on device side with mesage <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 132
<warning> peer_manager_handler: Disconnecting conn_handle 0.
6. It is absolutely correct workflow but I would like to know in the firmware, that user entered `123456`, not just that it was wrong.
Is it possible?
Hi,
There is no possibility to get this information from the SoftDevice. The only thing you get is a BLE_GAP_EVT_KEY_PRESSED every time a key is pressed on the peer when using LESC, but there is no way to know which number was entered or the full passkey.
Hi,
There is no possibility to get this information from the SoftDevice. The only thing you get is a BLE_GAP_EVT_KEY_PRESSED every time a key is pressed on the peer when using LESC, but there is no way to know which number was entered or the full passkey.
hi Einar,
Can you instruct me how to catch this BLE_GAP_EVT_KEY_PRESSED , i simply add this event in ble_evt_handler, it doesn't work. also can't find out any doc about this in devzone.
Regards,
William.
i guess this event is from mobile phone, so no message is received by nrf device, right ?
Yes. Sending key press notifications is optional, so if you do not get the event, then it is probably not sent by the phone.