$ lsusb (関連箇所のみ抜粋) Bus 001 Device 004: ID 0411:01a2 BUFFALO INC. (formerly MelCo., Inc.) WLI-UC-GNM Wireless LAN Adapter [Ralink RT8070]
$ lsmod Module Size Used by (関連箇所のみ抜粋) rt2800usb 17279 0 rt2800lib 80619 1 rt2800usb rt2x00usb 11669 1 rt2800usb rt2x00lib 44799 3 rt2x00usb,rt2800lib,rt2800usb mac80211 329373 3 rt2x00lib,rt2x00usb,rt2800lib cfg80211 211002 2 mac80211,rt2x00lib rfkill 19567 2 cfg80211-->
cfg80211、mac80211の記述からnl80211でカバーできそう
iwのインストール
$ sudo apt-get install iw
サポート機能の確認
$ iw list
Wiphy phy0
(関連箇所のみ抜粋)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ AP, mesh point } <= 8,
total <= 8, #channels <= 1
-->IBSS: アドホック
managed: クライアント
AP: アクセスポイント
VLAN: 無線VLAN
monitor: 無線LANネットワーク検出
無線LANのスキャン
$ sudo iw dev wlan0 scan
iwconfigはまだ使えるようだが、これはそのうちdeprecatedされるかもしれない
$ sudo ifdown wlan0
$ iwconfig
(関連箇所のみ抜粋)
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
$ sudo ifup wlan0
$ iwconfig
(関連箇所のみ抜粋)
wlan0 IEEE 802.11bgn ESSID:"RaspiSSID"
Mode:Managed Frequency:2.462 GHz Access Point: 01:23:45:67:89:AB
Bit Rate=6.5 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[参考URL]
cfg80211 - Linux Wireless
mac80211 - Linux Wireless
nl80211 - Linux Wireless
hostapd を使用した簡単な方法で WiFi に強力な暗号化を実装する