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.

GATT long char write issue

Other Parts Discussed in Thread: CC2541

Hello,

I am using BLE stack 1.3 in CC2541.

From my central , i want to write 100 bytes to peripheral characteristic

using long write.

following is my code :

gattPrepareWriteReq_t msg;

msg.handle = ReqCharHandle;
msg.len = 54;
msg.offset = 0;

msg.pValue = osal_mem_alloc(msg.len); 


for ( i = 0; i<100; i++ )
{
SL_Command[i] = i;
}

memcpy(&msg.pValue[0], &SL_Command[0], msg.len);

GATT_WriteLongCharValue( 0x0000, &msg, simpleBLETaskId );

In this Prepare write request should come 3 times but when i checked in

BT sniffer it comes only 2 times.

I checked the maximum value of "GATT_MAX_NUM_PREPARE_WRITES"

and it is 5.

Regards,

Smitesh Mali