- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been going over this project and am having a tough time figuring out the order when it comes to Authenticating/Bonding/Pairing versus connecting to a bonded peer. It jumps back and forth through main.c, so I can't really get a clear understanding of the StackEvent order.
I'm coding both central and peripheral roles on 2 separate devices. I understand that when 2 unbonded devices go through the authentication procedure, the CYBLE_EVT_GAP_AUTH_COMPLETE event is returned, but what is returned when the devices are bonded and a connection is made?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
First the device will connect, that time the event CYBLE_EVT_GAP_DEVICE_CONNECTED
When the device paired successfully and authentication completed, it will trigger event CYBLE_EVT_GAP_AUTH_COMPLETE
After Bonding, no events will get triggered. But you can confirm whether bonding was successfull by checking the API result of CyBle_StoreBondingData API.
I am attaching a basic bonding example project. Please go through it for reference.
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
First the device will connect, that time the event CYBLE_EVT_GAP_DEVICE_CONNECTED
When the device paired successfully and authentication completed, it will trigger event CYBLE_EVT_GAP_AUTH_COMPLETE
After Bonding, no events will get triggered. But you can confirm whether bonding was successfull by checking the API result of CyBle_StoreBondingData API.
I am attaching a basic bonding example project. Please go through it for reference.
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. So, just to be certain, after CYBLE_EVT_GAP_AUTH_COMPLETE, devices are connected until disconnect is issued. Then (provided bonded device is stored) what event would be triggered on reconnect? Specifically if the the 4.2 device was advertising directly to the central device. I know there's a scan event that triggers on the central side when direct advertising is used, which then the central can call a connection, but after connection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
After connection always CYBLE_EVT_GAP_DEVICE_CONNECTED event will get trigger (Even it is a reconnect after disconnection).
And if the device passed authentication process successfully , the event CYBLE_EVT_GAP_AUTH_COMPLETE will get triggered (if not disconnected).
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I downloaded the project and tried to build but it was missing the BLE portion.
I have CY8CKIT-042-BLE and PSoC Creator 4.1
How can I build?
Also, which file can I see the pairing/bonding/passkey setup?
Thanks,
Asha