- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to do LE Secure connection with PSOC6 and pairing is currently failing at the DHKey check. Cysmart reports:
[13:47:00:636] : 'Initiate Pairing' request sent
[13:47:00:636] : 'Command Status' event received
[13:47:00:636] : Status: BLE_STATUS_OK
[13:47:00:651] : 'Negotiated pairing parameters' event received
[13:47:00:651] : State: Pairing negotiated
[13:47:00:651] : Security Level: 0x03
[13:47:00:651] : Encryption Key Size: 16
[13:47:00:651] : Bonding: 0x01
[13:47:00:651] : Pairing properties: NONE
[13:47:01:931] : 'Authentication Error Notification' event received
[13:47:01:931] : Status: AUTH_ERROR_DHKEY_CHECK_FAILED
Error: gpm.M1118: Authentication failed. DHKey check value received from peer device does not match with the calculated value
On the device, I get:
CY_BLE_EVT_GAP_DEVICE_CONNECTED: 0, 7(8.75 ms), 0, a
CYBLE_EVT_AUTH_REQ: security=0x3, bonding=0x1, ekeySize=0x10, err=0x0
CY_BLE_EVT_GAP_SMP_NEGOTIATED_AUTH_INFO: security=0x3, bonding=0x1, ekeySize=0x10, err=0x0
CYBLE_EVT_GAP_AUTH_FAILED: 0x24
However, 0x24 doesn't look like a valid value of cy_en_ble_gap_auth_failed_reason_t. Where can I find out what this error code means and how to fix it?
Thanks,
Theo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Theo,
The reason 0x24 is un-expected for CY_BLE_EVT_GAP_AUTH_FAILED. Is it possible, you have incorrect print in your project DEC instead HEX? In this case 24 -> 0x18 -> CY_BLE_GAP_AUTH_ERROR_LINK_DISCONNECTED, it is more resendable... Please check your project.
Regarding to example, please review CE212742, it advertises public address after programing, and after first pairing it start advertise with random resolvable-private address (see Advertise Privately() function).
Thanks,
Nazar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue seems to be caused by using a resolvable private address. If I comment out the the code for setting an RPA, the problem goes away. Any thoughts on what step I could be missing to enable both LE secure connection and resolvable private addresses that causes this error code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ThBr_4364666,
Could you please share your project so that we can check at our end?
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Theo,
Please check that Link Layer Privacy is Enabled in BT Configurator (tab "Link Layer Settings").
Regards,
Nazar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Sorry for the delay I was away for a few days. I don't have link layer privacy enabled, but resolvable private addresses was available before before BLE 4.2, so I would expect it to work. Are you saying that PSoC6 requires link layer privacy for resolvable private addresses to work? What does error code 0x24 mean?
I can try it with the link layer privacy tomorrow.
Thanks,
Theo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I enabled link layer privacy, the pairing process succeeded, but the device was advertising with the public address instead of an RPA. Where can I find an example how to set up a PSOC6 to use a resolvable private address with connectable undirected advertising? CE212742 doesn't seem to cover that use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Theo,
The reason 0x24 is un-expected for CY_BLE_EVT_GAP_AUTH_FAILED. Is it possible, you have incorrect print in your project DEC instead HEX? In this case 24 -> 0x18 -> CY_BLE_GAP_AUTH_ERROR_LINK_DISCONNECTED, it is more resendable... Please check your project.
Regarding to example, please review CE212742, it advertises public address after programing, and after first pairing it start advertise with random resolvable-private address (see Advertise Privately() function).
Thanks,
Nazar