Read number of bytes in a characteristic using software? (value was set in the BLE block GUI)

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

cross mob
NiHo_1308246
Level 3
Level 3
5 likes given First like received First like given

Is it possible to access the number of bytes in a characteristic that was set in the BLE GUI but using API code?

Screen Shot 2017-09-06 at 11.02.50 AM.png

-N

0 Likes
1 Solution
Anonymous
Not applicable

Since no one else seems to have answered so far:

Afaik, there is no way to read that value. Since you set it in the component, there might be a define or constant referring to it in the BLE component generated files. I would suggest reading through there, but otherwise I don't have any tips on where or if it is located in those files.

View solution in original post

3 Replies
Anonymous
Not applicable

Since no one else seems to have answered so far:

Afaik, there is no way to read that value. Since you set it in the component, there might be a define or constant referring to it in the BLE component generated files. I would suggest reading through there, but otherwise I don't have any tips on where or if it is located in those files.

NiHo_1308246
Level 3
Level 3
5 likes given First like received First like given

Thanks for the response. I made a quick search and found nothing resembling. Maybe cypress will give access in the future.

Best,

-N

0 Likes
Anonymous
Not applicable

Try looking at the beginning of the BLE_gatt.c file that is generated, it seems to be putting hardcoded values that reflect the name and DB as configured by the component editor on the top design schematic. The structure of interest appears to be called: CYBLE_GATTS_ATT_GEN_VAL_LEN_T cyble_attValuesLen[CYBLE_GATT_DB_ATT_VAL_COUNT]

It has accurate length values declared in my project, let me know if this has accurate values for yours and works for you.

0 Likes