The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:WPA Supplicant"
m (Drobbins moved page Package:Wpa supplicant to Package:WPA Supplicant without leaving a redirect) |
(another way to create the config) |
||
Line 25: | Line 25: | ||
} | } | ||
}} | }} | ||
Another way would be to run | |||
<console> | |||
###i## wpa_passphrase ssidname | tee /etc/wpa_supplicant.conf | |||
secretpassword | |||
#reading passphrase from stdin | |||
network={ | |||
ssid="ssidname" | |||
#psk="secretpassword" | |||
psk="552324234" | |||
} | |||
</console> | |||
Like this the configuration file will be created automatically, so you cant make any typing mistakes like forgetting a tick. Use your SSID name instead of ''ssidname'' and after running the command it will wait for you to enter the password, then will save the output of ''wpa_passphrase'' into <code>/etc/wpa_supplicant/wpa_supplicant.conf</code>. | |||
== Daemon == | == Daemon == |
Revision as of 17:25, October 7, 2014
WPA Supplicant
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
Configuration
You can configure wpa_supplicant
daemon by editing /etc/wpa_supplicant/wpa_supplicant.conf
.
/etc/wpa_supplicant/wpa_supplicant.conf
- wpa_supplicant daemon config# provide control interface for wpa_cli and wpa_gui frontends ctrl_interface=/run/wpa_supplicant # allow wpa_cli and wpa_gui to update config update_config=1 network={ ssid="SSID" psk="passphrace" } network={ ssid="SSID2" key_mgmt=NONE }
Another way would be to run
root # wpa_passphrase ssidname | tee /etc/wpa_supplicant.conf secretpassword root #reading passphrase from stdin network={ ssid="ssidname" #psk="secretpassword" psk="552324234" }
Like this the configuration file will be created automatically, so you cant make any typing mistakes like forgetting a tick. Use your SSID name instead of ssidname and after running the command it will wait for you to enter the password, then will save the output of wpa_passphrase into /etc/wpa_supplicant/wpa_supplicant.conf
.
Daemon
Start daemon with openrc.
root # /etc/init.d/wpa_supplicant start
You can also add it to default runlevel.
root # rc-update add wpa_supplicant default
The daemon can work independently or you can use wpa_cli and wpa_gui frontends. You can also alter configs with frontends.
Wpa_cli CLI Frontend
You can start cli frontend by running wpa_cli
.
root # wpa_cli
Scan Access Points
> scan OK <3>CTRL-EVENT-SCAN-STARTED <3>CTRL-EVENT-SCAN-RESULTS > scan_results bssid / frequency / signal level / flags / ssid 50:32:75:ee:b6:fb 2462 -41 [WPA2-PSK-CCMP][ESS] AndroidAP 00:3a:98:99:12:f3 2412 -71 [WPA2-EAP-CCMP][ESS] wEKSOTE 00:3a:98:99:12:f0 2412 -71 [WPA2-EAP-CCMP][ESS] wULAPPA 00:23:33:a2:7d:14 2462 -85 [WPA2-EAP-CCMP][ESS] SaitaBYOD 00:3a:98:99:12:f1 2412 -70 [ESS] saitaOpen
Connect to Access Point
> add_network 0 > set_network 0 ssid "SSID" > 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
> save_config
OK
Wpa_gui GUI Frontend
wpa_gui
is simple gui frontend. You can start it by running wpa_gui
.
root # wpa_gui
Autoconfigure IP with dhcpcd
You can use Package:dhcpcd to autoconfigure ip address.
root # emerge -av dhcpcd root # /etc/init.d/dhcpcd start