More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

DIY USB Watchdog using Arduino Nano

Hi - I have tons of Arduino Nano’s lying around and would like to make a USB watchdog that is compatible with HiveOS. Has anyone attempted to do this yet? It seems like it should be relatively straight forward to program the Arduino if I knew what HiveOS pings to the USB device and what it expects sent back. Any ideas? Hopefully there is some code available that I can use as a starting point. Thanks!

If you search arduino Linux watchdog on google and check out some of the GitHub results there should be plenty of results to get you started, but for what its worth a cheap hiveos compatible usb watchdog is like $13 on Amazon.

Thanks. Yup, I know they are cheaply available. I just want to do it as a project and then maybe program in some custom features when the watchdog is tripped.

Looking at the file /hive/opt/qinheng/hl340 it seems for Arduino Nano, the ping that get’s sent is:

# Arduino nano
mode="Arduino nano watchdog"
ping="r90p90"
reset="r2p90"

So I guess the logic on Arduino would be:

  • If receive ping ‘r90p90’ reset the internal timeout.
  • If not receive a ping ‘r90p90’ within internal timeout then reset computer.
  • If receive reset ‘r2p90’ then reset the computer immediately.

I’m not sure what the r90p90 or r2p90 sent by HiveOS means, maybe 90 seconds timeout for watchdog, and r = reset p = power cycle off then on?

It doesn’t look like the USB watchdog has to send any data back but not totally sure.

This topic was automatically closed 416 days after the last reply. New replies are no longer allowed.