wifi_on_raspberry_pi

show all network interfaces ip a

Look for your wireless interface (probably wlan0). This mini-howto assumes wlan0 is the interface to be configured.

Systemd unit wpa_supplicant loads configuration from /etc/sysconfig/wpa_supplicant –and– /etc/wpa_supplicant/wpa_supplicant.conf

edit /etc/sysconfig/wpa_supplicant

# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES="-iwlan0"

setup your network credentials: edit /etc/wpa_supplicant/wpa_supplicant.conf ; and add

network={
   ssid="YOUR_NETWORK_NAME"
   psk="YOUR_NETWORK_PASSWORD"
   scan_ssid=1
   key_mgmt=WPA-PSK
}

start and enable wpa_supplicant.service:

systemctl start wpa_supplicant
systemctl enable wpa_supplicant

check the results: (wpa_state=COMPLETED if authentication to wifi network succeeded)

wpa_cli status

wlan0 can be configured in the cockpit gui(network panel), older method : run the config-network script. (this is quite a blunt tool, i don’t know a better one :hushed:)

nethserver-config-network

What to do if it doesn't work

  • check that the sssid can be seen
wpa_cli -iwlan0
> scan
OK
> 
<3>CTRL-EVENT-SCAN-STARTED 
> 
<3>CTRL-EVENT-SCAN-RESULTS 
> 
<3>WPS-AP-AVAILABLE

display the result

> scan_results
bssid / frequency / signal level / flags / ssid
42:03:81:d1:d4:53	2457	-16	[WPA-EAP-CCMP][ESS]	FreeWifi_secure
42:03:81:d1:d4:50	2457	-16	[WPA-PSK-CCMP][ESS]	
42:03:81:d1:d4:51	2457	-17	[WPA2-PSK-CCMP][ESS]	
f4:ca:e5:92:3f:58	2422	-64	[WPA-PSK-CCMP][ESS]	Freebox-59C501
f4:ca:e5:92:3f:5a	2422	-64	[WPA2-EAP-CCMP+TKIP][ESS]	FreeWifi_secure
00:19:70:7c:1e:d5	2437	-85	[WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS]	Livebox-9a79
42:03:81:d1:d4:52	2457	-16	[ESS]	FreeWifi
f4:ca:e5:92:3f:59	2422	-64	[ESS]	FreeWifi
06:19:70:7c:1e:d5	2437	-87	[ESS]	orange

exit

>quit
  • my sssid is not seen

You can try to change the channel of the sssid on your access point you try to connect, the channel 13 was not available for my wifi card