Quetion: About delay before sending data in Cellular Interface

We are porting the Cellular Interface.
I found out the delay parameter interDelayMS in the function _Cellular_DataSendWithTimeoutDelayRaw in cellular_pkthandler.c.
ttps://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/0c6eae034079360dca9839438cc4b12b6100d976/source/cellular_pkthandler.c#L306

According to the source comments, it seems like some driver may require delay before sending data, but I can’t understand this reason and use case.
Could you tell me why and what use case is required delay in order to set the optimal delay for characteristics of our driver?


And more, do delay really occur before sending data?
I think delay occurs after sending data, which is executed by the following code.
ttps://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/0c6eae034079360dca9839438cc4b12b6100d976/source/cellular_pkthandler.c#L296

Thank you.

@ShunichiroNakamura
Thank you for reporting this issue. We will look into this problem and reply in this thread as soon as possible.

@ShunichiroNakamura

Sorry for late reply. The interDelayMS is designed to adapt the behavior of various cellular modem.

For example, SARA-R4 +USOWR AT command requires to wait for a minimum of 50 ms before sending data after the @ prompt reception.

Thank you for pointing out that the delay should occur before sending data. We are creating a PR to fix this problem. We would also like to invite you to take a look and feedback.

@Fresh
Thank you for providing a concrete example. I understood why this delay is required.
It seems the fix in PR is nice. It’s same as my expectation.

1 Like