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.

cc2540主模式如何发送较大的数据



程序 我是按照TI的模板改的,使用了GATT_WriteLongCharValue函数,但是发送的数据从机端只能收到前18位,超过的就是显示0,这个是怎么回事,之前在论坛看见说GATT_WriteLongCharValue函数可以实现自动分包发送,为什么会出现这种情况?希望能有人指导下

程序如下:

uint8 sbpGattWriteString(uint8 *pBuffer, uint16 length)
{

uint8 status;

gattPrepareWriteReq_t req;
req.len = length;
req.handle = simpleBLECharHdl;
req.offset = 0;
req.pValue = (uint8 *)osal_mem_alloc(length);
osal_memset(req.pValue, 0, length); //mem clear
osal_memcpy(req.pValue, pBuffer, length);
status = GATT_WriteLongCharValue(simpleBLEConnHandle,&req,simpleBLETaskId);

return status;

}