lightaprs / LightAPRS-1.0

Arduino based APRS Tracker
GNU General Public License v3.0
92 stars 46 forks source link

Possible watchdog timer trigger causing repeated resets #11

Closed maqifrnswa closed 3 years ago

maqifrnswa commented 3 years ago

On a recent launch, the lightAPRS worked well for 170 packets, then it reset itself, would properly send 5 telemtry packets, then reset itself again. That repeated about 10 times, then it got stuck in a reset loop. It repeatedly reset, send the status message, do one BeaconWait, then reset again.

As a note, the BeaconWait was set to 30 seconds in this flight.

Looking through the code, I was trying to find places where something would hang, causing this loop by triggering the wdt, and found this line:

https://github.com/lightaprs/LightAPRS-1.0/blob/9b0f1af380108ee7d9d80d3217879490f694b6df/LightAPRS-hab/LightAPRS-hab.ino#L408

Maybe put a timeout check in that while loop too? Unfortunately we can't tell what exactly caused it, but this is the only spot I found so far where there could be an undetermined wait time > 8s.

maqifrnswa commented 3 years ago

This line too has a loop without a timeout

https://github.com/lightaprs/LightAPRS-1.0/blob/9b0f1af380108ee7d9d80d3217879490f694b6df/LightAPRS-hab/LightAPRS-hab.ino#L558

maqifrnswa commented 3 years ago

After testing, I think it was a battery issue. Sorry for the noise, closing