Title: USB Watchdog-Control-Linux v1.1 Post by: delevic on June 10, 2020, 09:02:29 PM I wrote a program to control Watchdog in Linux, and I believe it will come in handy for anyone who mine in Linux.
https://live.staticflickr.com/65535/49992888101_0ee6e48061_w.jpg In version 1.1 I added support for new types of watchdogs, v3.2 (black) and v5.0 (red): https://live.staticflickr.com/65535/49989069853_e97edd217b_m.jpghttps://live.staticflickr.com/65535/49989487151_89509602e0_m.jpghttps://live.staticflickr.com/65535/49989732742_085703d72d_m.jpg Installation instruction: https://www.youtube.com/watch?v=VN_Kk9RTEpA&t=3s Download link: https://github.com/delevic/USB-Wathchdog-Control-Linux Title: Re: USB Watchdog-Control-Linux v1.1 Post by: ManicMiner276 on February 17, 2021, 02:21:48 PM Hi,
I use a easier way how to use this watchdog under Linux. The device is just an countdown timer, then triggers a relay connected to the RESET or POWER switch. Works with the two relay USB watchdog - first picture on previous post (don't have another to test). I do it that way: First make sure, it there is a kernel module: #ls /lib/modules/`uname -r`/kernel/drivers/watchdog/pcwd_usb.ko then load the module (if is not louaded previously): #/sbin/modprobe pcwd_usb test, if it is loaded: #lsmod | grep pcwd_usb for automatic module loading I did: #echo 'pcwd_usb' >> /etc/modules If I have the module loaded, I should have a /dev/ttyUSB0 device available for use. For watchdog function I use crontab: #crontab -e add the line: * * * * * echo -n -e "\xd" > /dev/ttyUSB0 That sets every minute a counter for 130s. If the crontab stops (PC hangs), then after 130s the trigger connected to the RESET switch restarts the PC. The "\xd" is number in HEX, so 13 in DEC x 10sec is 130sec countdown. And that's all :-) |