- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
from CySmart mobile app I connect to my device (CYBLE-416045-02) and navigate to the notification service and click the start Notify button and notifications are not enabled on the device
DEBUG_BLE("write_req_param->handleValPair.attrHandle = %d",\
write_req_param->handleValPair.attrHandle);
DEBUG_BLE(" -> Should be = CUSTOM_SERV0_CHAR0_DESC0_HANDLE (%d)"\
"\r\n-> Should be = CUSTOM_SERV0_CHAR0_HANDLE(%d)\r\n",\
CUSTOM_SERV0_CHAR0_DESC0_HANDLE, CUSTOM_SERV0_CHAR0_HANDLE);
if(write_req_param->handleValPair.attrHandle == (CUSTOM_SERV0_CHAR0_DESC0_HANDLE))
{
....ENABLE NOTIFICATION CODE....
}
write_req_param->handleValPair.attrHandle = 29
CUSTOM_SERV0_CHAR0_DESC0_HANDLE = 28
CUSTOM_SERV0_CHAR0_HANDLE = 27
the CUSTOM_SERV0_CHAR0_DESC0_HANDLE is 28 and the write_req_param->handleValPair.attrHandle is 29 so I added + 1 to the above check
DEBUG_BLE("write_req_param->handleValPair.attrHandle = %d",\
write_req_param->handleValPair.attrHandle);
DEBUG_BLE(" -> Should be = CUSTOM_SERV0_CHAR0_DESC0_HANDLE (%d)"\
"\r\n-> Should be = CUSTOM_SERV0_CHAR0_HANDLE(%d)\r\n",\
CUSTOM_SERV0_CHAR0_DESC0_HANDLE, CUSTOM_SERV0_CHAR0_HANDLE);
if(write_req_param->handleValPair.attrHandle == (CUSTOM_SERV0_CHAR0_DESC0_HANDLE + 1)) !!!!! add 1 to CUSTOM_SERV0_CHAR0_DESC0_HANDLE
{
....ENABLE NOTIFICATION CODE....
}
by doing this I was able to get notifications on my device working.
I am sure this is not the proper way to do this but noting else that works what is the proper way to get this working?
Questions Why is notifications not enabling on my device (CYBLE-416045-02)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CCCD handle maybe not visible from TopDesign GUI. You can find it in data array cy_ble_gattDB() generated in BLE_config.c -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To enable the notification on GATT Server, the GATT Client needs to write proper value to the CCCD of target Characteristic on GATT Server.
CUSTOM_SERV0_CHAR0_DESC0_HANDLE might not be the correct one. Can you double-check the handle value of target CCCD on your custom design?
For general flow to enable Notification for a custom Characteristic on GATT Server, the attached project might be a good example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what is the handle value of target CCCD is it in the BLE 5 GUI component from TopDesign.sch?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CCCD handle maybe not visible from TopDesign GUI. You can find it in data array cy_ble_gattDB() generated in BLE_config.c -