- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does anyone have an example project for bonding with PSoC 6 BLE?
I am using unauthenticated pairing with encryption. After receiving the CY_BLE_EVT_GAP_AUTH_COMPLETE event, I store bonding data to flash. This seems to work, but if I turn off BT on my phone and then on again, my device disappears from the paired device list.
What am I missing?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello antoine.cimonfortier_2234676,
Many PSoC 63 "BLE examples" that ship with PSoC Creator implement bonding. For instance you can refer to CE212742.
Now, before you store the bonding data, you need to check a variable "cy_ble_pendingFlashWrite". Only when this variable is non-zero, you should call "Cy_BLE_StoreBondingData()" API. You cannot store bonding data if this variable is 0. Hence in your main code, after you call the Cy_BLE_ProcessEvents, you can check if the variable is non-zero or not. If it is non-zero, you can call the "Cy_BLE_StoreBondingData()" API.
Let me know if this helps.
Regards,
Meenakshi Sundaram R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello antoine.cimonfortier_2234676,
Many PSoC 63 "BLE examples" that ship with PSoC Creator implement bonding. For instance you can refer to CE212742.
Now, before you store the bonding data, you need to check a variable "cy_ble_pendingFlashWrite". Only when this variable is non-zero, you should call "Cy_BLE_StoreBondingData()" API. You cannot store bonding data if this variable is 0. Hence in your main code, after you call the Cy_BLE_ProcessEvents, you can check if the variable is non-zero or not. If it is non-zero, you can call the "Cy_BLE_StoreBondingData()" API.
Let me know if this helps.
Regards,
Meenakshi Sundaram R