added trick to configure wpa wifi network
[www.git] / src / tricks / raspberry_pi3_configure_wifi.adoc
diff --git a/src/tricks/raspberry_pi3_configure_wifi.adoc b/src/tricks/raspberry_pi3_configure_wifi.adoc
new file mode 100644 (file)
index 0000000..f8d485a
--- /dev/null
@@ -0,0 +1,47 @@
+= Raspberry PI - Configure the Wifi
+:docinfo2:
+:icons: font
+
+For WPA Wifi, edit the file `/etc/wpa_supplicant/wpa_supplicant.conf`
+as root.
+
+Example:
+
+```
+ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
+update_config=1
+country=FR
+
+network={
+       ssid="MY_SSID"
+       psk="MY_PASSWORD"
+       key_mgmt=WPA-PSK
+}
+```
+
+Replace `MY_SSID` by the name of the Wifi network and `MY_PASSWORD`
+by the password of the Wifi network.
+
+Multiple networks can be declared, the one with higher priority will
+be used if possible:
+
+```
+ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
+update_config=1
+country=FR
+
+network={
+       ssid="MY_SSID"
+       psk="MY_PASSWORD"
+       key_mgmt=WPA-PSK
+       priority=2
+}
+
+network={
+       ssid="MY_SSID2"
+       psk="MY_PASSWORD2"
+       key_mgmt=WPA-PSK
+       priority=1
+}
+
+```