- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to set up Bluetooth LE pairing using Authenticated LE Secure pairing with encryption and Numeric Comparison. In the generic BLE event handler, I can get to:
case CY_BLE_EVT_GAP_NUMERIC_COMPARISON_REQUEST:
BLE_PRINTF("Compare this passkey with the one displayed in your peer device and press 'y' or 'n':"
" %6.6lu \r\n", *(uint32_t *)eventParam);
It is fairly obvious that I should insert my own application specific code at this point to present the question to the user in way that is supported on my system. And I can handle that.
However, what is NOT obvious to me is how I am supposed to acknowledge the user's confirmation that the pairing should proceed. It seems like there should be some predefined CY_BLE function to call, but I can't locate it.
Anybody know how to complete the Numeric Comparison?
Thanks,
Ed h.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ed,
>>"It is fairly obvious that I should insert my own application specific code at this point to present the question to the user in way that is supported on my system. And I can handle that."
Cypress--> You just have to set the security mode as "Authenticated pairing with LE secure connections" in the BLE configurator tab. The BLE stack can generate a code and display it on both central and peripheral devices. However you can also set the passkey using the API CyBle_GapFixAuthPassKey().
The API CyBle_GapAuthPassKeyReply(cyBle_connHandle.bdHandle, numcompkey, CYBLE_GAP_ACCEPT_PASSKEY_REQ); is used to return the status (correct/incorrect) of the passkey entered from the user.
Please find the attached projects which has the implementation for Numeric comparison method.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ed,
>>"It is fairly obvious that I should insert my own application specific code at this point to present the question to the user in way that is supported on my system. And I can handle that."
Cypress--> You just have to set the security mode as "Authenticated pairing with LE secure connections" in the BLE configurator tab. The BLE stack can generate a code and display it on both central and peripheral devices. However you can also set the passkey using the API CyBle_GapFixAuthPassKey().
The API CyBle_GapAuthPassKeyReply(cyBle_connHandle.bdHandle, numcompkey, CYBLE_GAP_ACCEPT_PASSKEY_REQ); is used to return the status (correct/incorrect) of the passkey entered from the user.
Please find the attached projects which has the implementation for Numeric comparison method.
Thanks
Ganesh