Tool/software: Code Composer Studio
I'd like to write to a characteristic as in the SPPLE example (I took that example code and modified it for my own purposes) using the function call
Result = GATT_Write_Without_Response_Request(
BluetoothStackID, ConnectionID,
DeviceInfo_->ClientInfo.Rx_Characteristic,
(Word_t) DataCount,
&SPPLEBufferNotify[TransmitIndex]);
However, when I send too much data I get the return value: BTPS_ERROR_INSUFFICIENT_BUFFER_SPACE. So, I'm sending too many packets obviously. The Bluetopia documentation says that the user has to wait for the callback etGATT_Connection_Device_Buffer_Empty to be called before sending more data. So I expected to get this callback whenever the queue becomes empty but it seems like that this callback is never called, so the question is why? I also expect this callback if I don't have an overflow, if I send, let's say, just 50 bytes, but this is not the case.
First, I did everything in the etGATT_Server_Write_Request callback. But then I thought that the etGATT_Connection_Device_Buffer_Empty callback will probably be missed if I stick there so I just set a flag to execute the sending process in the main file where a scheduler is set up. However, etGATT_Connection_Device_Buffer_Empty was called neither. Also, as soon as the error BTPS_ERROR_INSUFFICIENT_BUFFER_SPACE triggers, it keeps returning that error, so that I have to restart the device, why does it get stuck there?
Thanks in advance
Pascale