How to connect a Raspberry Pi to eduroam network

In many universities, users have to connect to eduroam in order to use the Internet. Here we will show how to configure eduroam in a Raspberry Pi.

First of all, we need to download the eduroam certificates. In our case (University of Granada) we can find them here: https://cat.eduroam.org/

We save the scrip (eduroam-linux-UdG.sh) in /home/pi and we execute it:

sh eduroam-linux-UdG.sh

You will be asked for your email address and your password. Once the process is finished, the script has created a new directory: .cat_installer. This directory contains the eduroam certificate and a text file with your network information. We are going to modify this file.

cd /home/pi/.cat_installer

ls –a

You will see two files. ca.pem is the certificate. In order to modify the file cat_installer.conf, just write:

sudo nano cat_installer.conf

In the screen it is shown the content of this file. We delete everything and write:

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

 

network={

ssid=”eduroam”

key_mgmt=WPA-EAP

proto=WPA

eap=TTLS

anonymous_identity=”anonymous@ugr.es”

identity=”myidentity@ugr.es”

password=”mypassword”

priority=2

phase2=”auth=PAP”

}

To save the changes, press ctrl X, Yes and press Enter. The next step is initialize this file. Type:

sudo wpa_supplicant –i wlan0 –c cat_installer.conf –B

(You can use /home/pi/.cat_installer/cat_installer.conf. This way is more general, you can execute the command from whatever directory). If you receive a message like: Successfully initialized wpa_supplicant, then it is a good thing. We are finishing the configuration. Type:

sudo dhclient wlan0

Now, we have the Raspberry Pi connected to eduroam. To confirm it:

ifconfig

And you will see your IP.

In case you do not have an IP after finishing the process, try this: type in the terminal window

sudo nano /etc/network/interfaces

You will see a file with different network configurations. Where is written wlan0, change manual to dhcp and add this line

wpa-conf /home/pi/-cat_installer

Then, reboot your Raspberry Pi and write:

sudo wpa_supplicant –i wlan0 –c /home/pi/.cat_installer/cat_installer.conf –B

sudo dhclient wlan0

 

Leave a Reply

Your email address will not be published. Required fields are marked *