How can I get real client write data length?

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

cross mob
wewu_1392881
Level 3
Level 3
First like received First like given Welcome!

After i register the call back function for client write as following:

legattdb_regWriteHandleCb((LEGATTDB_WRITE_CB)hello_sensor_write_handler);

and in the call back function as following code:

int hello_sensor_write_handler(LEGATTDB_ENTRY_HDR *p)

{

    UINT8  writtenbyte;

    UINT16 handle   = legattdb_getHandle(p);

    int    len      = legattdb_getAttrValueLen(p);

    UINT8  *attrPtr = legattdb_getAttrValue(p);

}

The "len" value got back always equals the characteristic defined value length, not the actual data length sent from the server, is there any suggestion??

0 Likes
1 Solution
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received
0 Likes
1 Reply
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Not sure if this thread helps: Characteristic of variable-length write

0 Likes