WiFi not working with Nerves Livebook on RPi5

I recently bought a Raspberry Pi 5 to work through Programming Nerves, which starts with using Nerves Livebook. I have a tri-band router with WP2/WPA3 enabled. I haven’t been able to get WiFi working (direct Ethernet and Ethernet to USB adapter are fine). I used Nerves Burner passing in my WiFi credentials; directly loaded the nerves livebook firmware with fwup (passing in WiFi credentials); and cloned the repo, using mix to create and burn the firmware and setting up WiFi with VintageNetWiFi.quick_configure/2.

I have a RPi Zero W, which works fine. And on the RPi5, I actually built the “hello nerves” project, burned the firmware, set up WiFi with VintageNet, and WiFi works. Does anyone have any suggestions on how to get WiFi working on the RPi5 with Nerves Livebook?

Anything about the wifi in RingLogger.next after running quick_configure?

This is the output (with ssid and passphrase redacted). I made the firmware using nerves_burner without configuring WiFi credentials. When I tried the quick_configure, this was in RingLogger.next:

19:48:26.111 [warn] RouteManager: new set_connection_status wlan0 → :disconnected (Elixir.VintageNet.Interface.start_configuring/3([file: ~c"lib/vintage_net/interface.ex", line: 666]))
19:48:37.683 [warn] Ignoring error getting info on BSSID “9a:18:65:da:39:29”: :timeout

I didn’t think it was that informative, so I reburned the firmware and set the logger level to :debug before trying again:

iex(livebook@nerves.local)6> VintageNetWiFi.quick_configure(“ssid”, “passphrase”)
20:13:52.830 [debug] VintageNet(wlan0): :configured → configure (VintageNetWiFi)
:ok
20:13:53.370 [info] RouteManager: clear_route wlan0
20:13:53.370 [warn] RouteManager: new set_connection_status wlan0 → :disconnected (Elixir.VintageNet.Interface.start_configuring/3([file: ~c"lib/vintage_net/interface.ex", line: 666]))
20:13:53.377 [info] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
20:13:54.381 [debug] wpa_supplicant: Successfully initialized wpa_supplicant
20:13:54.458 [debug] wpa_supplicant: nl80211: kernel reports: Registration to specific type not supported
20:14:01.001 [error] wpa_supplicant_ll: Error sending “BSS 9a:18:65:da:39:29” ({:error, :econnrefused})
20:14:01.002 [warn] Ignoring error getting info on BSSID “9a:18:65:da:39:29”: :econnrefused
20:14:01.003 [debug] wpa_supplicant: CTRL_IFACE: Detach monitor that cannot receive messages: /tmp/vintage_net/wpa_supplicant/wlan0.ex\x00
20:14:01.003 [debug] wpa_supplicant: wlan0: Trying to associate with SSID ‘ssid’
20:14:01.144 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-ADDED 9a:18:65:da:39:29 0
20:14:01.461 [debug] wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
20:14:01.461 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-REMOVED 9a:18:65:da:39:29 0
20:14:01.461 [debug] wpa_supplicant: wlan0: Added BSSID 9a:18:65:da:39:29 into ignore list, ignoring for 10 seconds
20:14:07.931 [debug] wpa_supplicant: wlan0: Trying to associate with SSID ‘ssid’
20:14:08.033 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-ADDED 94:18:65:da:39:2a 0
20:14:08.137 [debug] wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
20:14:08.137 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-REMOVED 94:18:65:da:39:2a 0
20:14:08.138 [debug] wpa_supplicant: wlan0: Added BSSID 94:18:65:da:39:2a into ignore list, ignoring for 10 seconds
20:14:15.078 [debug] wpa_supplicant: wlan0: Trying to associate with SSID ‘ssid’
20:14:15.164 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-ADDED 94:18:65:d9:e8:58 0
20:14:15.479 [debug] wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
20:14:15.479 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-REMOVED 94:18:65:d9:e8:58 0
20:14:15.479 [debug] wpa_supplicant: wlan0: Added BSSID 94:18:65:d9:e8:58 into ignore list, ignoring for 10 seconds
20:14:22.878 [debug] wpa_supplicant: wlan0: Trying to associate with SSID ‘ssid’
20:14:22.988 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-ADDED 94:18:65:da:39:2a 0
20:14:23.090 [debug] wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
20:14:23.090 [debug] wpa_supplicant: wlan0: PMKSA-CACHE-REMOVED 94:18:65:da:39:2a 0
20:14:23.091 [debug] wpa_supplicant: wlan0: BSSID 94:18:65:da:39:2a ignore list count incremented to 2, ignoring for 10 seconds
20:14:23.091 [debug] wpa_supplicant: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid=“ssid” auth_failures=1 duration=10 reason=CONN_FAILED

It seems that my Raspberry Pi doesn’t like mixed WPA2/WPA3, which nerves_livebook uses with quick_configure. If I build nerves_livebook and change the quick_configure configuration in config/rpi5.exs to use wpa_psk, or use VintageNetWiFi.Cookbook.wpa_psk/2 with VintageNet.configure, WiFi works.

I wonder if the Livebook section on WiFi Configuration could point out that quick_configure could fail because of WPA2/WPA3 issues that can be resolved by using specific configurations.

1 Like

That is really good info :slight_smile:

I know I had quick_configure fail on some other issue years ago but it has been reliable for me recently but I don’t have anything special in terms of wifi.

can you log an issue on the vintage_net_wifi repo?

1 Like