@titi I have two gateways running:
a) LoPy with by and by updated firmware (1.20.0.rc7 at the moment), conneted to Loriot.io, but before to TTN
b) IMST IC880a with RPi3, connected to TTN
The LoPy runs well 2-4 weeks in a row and sometimes stops. I did not look for the reason, but most likely it's power fluctuations. I enabled the internal Watchdog and to gc() in the main loop. For better robustness, I should add an external Watchdog. In general I have the impression that the LoPy is more robust than the LoPy4. Maybe there is still a rare race condition between SPI RAM and flash.
The IC880A/RPi combo runs uninterrupted for a year now. Never stops, always serves messages well.
I should however mention that the traffic is extremely low. Besides the ones I create, I see about 1-2 message per day with proper CRC, and about 10 with bad CRC. The latter may be just noise.
@invalidname Hi. Look I can;t be certain. There are a bunch of reasons intial connects seems to fail, so I am aggressive with watchdog, so I wouldn't see anything hang for more than 15seconds ;-) But I do see WDT triggered whilst performing an RTC sync occasionally.
Hey, have you solve your problem? I think I'm facing the same one, with the FiPy using dead socket. Sometimes it crashes, but sometimes I'm just stuck in a loop of "unreachable port" for instance. It happens for the RTC but also the MQTT.
@hanselsen Unless you save the LoRa state, you can't send anything until you have successfully joined after a reset.
When/how do you check has_joined? It can take a few seconds for the join to be successful, so you can't check right after the join call, you usually need to run a loop that checks and sleeps until joined.
Beyond that, do you see the join on the network side?
I've done some further troubleshooting and tried the following methods to get it to send consistently:
Change QoS to 1. I found that I still encountered the same issue before where it got stuck after a random amount of time. This also delayed each additional message by about 1 - 5 seconds so I removed the time.sleep(0.2)
Wait for ping message after every 10 publishes. I found that this also ended up getting stuck as well. Again I removed the sleep cause the delay was between 1-5 seconds on the ping.
Ping message after every publish. This didn't suffer the problem of freezing during the hour that I tried. I did find however that the duration for it to get a successful ping took longer as time went on. From about 1-3 seconds average to about 7-10 seconds average after about an hour.
Connect and disconnect the client after every publish. This seems to working the best, it hasn't frozen within the 30 minutes I've been testing it and each message is taking 3-5 seconds to send to the broker.
If anyone has any further suggestions it would be appreciated.