I have everything working now in my application and did an 12+ hour run last night and the script is collecting the data and pushing to the cloud on the schedule I set.
I have a call to ‘cm data connect &’ through a python subprocess call in my startup script and it works as expected and everything comes up and runs great for a while.
A new problem I have noticed that also has happened occasionally to me during testing is that the system will be connected. ‘cm data’ shows the IP address, gateway, dns1, dns2, but the name resolution does not work. Based on my mqtt reports, it appears to fix itself eventually but may take 2+ hours to do so before reporting starts again.
Python script throws: socket.gaierror: [Errno -3] Temporary failure in name resolution
From manual testing: ntpdate -q ntpserver => also throws name server error
So the system thinks it is connected, but the dns resolution does not work.
If I manually run ‘cm data disconnect’, wait, ‘cm data connect’, then it will re-connect and run for a while, but eventually might happen again.
I have seen some posts saying they had connection issues, but a search for ‘name resolution’ both on the Sierra forums and google don’t turn up many solutions.
The pyRTE authors (python for Legato written by Sierra developers in Australia) had written an app that would monitor the sent or received data on the rmnet_data0 interface, if it doesn’t change in X seconds, reboot the modem. That app is not open source, but I could probably re-create the functionality if that is the only way.
-
Are other people having this issue?
-
Is the correct course of action a reboot or is issuing ‘cm data disconnect’, wait, ‘cm data connect’ acceptable?
-
I am reporting every 15 minutes. Would I be better off just calling ‘cm data connect’ directly before the MQTT push, and then ‘cm data disconnect’ directly after?
I have not been able to quantify how much data is used just maintain the connection indefinitely (cm data connect called at startup) vs a connect when needed approach (#3) above.
At this point, I don’t plan to have the device go to deep sleep (ULPM) at this point since they want 15 minute reports.
Thanks