Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
AnKr_1499391
Level 3
Level 3
First like received First like given

Hi everyone,

I have a BLE device which is connected to an epaper-display. This is used to display the key to pair with a smartphone. Works fine and smooth.

My problem now is, that I would like to make one characteristic accessible before I actually pair with the device to be able to select the correct display size.

In the BLE configurations dialog in the profiles tab I set the permissions of the respective characteristic for read and write to "no encryption required, no authentication required, no autorization required". And I hoped that this would allow me to access the characteristic without pairing and bonding.

I use an Android smartphone to connect to the device. But if I try to connect to the device I will always get a bonding request and if I decline this request I immediately get disconnected. I tried it with the CySmart and the nRF Connect app.

Now I don't have a glue where the problem might be: Wrong configuration of the BLE-Component? Wrong handling of the connection request? Android-problem? App-problem? Usecase not possible at all?

Thanks for any hint!

Andreas

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello Andreas,

In the event CYBLE_EVT_GAP_AUTH_REQ we have to call CyBle_GappAuthReqReply() function. This event is received by Peripheral and Central devices. When it is received by Peripheral, peripheral needs to Call CyBle_GappAuthReqReply() to reply to authentication request from Central device.

CyBle_GappAuthReqReply() function is used to pass security information for authentication in reply to an authentication request from the master device.

Please find the attached project, which has two custom characteristics(both has read and write). The first custom characteristic was enabled with encryption and second characteristic was enabled with No encryption and No authentication.

Please let me know if this helps.

Thanks,

P Yugandhar.

View solution in original post

4 Replies
Yugandhar
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 1000 replies posted

Hello Andreas,

In order to remove pairing, in BLE component -> in the security tab please change security mode:1, Security level: no security(No authentication, No encryption), strict pairing: No, I/O Capabilities: No input No output, Bonding requirement: No bonding.

And also in the firmware please remove the API CyBle_GapAuthReq() which is responsible for generating pairing request.

Please let me know if I'm missing anything.

Thanks,

P Yugandhar.

0 Likes

Hi Yugandhar,

thanks for this idea, but I don't want to completely disable pairing and bonding.

I just want to be able to read and write one characteristic before I actually pair and bond to the device.

Thanks

Andreas

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Andreas,

In the event CYBLE_EVT_GAP_AUTH_REQ we have to call CyBle_GappAuthReqReply() function. This event is received by Peripheral and Central devices. When it is received by Peripheral, peripheral needs to Call CyBle_GappAuthReqReply() to reply to authentication request from Central device.

CyBle_GappAuthReqReply() function is used to pass security information for authentication in reply to an authentication request from the master device.

Please find the attached project, which has two custom characteristics(both has read and write). The first custom characteristic was enabled with encryption and second characteristic was enabled with No encryption and No authentication.

Please let me know if this helps.

Thanks,

P Yugandhar.

Hi Yugandhar,

thank you very much for this sample project. This is really the function I would like to have.

I will have to check what the difference to my project is! 🙂

Thanks

Andreas

0 Likes