Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tools:raspbian [2023/10/05 02:07] darron [WiFi problems] |
tools:raspbian [2023/10/05 13:16] darron [WiFi problems] |
||
---|---|---|---|
Line 327: | Line 327: | ||
==Keep alive== | ==Keep alive== | ||
- | The Pi4 can both disconnect with wpa_supplicant still running or even crash. | + | Pi4 WiFi can both disconnect with wpa_supplicant still running or crash. |
- | In the former case a script | + | In the former case we can reconnect but in the latter a reboot is required. |
< | < | ||
- | #! /bin/sh | + | #! /bin/bash |
+ | |||
+ | check() { | ||
+ | LOSS=`ping -c 3 -i 1 192.168.0.1 | awk ' | ||
+ | } | ||
while test 1; do | while test 1; do | ||
sleep 30 | sleep 30 | ||
- | | + | |
if test " | if test " | ||
ifdown wlan0 1>/ | ifdown wlan0 1>/ | ||
ifup wlan0 1>/ | ifup wlan0 1>/ | ||
+ | sleep 5 | ||
+ | check | ||
+ | if test " | ||
+ | reboot | ||
+ | fi | ||
fi | fi | ||
done | done |