- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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