Difference between pages "Package:Bash" and "Package:WPA Supplicant"

(Difference between pages)
 
 
Line 1: Line 1:
 
{{Ebuild
 
{{Ebuild
|Summary=The standard GNU Bourne-again shell.
+
|Summary=wpa_supplicant is a cross-platform supplicant with support for open, WEP, WPA and WPA2. It handles scanning, connection and automatic reconnect to access points. wpa_supplicant has <code>wpa_cli</code> and <code>wpa_gui</code> frontends and <code>wpa_supplicant</code> daemon.
|CatPkg=app-shells/bash
+
|CatPkg=net-wireless/wpa_supplicant
 
|Maintainer=
 
|Maintainer=
 +
|Homepage=http://hostap.epitest.fi/wpa_supplicant/
 
}}
 
}}
This is the ebuild for <tt>bash</tt>, the standard shell for Funtoo Linux systems.
 
  
'''Bash''' is the GNU Project's ''Bourne Again SHell'', a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features. [http://tiswww.case.edu/php/chet/bash/bashtop.html]
+
== Configuration ==
 +
You can configure <code>wpa_supplicant</code> daemon by editing <code>/etc/wpa_supplicant/wpa_supplicant.conf</code>.
 +
{{file|name=/etc/wpa_supplicant/wpa_supplicant.conf|lang=|desc=wpa_supplicant daemon config|body=
 +
# provide control interface for wpa_cli and wpa_gui frontends
 +
ctrl_interface=/run/wpa_supplicant
  
== Learning Bash ==
+
# allow wpa_cli and wpa_gui to update config
 +
update_config=1
  
The following articles, written originally for IBM developerWorks by Daniel Robbins, serve as an excellent introduction to the bash shell:
+
network={
 +
ssid="SSID"
 +
psk="passphrace"
 +
}
  
* [[Bash by Example, Part 1]]
+
network={
* [[Bash by Example, Part 2]]
+
ssid="SSID2"
* [[Bash by Example, Part 3]]
+
key_mgmt=NONE
 +
}
 +
}}
  
== Moving on Command Line ==
+
== Daemon ==
 +
Start daemon with [[openrc]].
 +
<console>
 +
###i## /etc/init.d/wpa_supplicant start
 +
</console>
 +
You can also add it to default runlevel.
 +
<console>
 +
###i## rc-update add wpa_supplicant default
 +
</console>
  
{|class="table table-striped"
+
The daemon can work independently or you can use wpa_cli and wpa_gui frontends. You can also alter configs with frontends.
|| Shortcut || Description
+
|-
+
|| <code>Tab</code> || Autocomplete
+
|-
+
|| <code>Ctrl + r</code> || Search as you type from lastlog
+
|-
+
|| <code>Ctrl + a</code> || Move to the start of line
+
|-
+
|| <code>Ctrl + e</code> || Move to the end of line
+
|-
+
|| <code>Ctrl + k</code> || Cut from cursor to the end of line
+
|-
+
|| <code>Ctrl + w</code> || Cut from cursor to the previous whitespace
+
|-
+
|| <code>Ctrl + c</code> || Clear line
+
|-
+
|| <code>Ctrl + l</code> || Clear screen
+
|-
+
||<code>Alt + f</code> || Move one word forward
+
|-
+
|| <code>Alt + b</code> || Move one word backwards
+
|-
+
|| <code>Alt + d</code> || Cut from cursor to the end of word
+
|-
+
|| <code>Alt + backspace</code> || Cut from cursor to the start of word
+
  
|}
+
== Wpa_cli CLI Frontend ==
 +
You can start cli frontend by running <code>wpa_cli</code>.
 +
<console>
 +
###i## wpa_cli
 +
</console>
  
== Bash Completion ==
+
=== Scan Access Points ===
See [[Package:Bash completion|bash completion page]].
+
<console>
 +
>##i## scan
 +
OK
 +
<3>CTRL-EVENT-SCAN-STARTED
 +
<3>CTRL-EVENT-SCAN-RESULTS
 +
>##i## 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
 +
