Can I set one confirmed security key in BLE to connect and authenticate?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am debug the example "Day015_Bonding". My question is:

How to set one confirmed security key when running in BLE Device, and the security key can be input in Cysmart to connect and authenticate?

Thanks!

0 Likes
1 Solution
ShengY_96
Employee
Employee
10 sign-ins 5 sign-ins Welcome!

Please refer to API: CyBle_GapFixAuthPassKey(),  the BLE component V3.1 or higher version have this function.

     case CYBLE_EVT_STACK_ON:

               api_result = CyBle_GapFixAuthPassKey(1,passkey);

View solution in original post

4 Replies
Anonymous
Not applicable

Do you mean a fixed security key that never changes that you can use for authenticating the connection?

Or do you mean, how do you generate and get the key used to authenticate a bonding/connection?

0 Likes
Anonymous
Not applicable

mean a fixed security key .

0 Likes
Anonymous
Not applicable

I believe you would put the fixed key into your code on the BLE device, set the device for Out-Of-Band pairing, and then authenticate the connection when requested using the fixed key in the code.

The Project #032: OOB Pairing | Cypress Semiconductor  example should help with explaining the operation more; But, basically, you will use the OOB pairing with the static key being compared on the PSoC BLE and entering it in on the phone.

0 Likes
ShengY_96
Employee
Employee
10 sign-ins 5 sign-ins Welcome!

Please refer to API: CyBle_GapFixAuthPassKey(),  the BLE component V3.1 or higher version have this function.

     case CYBLE_EVT_STACK_ON:

               api_result = CyBle_GapFixAuthPassKey(1,passkey);