Skip to content

Commit 7d8dc43

Browse files
committed
Reboot after dmesg wifi error
1 parent b1686b5 commit 7d8dc43

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

wifi-watchdog.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
#!/bin/sh
22

3-
#echo "begin watchdog" > /home/mirte/test.txt
4-
5-
# echo "wifi watchdog service restarted" > /dev/kmsg
6-
7-
# sub="xradio"
8-
93
dmesg --follow | while read -r line; do
10-
if echo "$line" | grep -q "xradio WSM-ERR: CMD timeout!"; then
4+
# OrangePi Zero 1: xradio WSM-ERR: CMD timeout!
5+
# OrangePi Zero 2: WCN_ERR: dumpmem_rx_callback open
6+
if echo "$line" | grep -qE "xradio WSM-ERR: CMD timeout!|WCN_ERR: dumpmem_rx_callback open"; then
117
echo "CRASH! REBOOT!" >/dev/kmsg
12-
echo "$line" >>./test.txt
13-
# reboot -f now
8+
echo "$line" >> /home/mirte/wifi-watchdog.err
149
echo b >/proc/sysrq-trigger
1510
fi
1611
done

0 commit comments

Comments
 (0)