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.

BLE自定义的 Characteristic.Value最长能有多长?



TI 工程师

你好,关于BLE的Peripheral例程中Characteristic.Value的长度有个问题。

按照论坛另一篇帖子中的解答,SIMPLEPROFILE_CHAR_LEN最大应该是20字节。但是我自己在编程时发现,当我设置为20时,在Central端利用simpleBLEGATTDiscoveryEvent()无法获取CHAR的handle,而保持其它参数不变,将SIMPLEPROFILE_CHAR_LEN设置为19时却能获得正确的handle。这是为何?

设置为20的时候,利用BTOOL往CHAR读数据时,显示ATTR_NOT_FOUNT错误。写数据时显示,INVALID_SIZE错误。改为19时又能全部成功执行,实在是找不到原因了。