这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
note:bearchild:wpa_supplican_introduction [2017/05/05 22:23] BearChild |
note:bearchild:wpa_supplican_introduction [2017/06/14 18:06] (当前版本) BearChild |
||
---|---|---|---|
行 1: | 行 1: | ||
====== Wpa_supplicant - 树莓派wifi管理器 ====== | ====== Wpa_supplicant - 树莓派wifi管理器 ====== | ||
wpa_supplicant本是开源项目源码,被谷歌修改后加入Android移动平台,它主要是用来支持WEP,WPA/WPA2和WAPI无线协议和加密认证的,它隐藏了WIFI认证的具体细节,使Linux上的WIFI更加"亲民". | wpa_supplicant本是开源项目源码,被谷歌修改后加入Android移动平台,它主要是用来支持WEP,WPA/WPA2和WAPI无线协议和加密认证的,它隐藏了WIFI认证的具体细节,使Linux上的WIFI更加"亲民". | ||
+ | |||
==== 使用方法 ==== | ==== 使用方法 ==== | ||
+ | 如果你是第一次使用,运行: | ||
+ | <code> | ||
+ | $ wpa_passphrase <wifi名称> [密码] |sudo tee /etc/wpa.conf | ||
+ | $ sudo reboot | ||
+ | </code> | ||
+ | 是的,WIFI链接就是如此简单. | ||
+ | |||
+ | ==== 配置文件 ==== | ||
首先,让我们看一看 /etc/wpa_supplicant/wpa_supplicant.conf 的配置 | 首先,让我们看一看 /etc/wpa_supplicant/wpa_supplicant.conf 的配置 | ||
<code> | <code> | ||
行 40: | 行 49: | ||
psk=bc080289d81bd133a52e4b5525a1a567eae478d907b2e35effaf84bf7ff3859e | psk=bc080289d81bd133a52e4b5525a1a567eae478d907b2e35effaf84bf7ff3859e | ||
} | } | ||
- | </code> | ||
- | |||
- | ssid :接入点名称,这个没什么好说的 | ||
- | scan_ssid=1 :这个很容易错过,如果你的无线接入点是隐藏的,那么这个就是必须设置为一。 | ||
- | psk=xx :是加密后的密码,用wpa_passphrase自动生成 | ||
- | |||
- | <code> | ||
- | # proto: list of accepted protocols ---支持的协议列表 | ||
- | # WPA = WPA/IEEE 802.11i/D3.0 | ||
- | # RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN) ---也能使用WPA2,它只是RSN的一个别名而已 | ||
- | # If not set, this defaults to: WPA RSN ---如果不设置,默认就是WPA RSN,即全部支持 | ||
- | </code> | ||
- | |||
- | |||
- | <code> | ||
- | key_mgmt: list of accepted authenticated key management protocols ---支持的协议列表 | ||
- | WPA-PSK = WPA pre-shared key (this requires 'psk' field) ---一般都是这个,这就包括了WPA、WPA2开始的那些方式 | ||
- | WPA-EAP = WPA using EAP authentication ---这个就是WEP开头的,猜的,求验证 | ||
- | IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically generated WEP keys | ||
- | NONE = WPA is not used; plaintext or static WEP could be used ---这个是开放的,没密码,联通、电信之类的就这个 | ||
- | WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms | ||
- | WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms | ||
- | If not set, this defaults to: WPA-PSK WPA-EAP ---如果未设置,默认支持WAP、WEP开头那些 | ||
- | </code> | ||
- | |||
- | |||
- | <code> | ||
- | pairwise: list of accepted pairwise (unicast) ciphers for WPA ---WPA可用的加密方式列表 | ||
- | CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] ---看到没,这个就是AES,换了马甲而已 | ||
- | TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] ---TKIP 这个倒是没变 | ||
- | NONE = Use only Group Keys (deprecated, should not be included if APs support pairwise keys) ---这个估计很少用 | ||
- | If not set, this defaults to: CCMP TKIP ---不设置的话是CCMP TKIP,看似正确,其实有些路由器无法自动识别,只能二选一,很坑爹。 | ||
</code> | </code> | ||