Hi Ti,
我自定义的一个notification char value 长度是244个bytes,244是最长长度,我send notification时,不一定有244个byte,但是我通过SetParameter->GATTServApp_ProcessCharCfg调用sensor notification,发现当我传送数据长度不到244的时候,居然还是发送244bytes,所以请教下,是否有别的方式发送特定长度的notification?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Ti,
我自定义的一个notification char value 长度是244个bytes,244是最长长度,我send notification时,不一定有244个byte,但是我通过SetParameter->GATTServApp_ProcessCharCfg调用sensor notification,发现当我传送数据长度不到244的时候,居然还是发送244bytes,所以请教下,是否有别的方式发送特定长度的notification?
// See if Notification has been enabled
GATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE, simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ), INVALID_TASK_ID, simpleProfile_ReadAttrCB );
这个函数根本没有发送数据的len,而是默认发送属性value 的data len,即开始定义多长就多长。这有点奇怪,比如我定义的时候一般设置宽度长些,实际发送的时候不会完全填满发送