How to detect authentified Central in range?

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

cross mob
Anonymous
Not applicable

Hello colleagues,

   

I set the GAP Role of my BLE device as Peripheral and Bonding Yes.  When I connect for first time my PRoC to the Smartphone (Central) through CySmart App I can see all these events:

   

CYBLE_EVT_STACK_ON
CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP
CYBLE_EVT_GATT_CONNECT_IND

   

CYBLE_EVT_GAP_DEVICE_CONNECTED

   

CYBLE_EVT_GAP_AUTH_REQ

   

CYBLE_EVT_GAP_ENCRYPT_CHANGE

   

KEYINFO_EXCHANGE_COMPLETED. Here I can read the Long term Key: 10006aceca77f24d8755b800a0507258

   

AUTHENTICATION_COMPLETED

   

When I connect it for second time, the Authentification messages dissapear. What I would like is to know how I can know if one already-authentified Central is in range of my PRoC. I was thinking of reading SCAN_REQ Message and then compare its Long Term Key but I don't find such Event. How can I do this?

   

Thanks in advance for the great support!

   

Peter

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hi Peter,

   

Need some clarification.

   

When I connect it for second time, the Authentification messages disappear. - which message is disappearing?

   

You have kept bonding - yes, but did you called CyBle_StoreBondingData() API for store bonding? I suggest you to go through our Bonding example project for better understanding. https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day015_Bon...

   

What I would like is to know how I can know if one already-authentified Central is in range of my PRoC. - Once after connecting and bonding, you can keep whitelist only that particular device. Please refer the following project  :https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day014_Whi...

   

Thanks,
Anjana

View solution in original post

0 Likes
11 Replies