NOTE:
This guide was written more than two years ago, which in Pi years means it's now graduated college, or something. Inevitably, it's at least a little out of date, and it may even be entirely misleading. There are several helpful suggestions in the comments (thanks everyone), and most recently a report that what's here plain doesn't work on current (early 2022) Raspbian. Which isn't even called 'Raspbian' any more.
As of Jan 2022 I'm partially back in my office-which-has-access-to-eduroam, and I do have a need to build up a fresh Pi desktop. If and when I get that working I'll update this guide. In the meantime: good luck, and please leave a comment to report success or failure.
(June 2022) Nope, I still haven't actually tried any of this myself. However, I have had to troubleshoot eduroam wifi on my Linux ThinkPad. As of Ubuntu 22.04 it would no longer connect. This Stack Exchange answer explains why, and the steps necessary to re-enable some old and busted negotiation stuff to get it going again. I've had to repeat the fix on a fresh Pop! OS (22.04) install. I've no idea if the same issue might arise with Raspberry Pi OS, but at some point it likely will so I'm pasting the link here to remind myself of it.
(September 2022) It looks like the latest release of Raspberry Pi OS now offers Network Manager as an option. You still have to enable it, but that's now integrated withraspi-config
, which will hopefully render this guide redundant.
Default Raspbian is not able to connect to wifi networks using corporate security setups, including eduroam. However, the issue is that the packaged networking control widget does not expose the relevant security features, rather than any underlying hardware limitation. The solution has long been to install Network Manager and configure it to handle the wifi interface.
Unfortunately, previous installation approaches didn't work for me on the Raspbian 2020-02-06 image. Following a fresh install, the below is what I did to make it work. Note that this is actually simpler than previous recipes.
sudo apt update
sudo apt install network-manager network-manager-gnome
Check /etc/network/interfaces
; this should be empty except for an include from /etc/network/interfaces.d
(which is in turn empty).
Edit /etc/dhcpcd.conf
, add line:
denyinterfaces wlan0
Back at the prompt, at this point I did sudo systemctl restart dhcpcd
. Which probably isn't strictly necessary, since we're shortly going to reboot anyway.
edit /etc/NetworkManager/NetworkManager.conf
:
[main]
plugins=ifupdown,keyfile
dhcp=internal
[ifupdown]
managed=true
sudo reboot
At this point, you should have two wifi widgets in the menu bar: the default Raspbian one, showing two red crosses and 'No wireless interfaces found' when clicked, and Network Manager with a full pull-down menu. Once a wifi ssid is selected, the connection dialogue should expose full security settings (PEAP, etc.), allowing access to a wider range of networks.
You can remove the now-defunct default wifi widget by right-clicking the menubar and selecting 'Panel Settings -> Panel Applets'.
Thanks to @aallan for this: it's also possible to bypass all the above and edit wpa_supplicant.conf
directly. For eduroam, for example:
network={
ssid="eduroam"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="your_username"
password="your_password" phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
You can combine this with dropping a wpa_supplicant.conf
file in /boot
to have the Pi connect on boot, which is particularly useful for headless Pis. Alasdair has a more detailed write-up.
I have been trying to get nm working on the RPi 400. I now achieved nearly full success on buster.
Following the previous useful instructions still left my system with no networking. This is what I needed to the overcome that. Lots of interpretation from journalctl logs to track this down ...
dhcp = dhcpcd
I had last year got nm working well from the command line for a rpi-zero project that turned wifi on and off as required on a headless system. So I knew it could work! However being a headless system, I could just sudo all nmcli commands so many problems were not confronted.
My main problem on the 400 (using nm-applet) was the internal nm dhcp was stuffing things up, It was taking a long time to connect if at all and very intermittent. I am pretty sure that I have not left anything out.
The only problem now is that it now asks to confirm the password in a popup (with the password box filled in with the correct value) when I change the wifi connection from a user. This is with a password in the nmconnection config file. Not sure what is doing this at this moment. I have also modified the desktop polkit ...
/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.NetworkManager.pkla to allow user permissions.
This last problem is now fixed. Running xfce desktop, there is a desktop startup to activate the NM polkit. Doing this fixed asking for passwords. And add nm-applet into startup gets it the app in the desktop panel.
One other minor problem was to ensure that the country of use for wifi is declared in the /etc/default/crda file. In my case 5G freq were not recognized, some others caused connections to fail. It can cause strange behaviour not attributed to NM.
Cheers