Switching to 5Ghz wifi made the Raspberry Pi fly again

submited by
Style Pass
2024-10-08 10:30:05

For the last few months my Raspberry Pi 4 was happily running on my desk, tucked away next to the monitor. It's serving a small web app in golang on the internal network and tailscale. I've never noticed any latency problems with it, so it took me by surprise when I deployed some OCaml experiments on the Pi and observed a lot of HTTP connection timeouts and name resolution errors while fetching some URLs concurrently.

Since I cross compiled the experiment from my M1, I first thought there might by some issues related to the TLS setup in Cohttp. So I've copied the source files over ssh and installed all dependencies via opam. Average download speed of 0.5 Mbit/s. WTF? Some unrelated git clone showed the same speed and just timed out...

Or so I thought. The next day the same thing happened again. How is this possible? While searching the Raspberry pi forum two things caught my eye: USB3 is interfering with 2.4Ghz wifi and extremly slow wifi on pi4. Both reported slow wifi speeds on 2.4Ghz, which went away after switching to 5Ghz.

And then it dawned on me. I'm running our network on both frequencies under the same name. The day before, when I rebooted the Pi the wifi did not connect automatically, so I temporarily plugged the Pi into my monitor and selected the wifi via the GUI. Which showed 5GHz in the tooltip. Could this have changed? Using nmcli the current network was indeed listed as 2.4Ghz.

Leave a Comment