/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service将下面的
[D-BUS Service] Name=fi.epitest.hostap.WPASupplicant Exec=/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log User=root改成:
[D-BUS Service] Name=fi.epitest.hostap.WPASupplicant Exec=/sbin/wpa_supplicant -u -onl80211 -O/var/run/wpa_supplicant User=root
ifconfig wlan0 up
# rfkill event unblock X
iwlist wlan scan
wpa_pasdphrase "ssid">>/etc/wpa_supplicant/wpa_supplicant.conf
# wpa_passphrase MYSSID passphrase > /etc/wpa_supplicant/example.conf
/etc/wpa_supplicant/example.conf ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel update_config=1 fast_reauth=1 ap_scan=1 network={ ssid="MYSSID" #psk="passphrase" psk=59e0d07fa4c7741797a4e394f38a5c321e3bed51d54ad5fcbd3f84bc7415d73d }
# wpa_supplicant -B -i interface -c /etc/wpa_supplicant/example.conf
dhclient wlan0
ctrl_interface=/run/wpa_supplicant update_config=1
# wpa_supplicant -B -i interface -c /etc/wpa_supplicant/example.conf
wpa_cli
> scan OK <3>CTRL-EVENT-SCAN-RESULTS > scan_results bssid / frequency / signal level / flags / ssid 00:00:00:00:00:00 2462 -49 [WPA2-PSK-CCMP][ESS] MYSSID 11:11:11:11:11:11 2437 -64 [WPA2-PSK-CCMP][ESS] ANOTHERSSID添加:
> add_network 0 > set_network 0 ssid "MYSSID" > set_network 0 psk "passphrase" > enable_network 0 <2>CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (reauth) [id=0 id_str=]之后用save_config保存
dhclient wlan0