Raspberry Pi aarch64 connect to wifi automatically

Hi all,

I have NixOS 19.09 from the official Hydra image running on a Raspberry Pi 3 B+ with Kernel 4.19 (latest kernel 5.4 is not booting, and I’m not sure where the regression is). I have connman configured with wpa_supplicant as a backend, and this works to connect to a wireless network, but only once logged in. I would like to have the device connect to wifi automatically without needing to log in locally. For example, it should aggressively connect to wifi so that I can then access it via SSH. Testing on an x86 installation of NixOS with connman, it does indeed connect to the network prior to login, but I’m not sure what the difference is.

I’d also be open to using network manager instead of connman, but when I had network manager configured on the Pi (just by networking.wireless.enable = true; in my config), the wpa_supplicant systemctl service was crashed on login, but then would work fine after a restart. So another alternative could be to either figure out why the service was crashing, or configure it to restart on failure.

In summary- what is the the best way to configure my Raspberry Pi to reliably and aggressively connect to wifi?

1 Like

For what it’s worth, I did get this basically working, although it is kinda hacky, and still not 100% reliable: https://github.com/NixOS/nixpkgs/issues/82462#issuecomment-604634627

i’ve been using nixos on my raspberrypi 3B+ and 3A+ with kernel 5.4.24 for a while now and
have had no issues at all.

have you sorted out all of the potential hardware issues? i had similar issues with bad/weak power supply, since the raspberrypi uses more power while booting. do you have a different power adapter with 5V/3A to test this?

Interesting. My USB transformer claims 3 amps, but I’m not sure how to test that or how reliable it is. I do see some “hwmon1: Undervoltage detected!” events in the logs, so this could very well be the issue. I’m testing with a 30 amp USB transformer now, and will report back if I can get 24 hours+ uptime.

According to random sources on the internet to mitigate voltage drops you could use a power supply with 5.1 or 5.2V (±10% voltage is the tolerance of the board).
This is due to questionable board design of the RPI3