I have read and re-read all of the post dealing with GSM hanging on this forum. I have made the programming changes in the library that help keep it from hanging, but after running for 2 days mine just hung again. I want to use a watchdog or similar technique to reset it if it hangs. The problem is that when I make the GSM call, it may take 30-40 seconds to make a connection, so the 8 second watchdog timer doesn't work well there. So I think I have two options that I would like opinoins on:
Place a watchdog timer in the GSM library targeting the problematic code. I am not sure if it's even possible to put one in a library.
Use another technique to call the GSM begin command (which is the one that hangs), but continue to monitor it from the main loop and it if doesn't return anything in say 2 minutes or so, reboot the entire device. I have read where someone was doing something similar to this, but there are no details given. Any thoughts on how this might could be pulled off?
Thank you for any help you could provide.