</console>
  
== Configuration Files ==
+
=== Connect to Access Point ===
=== ~/.bashrc ===
+
<console>
<code>~/.bashrc</code> gets loaded on bash startup. You can source files, put aliases, functions and export variables there.
+
>##i## add_network
{{file|name=~/.bashrc|lang=bash|desc=bash runtime configuration|body=
+
0
source /etc/profile.d/bash-completion.sh
+
>##i## set_network 0 ssid "SSID"
 +
>##i## set_network 0 psk "passphrase"
 +
>##i## enable_network 0
 +
<2>CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (reauth) [id=0 id_str=]
 +
</console>
  
export EDITOR="vim"
+
=== Save config ===
 +
<console>
 +
>##i## save_config
 +
OK
 +
</console>
  
alias mv='mv -v'
+
== Wpa_gui GUI Frontend ==
alias cp='cp -v'
+
<code>wpa_gui</code> is simple gui frontend. You can start it by running <code>wpa_gui</code>.
alias rm='rm -v'
+
<console>
 +
###i## wpa_gui
 +
</console>
  
alias e='emerge'
+
== Autoconfigure IP with dhcpcd ==
alias eu='emerge -uavDN --with-bdeps=y @world'
+
You can use [[Package:dhcpcd]] to autoconfigure ip address.
 
+
<console>
alias used='cat  ~/.bash_history {{!}} sort {{!}} uniq -c {{!}} sort -n'
+
###i## emerge -av dhcpcd
 
+
###i## /etc/init.d/dhcpcd start
calculator() {
+
</console>
        echo "$@" {{!}} bc
+
}
+
}}
+
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
 
{{EbuildFooter}}
 
{{EbuildFooter}}

Revision as of 12:06, October 3, 2014

net-wireless/wpa_supplicant


Source Repository:Repository:Gentoo Portage Tree

http://hostap.epitest.fi/wpa_supplicant/

Summary: wpa_supplicant is a cross-platform supplicant with support for open, WEP, WPA and WPA2. It handles scanning, connection and automatic reconnect to access points. wpa_supplicant has wpa_cli and wpa_gui frontends and wpa_supplicant daemon.

Use Flags

ap
Add support for access point mode
eap-sim
Add support for EAP-SIM authentication algorithm
fasteap
Add support for FAST-EAP authentication algorithm
hs2-0
Add support for 802.11u and Passpoint for HotSpot 2.0
p2p
Add support for Wi-Fi Direct mode
ps3
Add support for ps3 hypervisor driven gelic wifi
tdls
Add support for Tunneled Direct Link Setup (802.11z)
uncommon-eap-types
Add support for Wi-Fi Protected Setup
wps
Add support for Wi-Fi Protected Setup
wimax
Add support for Wimax EAP-PEER authentication algorithm
smartcard
Add support for smartcards

News

Drobbins

IP Space Migration Continues

All Funtoo user containers in the 8.28 IP space will be moving into our new IP space (172.97) over the next few days. If you have DNS set up -- be sure to watch your container and update to the new IP! container.host.funtoo.org DNS will be updated after the move.
2015-08-27 by Drobbins
Drobbins

Funtoo Hosting IP Move

Funtoo user containers with IPs in the 72.18.x.x range will be gradually migrating to new IP addresses this week. If you have DNS entries for your containers, please be aware that your DNS will need to be updated.
2015-08-11 by Drobbins
Drobbins

New ARM Stages

New ARM Stages, built with a new toolchain, are now hitting mirrors. Existing ARM users should re-install using these stages (dated Aug 3, 2015 or later,) rather than upgrade using emerge.
2015-08-06 by Drobbins
More...

WPA Supplicant

Tip

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
}

Daemon

Start daemon with openrc.

# /etc/init.d/wpa_supplicant start

You can also add it to default runlevel.

# 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.

# 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.

# wpa_gui

Autoconfigure IP with dhcpcd

You can use Package:dhcpcd to autoconfigure ip address.

# emerge -av dhcpcd
# /etc/init.d/dhcpcd start