balena-io-hardware / fin-coprocessorFirmata-sw

firmata firmware for the BGM111 co-processor on the balenaFin
https://balena.io/fin
Apache License 2.0
11 stars 6 forks source link

Coprocessor based watchdog timer #18

Open rohfle opened 4 years ago

rohfle commented 4 years ago

Why

IoT gives the ability to connect devices in very remote places to an internet based system. Restarting such remote devices is an expensive and time consuming process that is pretty much impossible. Ideally, devices should be reliable enough to avoid getting into unresponsive states. However on several occasions, devices have stopped working until they have been restarted. These issues are impossible to debug due to being sporadic combined with lack of debug information.

In this unideal situation, a watchdog timer implemented in the coprocessor could be useful to bring the system back online.

Proposed implementation

A resettable countdown timer combined with some sort of internal variable that shows if the watchdog has been triggered. Configuration could be done by custom SYSEX firmata commands.

When the watchdog reaches zero, the coprocessor will disable power to the system, then reenable after a few seconds.

Foreseen issues

References

https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/23/watchdog_on_bgm111-SuaX

ntzovanis commented 4 years ago

@Bucknalla @anujdeshpande here's an interesting request for expanding the firmata capabilities.

CesarChavezRico commented 4 years ago

Interested in this feature. Do you have an ETA for version 2.0.0?

ntzovanis commented 4 years ago

cc @Bucknalla since I know you were looking into this.

Bucknalla commented 4 years ago

@CesarChavezRico we ended up bumping this to the next release. This is in the pipeline, so will be coming :)

CesarChavezRico commented 4 years ago

@Bucknalla thanks for the update. Looking forward to it.

For a little background now I am using a dedicated container to check other containers' health and command resets (power cycles) via de coprocessor when issues are detected. I am convinced that having the watchdog functionality implemented in the coprocessor is a much cleaner and robust solution.

jellyfish-bot commented 3 years ago

[anujdeshpande] This issue has attached support thread https://jel.ly.fish/87d11b2d-796b-4846-97bd-f76f3c310ef8

rickhewes commented 3 years ago

Any updates on this feature? Jelly fish requires a log in....