I’m using the OTA library in combination with the FreeRTOS cellular interface. I’m running it just as provided in the examples. The continuous cellular connection and the OTA client pings are a real power drain in my battery powered application.
The modem I’m using, the uBlox SARA-R4, features the power saving eDRX function. Can anyone here elaborate on a high level how this should be used in combination with the OTA library? Are there any examples?
However before calling prvSocketDisconnect() you should also disconnect the MQTT connection. You can call MQTTAgent_Disconnect as a thread safe API to disconnect ongoing MQTT connection. Once MQTT Agent comes out of the command loop you can then disconnect the underlying socket connection.