-
Notifications
You must be signed in to change notification settings - Fork 5
3. WiFi Setup
For Raspberry Pi Zero W, WiFi could operate in Client or Hotspot mode.
⚠️ even if you`ll use hotspot or client mode the password must contains at least 8 characters.
Hotspot mode enables ActionPi to act as an Access Point (AP) and allows devices to connect directly to it. In this mode no Internet connection is available but you can access the web interface here: http://192.168.4.1
or http://actionpi.local
. The AP will spawn with following parameters:
- SSID: ActionPi
- Password: Act1onP! (default)
If you want to switch to Hotspot mode you could enable it from web interface or by running:
-
sudo echo "SuperSecretPasswordHere" > /boot/wifi_hotspot
if you want to change password, or -
touch /boot/wifi_hotspot
if you just want to enable hotspot and use the old password.
⚠️ avoid usingsudo raspi-config
to connect to a wireless network.
On Client mode ActionPi will try to connect to a predefined network.
Client mode could be enabled from web interface or by running following command: touch /boot/wifi_hotspot
⚠️ only the first time or whenever you have to switch to different wireless network you have to place an additional file inside/boot
folder calledwpa_supplicant.conf
that contains Access Point name, password and country code.
wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="MyNetworkName"
psk="SuperSecretPassword"
scan_ssid=1
}
network={
ssid="MyNetworkName_2"
psk="SuperSecretPassword_2"
scan_ssid=1
}
...
You must consider using this method to setup a WiFi connection that requires advanced configuration.
You could read more about wpa_suppllicant.conf file here.
⚠️ currently if Raspberry fails to connect to AP hotspot will not be activated as a fallback access point. You could use USB cable connection to access the board and adjust settings.