Hello,
I have come across lots of information on the forum concerning data throughput and have not had much luck fixing my firmware. My goal is to transmit a 54 byte characteristic in 18 byte segments.
Background:
My firmware is based off of SimpleBLEPeripheral. It uses performPeriodicTask to collect data and send it to an iOS device. The function setParameter is called on the profile object, which calls GATTServApp_ProcessCharCfg. This triggers the ReadAttrCB which is my last contact with the data before it is sent to the iOS device. An iOS device subscribes to the characteristic's updates. Right now we are only using the notify operation. Do we have to use the read one instead?
Offset > 0
I have come across the fixes for the offset which are already implemented in my firmware. This is not the issue as offset is always 0 in my CB.
Solution Query:
I am wondering if there is a function that can be used to replace GATTServApp_ProcessCharCfg which will allow me to send a larger characteristic (54 bytes). If you can suggest a solution, please let me know where to place it in the simpleBLEPeripheral application.
Attempt 1:
I have not had any luck with GATT_WriteLongCharValue with the following code. I suspect I need to have a better way of finding the connHandle, but I am unsure of where I am first given access to the connHandle. I have tried to extract it from my Attribute Table with no luck. I am using INVALID_TASK_ID because the legacy code I was provided works with this option in GATTServApp_ProcessCharCfg.
gattPrepareWriteReq_t writeReq; writeReq.handle = 0; writeReq.len = IMU_CHAR_LEN; // 54 writeReq.offset = 0; writeReq.pValue = IMU_Char_Val; // array of 54 bytes GATT_WriteLongCharValue(0x00, &writeReq, INVALID_TASK_ID);
2:
I have also tried setting up a larger characteristic value and sending the data with GATTServApp_ProcessCharCfg. This will send the first 18 bytes only. My ideal solution would modify my call to GATTServApp_ProcessCharCfg in a way that sends the larger characteristic.
Thanks for any help you may offer,
Mark
p.s.
the error I get back from GATT_WriteLongCharValue is blePending