This script is intended for the Raspeberry Pi. It will automatically create a hotspot, based on the given conf file.
It will use systemd-networkd
, wpa_supplicant
and wpa_cli
.
The hotspot will be purely local, no internet connection.
[Not Tested] Check if ethernet connectivity also works
You need to have a wpa_supplicant-device.conf file similiar to this.
country=FR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
ap_scan=1
### auto hotspot ### # has to be the first network section!
network={
priority=0 # Lowest priority, so wpa_supplicant prefers the other networks below
ssid="autohotspot" # your access point's name
mode=2
key_mgmt=WPA-PSK
psk="passphrase" # your access point's password
frequency=2462
}
After having installed the script (see below) you can start a hotspot manually by running auto-hotspot
If connecting to the RPi by ethernet cable, you can set your computer to DHCP and work with link-local adressing, reaching the RPi by its hostname.
How it works is also discussed here: https://raspberrypi.stackexchange.com/questions/100195
git clone https://github.com/DonGuig/auto-hotspot.git
cd auto-hotspot
chmod +x auto-hotspot install.sh
sudo ./install.sh