flaky networking on Raspberry Pi Zero

Ask questions about Arch Linux ARM. Please search before making a new topic.

flaky networking on Raspberry Pi Zero

Postby cmurf » Thu Apr 09, 2020 5:03 am

Summary: Warm boots often automatically connect to wifi. Cold boots often fail. I can't figure out why.

Details: The following is a cold boot sequence. Raspberry Pi Zero has been up for ~15 minutes at this point. This shows the failure and how I manually recover. But it's rather annoying to have to do this so often.

$ ssh chris@alarmpi.local
ssh: Could not resolve hostname alarmpi.local: Name or service not known

$ sudo picocom /dev/ttyACM0
##login

[chris@alarmpi ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b8:27:eb:87:65:80 brd ff:ff:ff:ff:ff:ff
[chris@alarmpi ~]$ sudo systemctl restart netctl-auto@wlan0.service
[chris@alarmpi ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:27:eb:87:65:80 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.112/24 brd 10.0.0.255 scope global dynamic noprefixroute wlan0
valid_lft 604791sec preferred_lft 529191sec
inet6 2601:282:701:3410:ba27:ebff:fe87:6580/64 scope global dynamic mngtmpaddr
valid_lft 6712sec preferred_lft 6712sec
inet6 fe80::ba27:ebff:fe87:6580/64 scope link
valid_lft forever preferred_lft forever
## logout of the pi, and now I can ssh in remotely OK, as expected.

Attached is a journal for the above sequence. The journal shows that the Pi first tries to connect to "ClubC316" even though this is not the default set in 'wifi-menu' and also this AP isn't anywhere nearby (hundreds of miles away).

[ 34.369790] alarmpi network[248]: Starting network profile 'wlan0-ClubC316'...

It does connect to the correct AP.

[ 45.334344] alarmpi systemd-networkd[208]: wlan0: Connected WiFi access point: altitude (f8:a0:97:6e:c7:e7)

But for unknown reasons it gets dropped.

[ 47.902222] alarmpi dhcpcd[467]: dhcp_readbpf: wlan0: Network is down

And it just gives up, never trying to connect to "altitude" again.

[ 76.640461] alarmpi dhcpcd[467]: timed out

However, manually restarting netctl-auto@wlan0.service works, and sticks.

Suspiciously I have:

/etc/systemd/system/netctl@wlan0\x2dClubC316.service.d

But no equivalent for "altitude". Systemctl shows the following units.

netctl-auto@wlan0.service
netctl.service
netctl@wlan0\x2dClubC316.service

I only ever used 'wifi-menu' to connect to both of these APs: first one (in the life of this installation for this Pi) is "ClubC316" and the second one is "altitude".

Anyway, confused.
cmurf
 
Posts: 4
Joined: Thu Apr 09, 2020 4:59 am

Re: flaky networking on Raspberry Pi Zero

Postby cmurf » Thu Apr 09, 2020 5:04 am

cmurf
 
Posts: 4
Joined: Thu Apr 09, 2020 4:59 am

Re: flaky networking on Raspberry Pi Zero

Postby cmurf » Thu Apr 09, 2020 6:38 am

I removed netctl, and configured systemd-networkd and wpa_supplicant from this post:
https://bbs.archlinux.org/viewtopic.php ... 9#p1393759

But it still doesn't come up automatically. Now I have to manually run:
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Then I can connect. So for some reason, wpa_supplicant isn't starting.

$this->bbcode_second_pass_code('', '
[ 101.497925] alarmpi systemd[1]: sys-subsystem-net-devices-wlan0.conf.device: Job sys-subsystem-net-devices-wlan0.conf.device/start timed out.
[ 101.514761] alarmpi systemd[1]: Timed out waiting for device /sys/subsystem/net/devices/wlan0.conf.
[ 101.516076] alarmpi systemd[1]: Dependency failed for WPA supplicant daemon (interface-specific version).
[ 101.531647] alarmpi systemd[1]: wpa_supplicant@wlan0.conf.service: Job wpa_supplicant@wlan0.conf.service/start failed with result 'dependency'.
[ 101.532550] alarmpi systemd[1]: sys-subsystem-net-devices-wlan0.conf.device: Job sys-subsystem-net-devices-wlan0.conf.device/start failed with result 'timeout'.
')
cmurf
 
Posts: 4
Joined: Thu Apr 09, 2020 4:59 am

Re: flaky networking on Raspberry Pi Zero

Postby cmurf » Thu Apr 09, 2020 6:59 am

OK it should be
$this->bbcode_second_pass_code('', 'systemctl enable wpa_supplicant@wlan0.service')

Now it's working.
cmurf
 
Posts: 4
Joined: Thu Apr 09, 2020 4:59 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 18 guests