Regular reboot (or watchdog) for Swan

Hi All,

I have a few Blues devices with Swan boards set up to monitor battery voltage, charging and signal regularly and display indicator LEDs according to the status. I am trying to run them in continuous mode so they respond quickly to user commands.

When in continuous mode, they call in every few hours with their basic status. If charging power is lost they call in immediately and the system raises an alert.

The problem is that they run fine for about 40 hours and then go unresponsive, not calling home or responding to notes. I am trying to find the cause of this problem.

As an interim solution, is there a way to ask the Swan to reboot itself, say, daily, from software? Or is there a software watchdog timer available?

Thanks in advance,

Rob

Hi,

I have been using a watchdog timer in my project (card Requests - API Reference - Blues Developers) and it is a simple card.attn request:

      J *req = notecard.newRequest("card.attn");
      JAddStringToObject(req, "mode", "watchdog");
      JAddNumberToObject(req, "seconds", sensorInterval * 5);
      notecard.sendRequest(req);

I also know there are reserved environment variables you can use to restart the host every specified number of hours: Understanding Environment Variables - Blues Developers

You do need to connect the Notecard’s attn pin to the Swan’s EN pin for these to work, though.

I hope this helps!

1 Like

Hi. Thanks for the reply. I will be wiring up the Attn pin in future. However, my devices are on different continents. I will think of something.

Rob

2 Likes