It seems like the device is not receiving response packet from the peer device within the maximum amount of time. Please ensure the following:
1) Both the central and peripheral devices are in specified range (with in 10 meters).
2) Call CyBleProcessEvents() atleast once in a connection interval both in peripheral as well as central side.
To ensure that there is no fault towards the hardware side, please run any one of the Cypress' code example in your hardware and ensure that this event is not triggered. After doing this test if you are getting the same error please elaborate more about your hardware.
If you are not receiving the same error with the example project, please attach a demo project reproducing the same error so that we can check it at our side.
Thank you for your response. If I understand correctly, the peripheral/server (Sensor where I am seeing the error), is not seeing an expected response from the the central/client (Dongle)?
Here is the basic sequence of the commands.
Note that the sensor and the dongle are our own BLE designs.
This all works very reliably in most cases. Where it fails is when I am sending large amounts of L2CAP packets (streaming sensor data) at the same time. In this case, I see the command gets to the sensor and it executes it, then it sits and times out.
The device is sitting right beside the dongle. I have verified that CyBleProcessEvents() is called every connection interval (10ms). I am using FreeRTOS 10.
I will check with board designer to double check that this unit is using the external antenna.
So, just to clarify, this timeout can occur when the Dongle is not sending a response to the CyBle_GattsWriteRsp message from the sensor?
Client will not allow me to post the code publicly. Where can I put it for you to look at?
More info: Verified hardware is correct. We have good steady L2CAP connection with no drop outs. We have not seen any Attribute write fails except this case when the L2CAP connection is active at high data rates.
New info: Looks like it might be failing due to CyBle_GattsWriteRsp failing with Memory allocation failure. What would cause that?