Combining the FreeRTOS cellular interface with AWS IoT OTA - behavior on intermittent cellular connectivity


I have ported the OTA windows demo to my platform. I’ve also integrated the FreeRTOS cellular interface in combination with a uBlox SARA-R4 modem.
I’ve been able to perform OTA cellular updates, now I would like to understand how this setup handles intermittent cellular connectivity.
I’m working on a hardware setup that should allow me to attenuate the cellular signal at the push of a button in such a way that the modem loses connectivity in order to simulate different test cases. This is proving harder that expected, ecspecially since a cell tower is located very close to my development workroom. Even with the antenna removed, there still is reception.

Can anyone tell me what the expected behavior is for the OTA demo in combination with the cellular interface when the connection is intermittent?

Do I need to implement something that listens for connection dropped/established call backs from the cellular layer and then call prvSuspendOTA/prvResumeOTA, or is this handled automatically through the existing interface through the functions:



Hello @BaxEDM ,

The OTA Library APIs to be used here are OTA_Suspend and OTA_Resume and prvSuspendOTA/prvResumeOTA are the demo examples. You can refer to the demos and will require to monitor disconnect callback to suspend OTA operations and when connection is established resume from where it was interrupted.

Pleas refer -

Is there some example code that can help me out for setting this up? I’m not sure which cellular callback would be best suited to trigger an OTA_Suspend/OTA_Resume.
Next to that, I’m unsure how the state machine in the cellular interface has been implemented. For example, will it after a connection loss automatically start a network search and re-connect when the network comes into range again?
Another unknown is whether or not I should also suspend/resume the MQTT agent.
If find that handling intermittent connectivity in a robust way is not well documented, yet it is essential to any product which makes use of a cellular connection, so I’m hoping examples exist so that I do not need to come up with my own implementation.