This guide will show you to how to connect a Raspberry Pi to the UCSC eduroam WiFi.

Note that you will need to save your username (cruzid) and password (blue password) in clear text in a configuration file. It is strongly recommended that you secure your device with a strong username and password.
This procedure has been tested on Raspbian Stretch Lite version April 2019.
After you have imaged and loaded the linux system to the Raspberry Pi do:

    1. Log in to your Raspberry Pi and elevate to superuser mode:
      • sudo su
    2. Shutdown all networking interfaces:
      • ifdown wlan0
      • ifdown eth0
    3. Then, kill any processes associated with wpa_supplicant :
      • killall wpa_supplicant
    4. Now that the network interfaces and processes are disabled, we can modify configuration files. Use a text editor on the Raspberry Pi to open the /etc/network/interfaces file. In this case I will use nano:
      • nano /etc/network/interfaces
    5. Next, add the following text to the interfaces file:
    6. Save and exit. If using nano:
      • Press ctrl+x, then ‘y’, then Enter.
    7. The Previous step tells the Linux system how to connect to the network, in this case is directing it to use the configuration settings in wpa_supplicant (not configured yet) for interface wlan0 (default WiFi interface).
    8. Now, we can edit the wpa_supplicant file to enter the exact configuration parameters to connect to eduroam. First open /etc/wpa_supplicant/wpa_supplicant.conf using a text editor:
      • nano /etc/wpa_supplicant/wpa_supplicant.conf
        
    9. Then, enter the following lines of text exactly as it appears below, for exception of the last 2 lines. If you are a affiliated with UCSC, use your cruzid and blue password. Make sure to enclose your username and password with double quotes as shown.
    10. Double check to make sure everything looks correct. Then save and exit.
    11. Optional: Run the following command to test the settings you entered above. If successful, you will see a message “Authentication Succeeded” somewhere in the output.
      • wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
      • After a little while the output will hang, check the output for the “authentication successful”
      • Force terminate using ctrl+c
    12. Now bring the network interfaces back online:
      • ifup wlan0
      • ifup eth0
    13. If no errors shown in the last step, run the following commands to get network information. You should see an IPv4 address like the screenshots below:
      • ifconfig wlan0

      • iwconfig

    1. Finally, test network connectivity:
      • ping -c 3 www.google.com
    2. If you received any ping responses, Congratulations you are Done!

 

A few Trobleshooting tips:

Make sure you can reboot the raspberry pi and connect to the network automatically, sometimes it take 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