Connecting Linux based Raspberry Pi devices to eduroam

These instructions are designed for Linux-based devices like Raspberry Pis (that are not compatible with SecureW2 on, using the wpa_supplicant service to connect to Wi-Fi. This guide also assumes you have a basic understanding of Unix commands and that you have root (superuser) access on the device.

If possible, and the device does not need to be moved frequently, consider connecting it to Ethernet instead:

If you do not need the speed of the eduroam network, it is easier to register your device on the UD Devices network, using these instructions:

Connecting Linux based Raspberry Pi devices to eduroam

  1. You must be in superuser mode. Type sudo su or sudo -i (specific to your distro).
  2. Find the names of your network interfaces by using cat /etc/network/interfaces or ifconfig.
  3. If it is not already present, edit your /etc/network/interfaces file using a text editor (e.g., nano /etc/network/interfaces). Add the following at the end of the file:
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
  1. Save the file.
  2. Type ifdown eth0, replacing eth0 with the name of your Ethernet interface if eth0 is not correct.
  3. Type ifdown wlan0, replacing wlan0 with the name of your wireless interface if wlan0 is not correct.
  4. Type killall wpa_supplicant to stop the wpa_supplicant service and allow editing of the configuration file.
  5. Edit /etc/wpa_supplicant/wpa_supplicant.conf using a text editor. E.g: nano /etc/wpa_supplicant/wpa_supplicant.conf.
  6. Add the following to the bottom of your configuration file, and fill in the identity and password with your credentials. DO NOT edit the lines beginning with ctrl_interface or update_config if they already exist.
  1. Save your file.
  2. Test the connection with wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf and replace wlan0 with your wireless interface name if necessary. If you see "Authentication succeeded," you may press Ctrl+C to interrupt and continue the instructions. If it fails, you will need to verify that your wpa_supplicant.conf file and interface names are correct. This command may take a few minutes or attempts to connect.
  3. Type ifup eth0 and ifup wlan0 to restore your network interfaces.
  4. If no error messages are displayed, type ifconfig wlan0 to verify an IP address was assigned.
  5. Test network connectivity, e.g. ping -c 3

Troubleshooting tips:

Make sure you can reboot the Raspberry Pi and connect to the network automatically; sometimes this takes a few seconds. However if you see any dhcp failures during bootup, then run the following command:

sudo dhclient wlan0

If you have any issues connecting, make sure you have set the system locality to your region. To do so, run:

  • sudo raspi-config
  • Select option 4, Localisation Options, and set the proper options for your:
    • Locale
    • Timezone
    • Keyboard
    • Wif-fi Country

If you continue to have problems connecting the device, you may want to reach out to your departmental IT Professionals to have them troubleshoot.

Print Article


Article ID: 919
Thu 3/31/22 10:41 AM
Mon 4/4/22 9:16 AM