Difference between revisions of "WiFi"
From Autopilot Wiki
(Created page with "Category:RaspiOS Category:Networking == Configuration == When configuring the raspberry pi headless or when using a Lite version without an X server, use Uses Unix...") |
|||
| Line 14: | Line 14: | ||
</pre> | </pre> | ||
| − | === WEP === | + | === WEP/Auto === |
The simplest configuration is something like... | The simplest configuration is something like... | ||
| Line 24: | Line 24: | ||
network={ | network={ | ||
| − | |||
ssid="NAME OF NETWORK" | ssid="NAME OF NETWORK" | ||
psk="PASSWORD" | psk="PASSWORD" | ||
} | } | ||
</pre> | </pre> | ||
| + | |||
| + | This is the entry that is generated by using <code>raspi-config</code> | ||
=== WPA === | === WPA === | ||
| Line 51: | Line 52: | ||
key_mgmt=WPA-PSK | key_mgmt=WPA-PSK | ||
pairwise=CCMP | pairwise=CCMP | ||
| − | |||
auth_alg=OPEN | auth_alg=OPEN | ||
} | } | ||
| + | </pre> | ||
| + | |||
| + | == Interfaces == | ||
| + | |||
| + | If you need a static IP you can use the <code>/etc/network/interfaces</code> file to refer to the wpa_supplicant configuration: | ||
| + | |||
| + | <pre> | ||
| + | auto lo | ||
| + | |||
| + | iface lo inet loopback | ||
| + | iface eth0 inet dhcp | ||
| + | |||
| + | allow-hotplug wlan0 | ||
| + | iface wlan0 inet manual | ||
| + | address 192.168.1.60 | ||
| + | netmask 255.255.255.0 | ||
| + | gateway 192.168.1.1 | ||
| + | wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | ||
</pre> | </pre> | ||
Revision as of 23:44, 14 December 2021
Configuration
When configuring the raspberry pi headless or when using a Lite version without an X server, use wpa_supplicant, configuration file located at /etc/wpa_supplicant/wpa_supplicant.conf, to configure it.
All configurations need preamble like this at the top of the configuration:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US
WEP/Auto
The simplest configuration is something like...
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="NAME OF NETWORK"
psk="PASSWORD"
}
This is the entry that is generated by using raspi-config
WPA
network={
scan_ssid=1
ssid="NAME OF NETWORK"
psk="PASSWORD"
key_mgmt=WPA-PSK
}
WPA2
network={
ssid="NAME OF NETWORK"
psk="PASSWORD"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
Interfaces
If you need a static IP you can use the /etc/network/interfaces file to refer to the wpa_supplicant configuration:
auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual address 192.168.1.60 netmask 255.255.255.0 gateway 192.168.1.1 wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
References
... more about "WiFi"