ConnectToEduroamUsingRaspbe.../README.md

131 lines
3.8 KiB
Markdown
Raw Normal View History

2024-11-21 10:34:54 +00:00
# Connect to Eduroam using Raspberry Pi
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
This repository provides a step-by-step configuration to connect your Raspberry Pi to the **Eduroam** Wi-Fi network using **wpa_supplicant** and a custom `interfaces` configuration.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
## Table of Contents
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
- [Introduction](#introduction)
- [Files Overview](#files-overview)
- [Configuration Steps](#configuration-steps)
- [Customizing Configuration](#customizing-configuration)
- [Troubleshooting](#troubleshooting)
- [License](#license)
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
---
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
## Introduction
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
Eduroam is a Wi-Fi service that allows students, researchers, and staff of participating institutions to connect to secure Wi-Fi networks globally. This repository provides two configuration files for setting up Eduroam on a **Raspberry Pi**: `interfaces` for network configuration and `wpa_supplicant.conf` for the Eduroam-specific settings.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
---
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
## Files Overview
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
There are two essential configuration files in this repository:
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
1. **`interfaces`**: This file configures the network interfaces on your Raspberry Pi (eth0 and wlan0).
2. **`wpa_supplicant.conf`**: This file contains the Wi-Fi settings, including authentication methods for connecting to Eduroam.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
### `interfaces` File :
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
```bash
auto lo
iface lo inet loopback
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
auto eth0
allow-hotplug eth0
iface eth0 inet manual
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
```
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
eth0: Configured for manual IP addressing (not used in this case but allows Ethernet fallback).
wlan0: Configured for wireless connectivity using wpa_supplicant.
### `wpa_supplicant.conf` File :
```bash
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=FR
network={
ssid="eduroam"
key_mgmt=WPA-EAP
pairwise=CCMP
eap=TTLS
identity=YOUR_UNIVERSITY_ID
anonymous_identity="anonymous@unilim.fr"
password=YOUR_PASSWORD
ca_cert="/home/pi/.cat_installer/ca.pem"
altsubject_match="DNS:wifi-ttls.unilim.fr"
phase2="auth=MSCHAPV2"
}
```
country: Set to France (FR), adjust according to your location.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
ssid: Network name (eduroam).
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
eap: Set to TTLS for Eduroam.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
identity: Your institution-specific username (replace YOUR_UNIVERSITY_ID).
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
password: Your Eduroam password (replace YOUR_PASSWORD).
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
ca_cert: Path to the certificate used for secure connection.
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
phase2: Specifies the secondary authentication phase (MSCHAPV2).
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
## Configuration Steps
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
### Clone the repository:
```bash
git clone https://github.com/yourusername/connecttoeduroamusingraspberrypi.git
cd connecttoeduroamusingraspberrypi
```
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
### Update the interfaces file:
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
#### Place the interfaces file in /etc/network/:
```bash
sudo cp interfaces /etc/network/
```
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
### Update the wpa_supplicant.conf file:
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
#### Place the wpa_supplicant.conf file in /etc/wpa_supplicant/:
```bash
sudo cp wpa_supplicant.conf /etc/wpa_supplicant/
```
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
#### Edit the wpa_supplicant.conf:
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
Open the file with a text editor and replace YOUR_UNIVERSITY_ID and YOUR_PASSWORD with your actual credentials.
```bash
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
```
#### Reboot your Raspberry Pi:
sudo reboot
After rebooting, your Raspberry Pi should automatically connect to the Eduroam network.
## Customizing Configuration
2022-04-07 16:38:06 +00:00
2024-11-21 10:34:54 +00:00
Identity: Replace YOUR_UNIVERSITY_ID with your actual university or institution login (e.g., johndoe@university.edu).
Password: Replace YOUR_PASSWORD with your actual Eduroam password.
Country: Set the country code (country=FR) to match your region if you're outside of France.
## Troubleshooting
Wi-Fi connection fails: Ensure your device supports WPA-EAP and TTLS, and check that the correct ca_cert file path is used.
Error messages related to authentication: Double-check that the correct credentials are placed in the wpa_supplicant.conf file, especially the identity and password fields.
2022-04-07 16:38:06 +00:00
## License
2024-11-21 10:34:54 +00:00
This repository is licensed under the MIT License.