-
Notifications
You must be signed in to change notification settings - Fork 14
Hotspot WiFi
The following guide aims to configure the Raspberry Pi as a WiFi Hotspot.
There are two differents approches, the first one the Raspi is connect to the Ethernet as a uplink. The second one the Raspi is connected to a wifi.
Raspberry Pi 3B
Raspberry GNU/Linux 10
Buster
Raspberry
For the wifi implementation:
Edimax EW-7811UN
- The following commands must be executed.
sudo apt update
sudo apt install network-manager network-manager-gnome openvpn \openvpn-systemd-resolved network-manager-openvpn \network-manager-openvpn-gnome
sudo apt purge openresolv dhcpcd5
sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf
- Delete
Wireless & Wired Networkand the respectiveSpacefrom Task Bar.
- Reboot
sudo reboot
- Now you should create the Hotspot.
- Connection name does not matter, it is the name that gonna be shown to you.
SSID is the connection name that will be displayed.
- Set up a password for the connection.
- Save and Reboot
The Raspberry Pi is able to work as a wireless hotspot and simultanous connect to another hotspot as client. But the wifi device on the RasPi has a general limitation. The client connection cannot be bridged because lack of WDS (wireless distribution system) that is needed for bridging on wireless.
It is important to note that you need a WiFi dongle because of the raspberry pi hardware limitation.
The WiFi dongle used is Edimax EW-7811UN
- The following commands must be executed.
sudo apt update
sudo apt install network-manager network-manager-gnome openvpn \openvpn-systemd-resolved network-manager-openvpn \network-manager-openvpn-gnome
sudo apt purge openresolv dhcpcd5
sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf
- Delete
Wireless & Wired Networkand the respectiveSpacefrom Task Bar.
-
Reboot
sudo reboot -
Now before setting up the Hotspot you have to connect to your WiFi connection.
It is important to point that you have to connect as client to the WiFi with the WiFi dongle, because it doesn't work as a WiFi repeater (but the build in WiFi hardware on Raspi does).
You just have to click on the WiFi you want to connect on the WiFi Networks (Edimax EW-7811Un), and set the correct password.
- Now you should create the Hotspot.
- It is important to setup this connection to the Raspberry Pi build in WiFi hardware. For this, you have to select the wlan that begin with B8 in the device selector. And dont forget to select Mode as Hotspot.
Connection name does not matter, it is the name that gonna be shown to you.
SSID is the connection name that will be displayed.
- Set up a password for the connection.
- Set up the priority as 1, otherwise the connection as client could get the Raspberry Pi hardware and the Hotspot wont work!
- Save and Reboot.
It is basically the same as above, but you have to setup the client connection as Eduroam.
- Follow the above instructions to number 3.
2.1. First you have to download the Linux Script from eduroam-cat
2.2 You have to transfer to your Raspi the script eduroam-linux-Universitat_Stuttgart-STUDENT.py (it could be via SSH)
2.3 Run the script with sudo sudo python path/eduroam-linux-Universitat_Stuttgart-STUDENT.py
2.4 It will ask you credentials.
2.5 After installation, copy the certificate from /root/.cat_installer/ca.pem/ to another folder (it worked on Desktop)
sudo cp /root/.cat_installer/ca.pem /home/pi/Desktop
2.6 Edit the eduroam config file created by the installation. Remove the root permission and change the certificate path to the new one.
sudo nano /etc/NetworkManager/system-connections/eduroam.nmconnection
Edit the line permissions=:user::root:; to permissions=
Edit the line ca-cert=/root/.cat_installer/ca.pem to ca-cert=/home/pi/Desktop/ca.pem
Save and exit.
- Now your eduroam should work after rebooting, but first follow the remaining steps from the guide above (5 to 9).
To use VPN you just need to install openconnect with sudo apt-get install openconnect
And then, run the command
sudo openconnect -u USER_ID -b VPN_ADDRESS
Where USER_ID is your vpn id and VPN_ADDRESS is the address for the VPN (vpn.informatik.uni-stuttgart.de at the moment)
Sometimes when you turn on the Raspi the internet will not work anymore... That's because of the Date problably is incorrect.
You can fix it by setting the time manually to be sometime accurate sudo date -s "xx/yy/20zz hh:mm"
Universität Stuttgart - MBP Team 🔧