Name of Service Characteristic Array Index Counter

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

cross mob
PhBe_1305961
Level 3
Level 3
First like received First like given

I have created a BLE Service Characteristic that has a sint16 array.  Using CySmart, I see all data bytes scroll by as zero based on length set when I read the Service Characteristic.   I can specify a specific array point and get it to show in the scrolling data of zeros in CySmart.   Is there an Array index number request being sent over by the Client that can be used to automatically sequence through the Server array?  What's its name?    

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

AFAIK the GATT client always retrieves the complete data set.

0 Likes

Thanks for your input.  With your comment, I continued investigating and it looks like I did not have the tempHandle.value.len value set properly.  Not sure why but to get it to work correctly, I need to set  tempHandle.value.len to two times the array length of the int16 data points.   

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Well, 'len' is in bytes (because bytes is the only thing the transport layer cares about at this point). And since each element of an int16 array is 2 bytes, you need to double the length.

0 Likes