Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tools:raspbian [2023/10/04 20:33]
darron [WiFi problems]
tools:raspbian [2023/10/05 13:16] (current)
darron [WiFi problems]
Line 270: Line 270:
  
 ===WiFi problems=== ===WiFi problems===
 +
 +==Hotplug==
  
 At least on one setup the WiFi fails to start during boot. It seems that the interface At least on one setup the WiFi fails to start during boot. It seems that the interface
Line 323: Line 325:
 </code> </code>
  
 +==Keep alive==
 +
 +Pi4 WiFi can both disconnect with wpa_supplicant still running or crash.
 +
 +In the former case we can reconnect but in the latter a reboot is required.
 +
 +<code>
 +#! /bin/bash
 +
 +check() {
 +        LOSS=`ping -c 3 -i 1 192.168.0.1 | awk 'match($0, /[0-9]+%/) { print substr($0, RSTART, RLENGTH) }'`
 +}
 +while test 1; do
 +        sleep 30
 +        check
 +        if test "$LOSS" = "100%"; then
 +                ifdown wlan0 1>/dev/mull 2>/dev/null
 +                ifup   wlan0 1>/dev/null 2>/dev/null
 +                sleep 5
 +                check
 +                if test "$LOSS" = "100%"; then
 +                        reboot
 +                fi
 +        fi
 +done
 +</code>
 +
 +Change the IP address to that of your access point or modem.
 === Upgrade === === Upgrade ===