I'm trying to troubleshoot a headless RPI Zero W2 python program that accepts user input via input() over ssh. My python program logs wifi signal strength and performs an iperf upload/download test to a local iperf server instance.
As I move the rpiz around my house and probably across mesh boundaries (where I have a combination of 5G/2.5G zones), I get into situations where SSH doesn't recover and I have to reboot losing my test results.
I have tried to mimic the guidance on this excellent post by using a requested IP rather than static: How do I set up networking/WiFi/static IP address on Raspbian/Raspberry Pi OS? (which discourages static IP and suggests to request one rather)
As I look at journalctl for my last boot prior to the recovery reboot, it appears what is happening is at around 11:05 in the journal. Carrier is lost and dhcpcd tries to recover by requesting my chosen ip (192.168.1.20). Apparently DHCP does not respond and Avahi takes over and issues a 4ll ip address (not sure what this is -- in the 169 address range). I am not certain but I think my wifi mesh systems is relying on my cable modem (Spectrum) for issuing IPs.
AS I'm building an embedded application, I need this wifi connection to be very robust and recover quickly if it loses carrier. I will not use any other interface than wlan0. I'm currently on Bullseye and have done fairly light changes to defaults mostly in /etc/dhcpcd.conf with the requested IP:
interface wlan0
request 192.168.1.20
I think I probably installed Avahi to get hostname simplicity on my ssh connects but I'm now wondering if this is part of my problem.
Here is the journal which includes the successful part of the session (start through 11:05 and then the attempted recovery). What I see is that I lose synch with SSH, can't provide user input, and the program gets lost and doesn't recover presumably in a while loop expecting input().
See *** starting at 11:05 for where problem begins:
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Found user 'avahi' (UID 108) and group 'avahi' (GID 113).
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Successfully dropped root privileges.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: avahi-daemon 0.8 starting up.
Sep 11 10:45:46 rpiz2w-lee dhcpcd[332]: dev: loaded udev
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Successfully called chroot().
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Successfully dropped remaining capabilities.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface lo.IPv6 with address ::1.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: New relevant interface lo.IPv6 for mDNS.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: New relevant interface lo.IPv4 for mDNS.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Network interface enumeration completed.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Registering new address record for ::1 on lo.*.
Sep 11 10:45:46 rpiz2w-lee avahi-daemon[322]: Registering new address record for 127.0.0.1 on lo.IPv4.
Sep 11 10:45:46 rpiz2w-lee dhcpcd[393]: wlan0: starting wpa_supplicant
Sep 11 10:45:46 rpiz2w-lee dhcpcd-run-hooks[420]: wlan0: starting wpa_supplicant
Sep 11 10:45:47 rpiz2w-lee dhcpcd[332]: wlan0: connected to Access Point `'
Sep 11 10:45:47 rpiz2w-lee dhcpcd[332]: wlan0: waiting for carrier
Sep 11 10:45:47 rpiz2w-lee avahi-daemon[322]: Server startup complete. Host name is rpiz2w-lee.local. Local service cookie is 2069009725.
Sep 11 10:46:17 rpiz2w-lee dhcpcd[332]: timed out
Sep 11 10:46:17 rpiz2w-lee dhcpcd[332]: timed out
Sep 11 10:46:17 rpiz2w-lee dhcpcd[332]: forked to background, child pid 505
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: wlan0: carrier acquired
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: wlan0: connected to Access Point `Prevost Beach'
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: DUID 00:01:00:01:29:dd:c0:40:e4:5f:01:5b:ed:ed
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: wlan0: IAID 01:5b:ed:ed
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: wlan0: adding address fe80::5712:ce70:583a:9bee
Sep 11 10:51:48 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:51:48 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv6 for mDNS.
Sep 11 10:51:48 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 10:51:48 rpiz2w-lee dhcpcd[505]: wlan0: soliciting an IPv6 router
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: soliciting a DHCP lease (requesting 192.168.1.20)
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: Router Advertisement from fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:51:49 rpiz2w-lee kernel: ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instead
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: adding address 2603:6081:7343:3d10:d311:770e:8de1:d193/64
Sep 11 10:51:49 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 2603:6081:7343:3d10::/64
Sep 11 10:51:49 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address 2603:6081:7343:3d10:d311:770e:8de1:d193.
Sep 11 10:51:49 rpiz2w-lee avahi-daemon[322]: Registering new address record for 2603:6081:7343:3d10:d311:770e:8de1:d193 on wlan0.*.
Sep 11 10:51:49 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for fe80::5712:ce70:583a:9bee on wlan0.
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: confirming prior DHCPv6 lease
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: adding default route via fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: REPLY6 received from fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: adding address 2603:6081:7343:3d10::19b9/128
Sep 11 10:51:49 rpiz2w-lee dhcpcd[505]: wlan0: renew in 302400, rebind in 529200, expire in 604800 seconds
Sep 11 10:51:49 rpiz2w-lee avahi-daemon[322]: Registering new address record for 2603:6081:7343:3d10::19b9 on wlan0.*.
Sep 11 10:51:52 rpiz2w-lee dhcpcd[505]: wlan0: offered 192.168.1.20 from 192.168.1.1
Sep 11 10:51:52 rpiz2w-lee dhcpcd[505]: wlan0: probing address 192.168.1.20/24
Sep 11 10:51:54 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:51:54 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:51:58 rpiz2w-lee dhcpcd[505]: wlan0: leased 192.168.1.20 for 43200 seconds
Sep 11 10:51:58 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.20.
Sep 11 10:51:58 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv4 for mDNS.
Sep 11 10:51:58 rpiz2w-lee avahi-daemon[322]: Registering new address record for 192.168.1.20 on wlan0.IPv4.
Sep 11 10:51:58 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 192.168.1.0/24
Sep 11 10:51:58 rpiz2w-lee dhcpcd[505]: wlan0: adding default route via 192.168.1.1
Sep 11 10:51:59 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:51:59 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: fe80::fa5b:3bff:fe7d:29f8 is unreachable
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: carrier lost
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting address 2603:6081:7343:3d10::19b9/128
Sep 11 10:54:19 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 2603:6081:7343:3d10::19b9 on wlan0.
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting address 2603:6081:7343:3d10:d311:770e:8de1:d193/64
Sep 11 10:54:19 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 2603:6081:7343:3d10:d311:770e:8de1:d193 on wlan0.
Sep 11 10:54:19 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address 2603:6081:7343:3d10:d311:770e:8de1:d193.
Sep 11 10:54:19 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:54:19 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting route to 2603:6081:7343:3d10::/64
Sep 11 10:54:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting default route via fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:54:20 rpiz2w-lee dhcpcd[505]: wlan0: deleting address fe80::5712:ce70:583a:9bee
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for fe80::5712:ce70:583a:9bee on wlan0.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv6 no longer relevant for mDNS.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 192.168.1.20 on wlan0.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.20.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv4 no longer relevant for mDNS.
Sep 11 10:54:20 rpiz2w-lee dhcpcd[505]: wlan0: deleting route to 192.168.1.0/24
Sep 11 10:54:20 rpiz2w-lee dhcpcd[505]: wlan0: deleting default route via 192.168.1.1
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:54:20 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: carrier acquired
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: IAID 01:5b:ed:ed
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: adding address fe80::5712:ce70:583a:9bee
Sep 11 10:56:47 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:56:47 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv6 for mDNS.
Sep 11 10:56:47 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: soliciting an IPv6 router
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: soliciting a DHCP lease (requesting 192.168.1.20)
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: offered 192.168.1.20 from 192.168.1.1
Sep 11 10:56:47 rpiz2w-lee dhcpcd[505]: wlan0: probing address 192.168.1.20/24
Sep 11 10:56:51 rpiz2w-lee dhcpcd[505]: wlan0: Router Advertisement from fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:56:51 rpiz2w-lee dhcpcd[505]: wlan0: adding address 2603:6081:7343:3d10:d311:770e:8de1:d193/64
Sep 11 10:56:51 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 10:56:51 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address 2603:6081:7343:3d10:d311:770e:8de1:d193.
Sep 11 10:56:51 rpiz2w-lee avahi-daemon[322]: Registering new address record for 2603:6081:7343:3d10:d311:770e:8de1:d193 on wlan0.*.
Sep 11 10:56:51 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for fe80::5712:ce70:583a:9bee on wlan0.
Sep 11 10:56:51 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 2603:6081:7343:3d10::/64
Sep 11 10:56:51 rpiz2w-lee dhcpcd[505]: wlan0: confirming prior DHCPv6 lease
Sep 11 10:56:51 rpiz2w-lee dhcpcd[505]: wlan0: adding default route via fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: REPLY6 received from fe80::fa5b:3bff:fe7d:29f8
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: adding address 2603:6081:7343:3d10::19b9/128
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: Registering new address record for 2603:6081:7343:3d10::19b9 on wlan0.*.
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: renew in 302400, rebind in 529200, expire in 604800 seconds
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: leased 192.168.1.20 for 43200 seconds
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.20.
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv4 for mDNS.
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 192.168.1.0/24
Sep 11 10:56:52 rpiz2w-lee dhcpcd[505]: wlan0: adding default route via 192.168.1.1
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: Registering new address record for 192.168.1.20 on wlan0.IPv4.
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:56:52 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:56:56 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 10:56:56 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 10:57:09 rpiz2w-lee dhcpcd[505]: wlan0: Router Advertisement from fe80::fa5b:3bff:fe7d:29f8
***Sep 11 11:05:18 rpiz2w-lee dhcpcd[505]: wlan0: carrier lost***
Sep 11 11:05:18 rpiz2w-lee dhcpcd[505]: wlan0: deleting address 2603:6081:7343:3d10::19b9/128
Sep 11 11:05:18 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 2603:6081:7343:3d10::19b9 on wlan0.
Sep 11 11:05:18 rpiz2w-lee dhcpcd[505]: wlan0: deleting address 2603:6081:7343:3d10:d311:770e:8de1:d193/64
Sep 11 11:05:18 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 2603:6081:7343:3d10:d311:770e:8de1:d193 on wlan0.
Sep 11 11:05:18 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address 2603:6081:7343:3d10:d311:770e:8de1:d193.
Sep 11 11:05:18 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 11:05:18 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 11:05:18 rpiz2w-lee dhcpcd[505]: wlan0: deleting route to 2603:6081:7343:3d10::/64
Sep 11 11:05:18 rpiz2w-lee dhcpcd[505]: wlan0: deleting default route via fe80::fa5b:3bff:fe7d:29f8
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting address fe80::5712:ce70:583a:9bee
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for fe80::5712:ce70:583a:9bee on wlan0.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv6 no longer relevant for mDNS.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 192.168.1.20 on wlan0.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.20.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv4 no longer relevant for mDNS.
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting route to 192.168.1.0/24
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: deleting default route via 192.168.1.1
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Got SIGHUP, reloading.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: No service file found in /etc/avahi/services.
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: carrier acquired
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: IAID 01:5b:ed:ed
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: adding address fe80::5712:ce70:583a:9bee
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv6 for mDNS.
Sep 11 11:05:19 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 11:05:19 rpiz2w-lee dhcpcd[505]: wlan0: soliciting a DHCP lease (requesting 192.168.1.20)
Sep 11 11:05:20 rpiz2w-lee dhcpcd[505]: wlan0: soliciting an IPv6 router
Sep 11 11:05:24 rpiz2w-lee dhcpcd[505]: wlan0: probing for an IPv4LL address
Sep 11 11:05:29 rpiz2w-lee dhcpcd[505]: wlan0: using IPv4LL address 169.254.97.78
Sep 11 11:05:29 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv4 with address 169.254.97.78.
Sep 11 11:05:29 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv4 for mDNS.
Sep 11 11:05:29 rpiz2w-lee avahi-daemon[322]: Registering new address record for 169.254.97.78 on wlan0.IPv4.
Sep 11 11:05:29 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 169.254.0.0/16
Sep 11 11:05:29 rpiz2w-lee dhcpcd[505]: wlan0: adding default route
Sep 11 11:05:35 rpiz2w-lee dhcpcd[505]: wlan0: no IPv6 Routers available
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: carrier lost
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: deleting address fe80::5712:ce70:583a:9bee
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for fe80::5712:ce70:583a:9bee on wlan0.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv6 no longer relevant for mDNS.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Withdrawing address record for 169.254.97.78 on wlan0.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 169.254.97.78.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Interface wlan0.IPv4 no longer relevant for mDNS.
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: deleting route to 169.254.0.0/16
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: deleting default route
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: carrier acquired
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: IAID 01:5b:ed:ed
Sep 11 11:12:22 rpiz2w-lee dhcpcd[505]: wlan0: adding address fe80::5712:ce70:583a:9bee
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::5712:ce70:583a:9bee.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv6 for mDNS.
Sep 11 11:12:22 rpiz2w-lee avahi-daemon[322]: Registering new address record for fe80::5712:ce70:583a:9bee on wlan0.*.
Sep 11 11:12:23 rpiz2w-lee dhcpcd[505]: wlan0: soliciting an IPv6 router
Sep 11 11:12:23 rpiz2w-lee dhcpcd[505]: wlan0: soliciting a DHCP lease (requesting 192.168.1.20)
Sep 11 11:12:28 rpiz2w-lee dhcpcd[505]: wlan0: probing for an IPv4LL address
Sep 11 11:12:33 rpiz2w-lee dhcpcd[505]: wlan0: using IPv4LL address 169.254.97.78
Sep 11 11:12:33 rpiz2w-lee avahi-daemon[322]: Joining mDNS multicast group on interface wlan0.IPv4 with address 169.254.97.78.
Sep 11 11:12:33 rpiz2w-lee avahi-daemon[322]: New relevant interface wlan0.IPv4 for mDNS.
Sep 11 11:12:33 rpiz2w-lee dhcpcd[505]: wlan0: adding route to 169.254.0.0/16
Sep 11 11:12:33 rpiz2w-lee dhcpcd[505]: wlan0: adding default route
Sep 11 11:12:33 rpiz2w-lee avahi-daemon[322]: Registering new address record for 169.254.97.78 on wlan0.IPv4.
Sep 11 11:12:38 rpiz2w-lee dhcpcd[505]: wlan0: no IPv6 Routers available
My current thinking is:
- get rid of Avahi? or remove from systemd?
- Go to static IP
- Add some timeout logic to my keyboard input loop
- Not sure how I avoid it ever trying to assign to the 169.254 route. I really want it to recover on my wifi network as soon as it gets back into range. Not sure how to do that?
sudo iwcontrol wlan0 power off
– Dougie Sep 11 '22 at 16:51iwcontrol wlan0 power off
to /etc/rc.local to get it to run on every boot up. – Dougie Sep 11 '22 at 19:12noipv4ll
todhcpcd.conf
(and probablynoipv6
too, I think this is a pointless complication and your LAN uses IPv4, there's no need to use both for local addressing). I don't think disabling avahi will make any difference but it is easy to try. It is not critical to anything (if you aren't usingraspberry.local
or whatever from other systems on the LAN, or other local hosts by name from mDNS on the pi, it isn't serving any purpose). – goldilocks Sep 11 '22 at 19:28ip a && ip r
) at a minimum.systemctl status dhcpcd
should show status. You have installed other networking tools (which are unnecessary withdhcpcd
). You are running other incompatible network tools (iw
for one). Are you attempting to RUN an application overssh
(if so why)?ssh
times out/disconnects - I just reconnectssh
. – Milliways Sep 12 '22 at 07:23