1

The device connects to IOT cloud fine and transmits the data for days and sometimes even weeks, but then it will stop transmitting for apparently no reason. On the IOT cloud dashboard the device is still listed as online, but no new data comes in. The Arduino IOT cloud library uses MQTT to communicate.

The data is set to transmit every 30 min.

It should be noted that the device is being powered with a usb cable connected to a generator. I have heard the MKR GSM not working correctly when not connected to a battery, but previously I have had it work fine connected to a wall plug via usb.

It is also in an area that is currently exceeding 40 degrees Celcius.

Any ideas?

1 Answer 1

1

One thing that could have helped someone answer was the info on what the situation was when you saw no data. i.e, was the Arduino still functioning (i.e, perhaps you had code that blinked the LED and that was still working) ? Was the modem still functioning (i.e, was still responding to the Arduino) ?

Some areas to look into: Find a way to troubleshoot it. Is it the Arduino, the modem or the connection ?

With some generators come brownouts. That can cause strange conditions in some devices where they latch up in certain states and stop working. We even had a device which would latch up in a way where it would overheat and melt. Perhaps add some brownout detection circuitry to know if this had happened. Keep in mind that the Arduino may react differently to brownouts compared to the modem. If brownouts are happening, you may want to proactively power cycle.

Some cell data providers silently cut out long TCP connections, without letting the ends know. In this case, it may help to add code that reconnects the MQTT client to your server every hour or so.

It is also possible that you're hitting a bug in the modem itself. Update the firmware. Can you power cycle it or reset it every x hours from the Arduino ?

Maybe a bug (integer overflow?) in the Arduino code ?

Others may have more ideas.

1
  • Thanks for the advice. I am going to set up a piece of code to blink an LED to see if it is still running in the loop. I think the IOT cloud library does reconnect since on the dashboard of my data provider I can see that there was multiple sessions. I have, however, thought of putting in the code either an automatic reset or a reset that can be triggered on the IoT cloud dashboard. Commented Jul 15, 2021 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.