Wireless-tools
無線LAN(IEEE802.11)のネットワークの為のツール。最新(2005-04-20)は27 拡張バージョン(WIRELESS_EXT)19
| parameter | set | get | description |
|---|---|---|---|
| name | not support | ◯ | protocol name ? |
| nwid | not support | not support | old parameter |
| freq/channel | ◯ | ◯ | |
| essid | ◯ | ◯ | |
| ap address | not support | ◯ | current AP |
| nick | ◯ | ◯ | host name ? |
| bitrate | ◯ | ◯ | |
| rts | ◯ | ◯ | RTS threshold |
| frag | ◯ | ◯ | Fragment threshold |
| mode | ◯ | ◯ | ad-hoc & managed only |
| encode/key | ◯ | ◯ | WEP 40bit or 104 bit |
| txpow | not support | not support | Tx power |
| retry | not support | not support | retry limit |
| power | not support | not support | TODO power save |
| sens | not support | not support | sensitivity |
| wireless stats | not support | ◯ | signal quality & signal level only |
| parameter | get | description |
|---|---|---|
| ap | ◯ | current AP |
| freq/channel | ◯ | |
| mode | ◯ | operation mode |
| protocol | ◯ | |
| raw/scheme | ◯ | essid? |
| parameter | get | description |
|---|---|---|
| frequency/channel | ◯ | |
| ap/accesspoints/peers | ◯ | |
| bitrate/rate | ◯ | |
| encryption/key | ◯ | |
| power | not support | TODO power save |
| txpower | not support | |
| retry | not support | |
| scanning | ◯ | |
| event | ◯ |
DONE 定義されているEVENTは以下(全てサポートするのか?)
| EVENT | description | support? |
|---|---|---|
| IWEVTXDROP | Packet dropped to excessive retry | not support (driverはcriticalにわかるわけではない) |
| IWEVQUAL | Quality part of statistics (scan) | support |
| IWEVCUSTOM | Driver specific ascii string | not support (別に特別にないし…) |
| IWEVREGISTERED | Discovered a new node (AP mode) | not support (AP mode はサポートしてない) |
| IWEVEXPIRED | Expired a node (AP mode) | not support (AP mode はサポートしてない) |
New Access Point/Cell address
The interface has joined a new Access Point or Ad-Hoc Cell, or lost its
association with it. This is the same MAC address that is reported by
iwconfig.
Scan request completed
A scanning request has been completed, results of the scan are available
(see iwlist).
Tx packet dropped
A packet directed at this address has been dropped because the interface
believes this node doesn't answer anymore (usually maximum of MAC level
retry exceeded). This is usually an early indication that the node may
have left the cell or gone out of range, but it may be due to fading or
excessive contention.
Custom driver event
Event specific to the driver. Please check the driver documentation.
Registered node
The interface has successfully registered a new wireless client/peer.
Will be generated mostly when the interface act as an Access Point (mode
master).
Expired node
The registration of the client/peer on this interface has expired. Will
be generated mostly when the interface act as an Access Point (mode mas-
ter).
Spy threshold crossed
The signal strength for one of the address in the spy list went under the
low threshold or went above than the high threshold.DONE 基本的には、signal quality,signal level, noise なんかの表示。Thresholdも指定できるらしい。頻繁にアップデートしなければ、ダメなようである。自動的に、アップデートできないので、サポートしない。
TODO 実装予定コマンド
| command | direction | description |
|---|---|---|
| connect confirm | get | 無線の接続状態の取得 |
| driver version | get | driverのversionの取得 |
| firmware version | get | firmwareのversionの取得 |
| preamble | set&get | preambleの取得、設定 |
| disconnect | set | 強制的に、接続状態を切り替える |
| power management ? | set&get | iwconfig の形式で対応できなかったら |
| data read | get ? | このコマンドで実装できるか不明 |
| data write | set ? | このコマンドで実装できるか不明 |
private ioctl の範囲は SIOCIWFIRSTPRIV(0x8BE0)〜SOOIWLASTPRIV(0x8BFF) 32 set even get odd
ifconfig みたいな奴。パラメータ等の設定など。
# iwconfig -h
Usage: iwconfig interface [essid {NN|on|off}]
[nwid {NN|on|off}]
[mode {managed|ad-hoc|...}
[freq N.NNNN[k|M|G]]
[channel N]
[ap {N|off|auto}]
[sens N]
[nick N]
[rate {N|auto|fixed}]
[rts {N|auto|fixed|off}]
[frag {N|auto|fixed|off}]
[enc {NNNN-NNNN|off}]
[power {period N|timeout N}]
[txpower N {mW|dBm}]
[commit]
# iwconfig eth1
eth1 IEEE 802.11-DS ESSID:"ioAirportAp13" Nickname:"anger"
Mode:Managed Frequency:2.412GHz Access Point: 00:A0:B0:6A:09:00
Bit Rate:11Mb/s Tx-Power=15 dBm Sensitivity=0/65535
Retry limit:16 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:4/10 Signal level:-35 dBm Noise level:-256 dBm
Rx invalid nwid:21 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:138 Missed beacon:0
無線のEVENTを表示するらしい。どういう用途で使うのかな?
# iwevent -h
Usage: iwevent [OPTIONS]
Monitors and displays Wireless Events.
Options are:
-h,--help Print this message.
-v,--version Show version of this program.
# iwevent
Waiting for Wireless Events...
07:45:35.945083 eth1 New Access Point/Cell address:00:00:00:00:00:00
07:46:23.252446 eth1 New Access Point/Cell address:00:A0:B0:6A:09:00
07:46:23.252864 eth1 New Access Point/Cell address:00:00:00:00:00:00
07:46:23.585236 eth1 New Access Point/Cell address:00:A0:B0:6A:09:00
interfaceの情報を取得する?iwconfigとの違いがいまいちわからん
# iwgetid -h
Usage iwgetid [OPTIONS] [ifname]
Options are:
-a,--ap Print the access point address
-f,--freq Print the current frequency
-m,--mode Print the current mode
-p,--protocol Print the protocol name
-r,--raw Format the output as raw value for shell scripts
-s,--scheme Format the output as a PCMCIA scheme identifier
-h,--help Print this message
# iwgetid -a eth1
eth1 Access Point/Cell: 00:A0:B0:6A:09:00
# iwgetid -f eth1
eth1 Frequency:2.412GHz
# iwgetid -m eth1
eth1 Mode:Managed
# iwgetid -p eth1
eth1 Protocol Name:"IEEE 802.11-DS"
# iwgetid -s eth1
ioAirportAp13
interfaceに設定できる値や、無線環境の情報を表示。
# iwlist -h
Usage: iwlist [interface] frequency
[interface] channel
[interface] ap
[interface] accesspoints
[interface] bitrate
[interface] rate
[interface] encryption
[interface] key
[interface] power
[interface] txpower
[interface] retry
[interface] scanning
[interface] peers
[interface] event
# iwlist eth1 channel
eth1 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 14 : 2.484 GHz
Current Frequency:2.412GHz (channel 01)
# iwlist eth1 ap
eth1 Access Points in range:
00:07:40:F1:00:5F : Quality:0/10 Signal level:-10 dBm Noise level:-256 dBm (updated)
00:07:40:56:DA:B7 : Quality:0/10 Signal level:-26 dBm Noise level:-256 dBm (updated)
00:A0:B0:6A:09:00 : Quality:0/10 Signal level:-60 dBm Noise level:-256 dBm (updated)
# iwlist eth1 rate
eth1 4 available bit-rates :
1Mb/s
2Mb/s
5.5Mb/s
11Mb/s
Current Bit Rate:11Mb/s
# iwlist eth1 key
eth1 2 key sizes : 40, 104bits
4 keys available :
[1]: off
[2]: off
[3]: off
[4]: off
Current Transmit Key: [2]
# iwlist eth1 power
eth1 Supported modes :
o Receive all packets (unicast & multicast)
o Receive Unicast only (discard multicast)
o Receive Multicast only (discard unicast)
Fixed period ; min period:0us
max period:5s
Fixed timeout ; min timeout:0us
max timeout:67.1078s
Current mode:off
# iwlist eth1 txpower
eth1 2 available transmit-powers :
0 dBm (1 mW)
15 dBm (30 mW)
Current Tx-Power=15 dBm (30 mW)
# iwlist eth1 retry
eth1 Fixed limit ; min limit:1
max limit:65535
Fixed lifetime ; min lifetime:1.024ms
max lifetime:67.1078s
Current mode:on
limit:16 lifetime:5.12s
# iwlist eth1 scanning
eth1 Scan completed :
Cell 01 - Address: 00:07:40:56:DA:B7
ESSID:"default"
Mode:Managed
Frequency:2.442GHz
Quality:0/10 Signal level:-26 dBm Noise level:-256 dBm
Encryption key:off
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
Cell 02 - Address: 00:A0:B0:6A:09:00
ESSID:"ioAirportAp13"
Mode:Managed
Frequency:2.484GHz
Quality:0/10 Signal level:-60 dBm Noise level:-256 dBm
Encryption key:off
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
Bit Rate:6Mb/s
Bit Rate:12Mb/s
Bit Rate:24Mb/s
Bit Rate:36Mb/s
# iwlist eth1 event
eth1 Wireless Events supported :
device 特有のコマンドの実装。
# iwpriv -h
Usage: iwpriv interface [private-command [private-arguments]]
interface [roam {on|off}]
interface [port {ad-hoc|managed|N}]
# iwpriv eth1
eth1 Available private ioctl :
airoioctl (8BE0) : set 8 byte & get 2047 byte
airoidifc (8BE1) : set 8 byte & get 1 int
??いまいちよくわからん。
# iwspy -h
Usage: iwspy interface [+] [MAC address] [IP address]
# iwspy eth1 + 00:A0:B0:6A:09:00
# iwspy eth1
eth1 Statistics collected:
00:A0:B0:6A:09:00 : Quality:5/10 Signal level:-38 dBm Noise level:-256 dBm (updated)
typical/average : Quality:6/10 Signal level:-70 dBm Noise level:-256 dBm (updated)