Understanding value of BLE API error

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

cross mob
AlBo_1871926
Level 1
Level 1

Hello, after calling Cy_BLE_GATTS_SendNotification(&appConnHandle, &handleValuePair); I'm getting result value of 0x17. How I could understand what actual error code it is? Is it CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE? Doesn't make any sense, since in the PDL documentation there is no such return value for SendNotification.

Thanks,

0 Likes
1 Solution
NazarP_56
Employee
Employee
25 solutions authored 10 sign-ins 50 replies posted

Hi AlBo_1871926

Please refer to cy_en_ble_api_result_t enum for error details. We have following format for error:

CY_PDL_STATUS_ERROR | CY_BLE_ID | <ERROR_NUMBER>, where
- CY_PDL_STATUS_ERROR - (2ul << 16u), 
- CY_BLE_ID - (5ul << 18u) and

- ERROR_NUMBER - 1...26. So 0x160017 is CY_BLE_ERROR_NTF_DISABLED.

Thanks,

Nazar

View solution in original post

0 Likes
2 Replies
NazarP_56
Employee
Employee
25 solutions authored 10 sign-ins 50 replies posted

Hi AlBo_1871926

Please refer to cy_en_ble_api_result_t enum for error details. We have following format for error:

CY_PDL_STATUS_ERROR | CY_BLE_ID | <ERROR_NUMBER>, where
- CY_PDL_STATUS_ERROR - (2ul << 16u), 
- CY_BLE_ID - (5ul << 18u) and

- ERROR_NUMBER - 1...26. So 0x160017 is CY_BLE_ERROR_NTF_DISABLED.

Thanks,

Nazar

0 Likes

Thank you, that helped a lot!

0 Likes