Linux無線工具詳解(Wireless tools for Linux)


Wireless tools for Linux

 

Wireless tools for Linux是一個Linux命令行工具包,用來設置支持Linux Wireless Extension的無線設備。Wireless tools for Linux 和 Linux Wireless Extension 由 Jean Tourrilhes在維護,由Hewlett-Packard(HP惠普)贊助。

大多數基於Linux內核的操作系統都包含Wireless tools。在許多GNU/Linux 發行版中,都缺省安裝這個工具包,即使是沒有自動安裝,也能很容易地找到其二進制代碼安裝包。

Wireless Extension (WE)是一組通用的API,能在用戶空間對通用Wireless LANs進行配置和統計。它的好處在於僅通過一組單一的工具就能對各種各樣的Wireless LANs進行管理,不過它們是什么類型,只要其驅動支持Wireless Extension就行;另一個好處就是不用重啟驅動或Linux就能改變這些參數。

       Wireless Tools (WT)就是用來操作Wireless Extensions的工具集,它們使用字符界面,雖然粗糙,但支持所有Wireless Extension。雖然還有很多其他管理Wireless Extensions的工具,但Wireless Tools是參考實現,它包括以下工具:

        iwconfig:設置基本無線參數

        iwlist:掃描、列出頻率,比特率,密鑰等

        iwspy:獲取每個節點鏈接的質量(只能查閱與之相連的節點)

        iwpriv:操作Wireless Extensions 特定驅動

        ifrename: 基於各種靜態標准命名接口

大多數 Linux 發行版本都在其網絡初始化腳本中集成Wireless Extension,以便啟動時配置無線接口。他們還將Wireless Tools作為其標准封裝包。

 

iwconfig

iwconfig是Linux Wireless Extensions(LWE)的用戶層配置工具之一。LWE是Linux下對無線網絡配置的工具,包括內核的支持、用戶層配置工具和驅動接口的支持三部分。目前很多無線網卡都支持LWE,而且主流的Linux發布版本,比如Redhat
Linux、Ubuntu Linux都已經帶了這個配置工具。
1、iwconfig
用法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}]
[retry {limit N|lifetime N}]
[txpower N {mW|dBm}]
[commit]
說明:iwconfig是LWE最主要的工具,可以對無線網卡的大部分參數進行配置。
參數:
essid設置無線網卡的ESSID(Extension Service Set ID)。

通過ESSID來區分不同的無線網絡,正常情況下只有相同ESSID的無線站點才可以互相通訊,除非想監聽無線網絡。其后的參數為雙引號括起的ESSID字符串,或者是any/on/off,如果ESSID字符串中包含
any/no/off,則需要在前面加"--"。
示例:
#iwconfig eth0 essid any                   允許任何ESSID,也就是混雜模式
#iwconfig eth0 essid "My Network"          設置ESSID為"My Network"
#iwconfig eth0 essid -- "ANY"              設置ESSID為"ANY"


nwid: Network ID,只用於pre-802.11的無線網卡,802.11網卡利用ESSID和AP的MAC地址來替換nwid,現在基本上不用設置。
示例:
#iwconfig eth0 nwid AB34
#iwconfig eth0 nwid off


nick: Nickname,一些網卡需要設置該參數,但是802.11協議棧、MAC都沒有用到該參數,一般也不用設置。
示例:
#iwconfig eth0 nickname "My Linux Node"


mode設置無線網卡的工作模式,可以是
Ad-hoc:不帶AP的點對點無線網絡
Managed:通過多個AP組成的網絡,無線設備可以在這個網絡中漫游
Master:設置該無線網卡為一個AP
Repeater:設置為無線網絡中繼設備,可以轉發網絡包
Secondary:設置為備份的AP/Repeater
Monitor:監聽模式
Auto:由無線網卡自動選擇工作模式
示例:
#iwconfig eth0 mode Managed
#iwconfig eth0 mode Ad-Hoc


freq/channel設置無線網卡的工作頻率或者頻道,小於1000的參數被認為是頻道,大於10000的參數被認為是頻率。頻率單位為Hz,可以在數字后面附帶k, M, G來改變數量級,比如 2.4G。頻道從1開始。使用lwlist工具可以查看無線網卡支持的頻率和頻道。參數off/auto指示無線網絡自動挑選頻率。
注意:如果是Managed模式,AP會指示無線網卡的工作頻率,因此該設置的參數會被忽略。Ad-hoc模式下只使用該設定的頻率初始無線網絡,如果加入已經存在的Ad-hoc網絡則會忽略該設置的頻率參數。
示例:
#iwconfig eth0 freq 2422000000
#iwconfig eth0 freq 2.422G
#iwconfig eth0 channel 3
#iwconfig eth0 channel auto


ap連接到指定的AP或者無線網絡,后面的參數可以是AP的MAC地址,也可以是iwlist
scan出來的標識符。如果是Ad-hoc,則連接到一個已經存在的Ad-hoc網絡。使用off參數讓無線網卡不改變當前已連接的AP下進入自動模式。any/auto參數,無線網卡自動選擇最好的AP。
注意:如果無線信號低到一定程度,無線網絡會進入自動選擇AP模式。
示例:
#iwconfig eth0 ap 00:60:1D:01:23:45
#iwconfig eth0 ap any
#iwconfig eth0 ap off


rate/bit如果無線網卡支持多速率,則可以通過該命令設置工作的速率。小於1000的參數由具體的無線網卡驅動定義,一般是傳輸速率的索引值,大於1000的為速率,單位bps,可以在數字后面附帶k,
M, G來指定數量級。auto參數讓無線網卡自動選擇速率     fixed參數讓無線網卡不使用自動速率模式。
示例:
#iwconfig eth0 rate 11M
#iwconfig eth0 rate auto
#iwconfig eth0 rate 5.5M auto    //自動選擇5.5M以下的速率


txpower如果無線網卡支持多發射功率設定,則使用該參數設定發射,單位為dBm,如果指定為W(毫瓦),只轉換公式為:
dBm=30+log(W)。參數on/off可以打開和關閉發射單元,auto和fixed指定無線是否自動選擇發射功率。
示例:
#iwconfig eth0 txpower 15
#iwconfig eth0 txpower 30mW
#iwconfig eth0 txpower auto
#iwconfig eth0 txpower off  


sens設置接收靈敏度的下限,在該下限之下,無線網卡認為該無線網絡信號太差,不同的網卡會采取不同的措施,一些現代的無線網卡會自動選擇新的AP。正的參數為raw
data,直接傳給無線網卡驅動處理,一般認為是百分比。負值表示dBm值。
示例:
#iwconfig eth0 sens -80
#iwconfig eth0 sens 2


retry設置無線網卡的重傳機制。limit ‘value’ 指定最大重傳次數;lifetime
‘value’指定最長重試時間,單位為秒,可以附帶m和u來指定單位為毫秒和微秒。如果無線網卡支持自動模式,則在limit和lifetime之前還可以附加min和max來指定上下限值。
示例:
#iwconfig eth0 retry 16
#iwconfig eth0 retry lifetime 300m
#iwconfig eth0 retry min limit 8


rts指定RTS/CTS握手方式,使用RTS/CTS握手會增加額外開銷,但如果無線網絡中有隱藏無線節點或者有很多無線節點時可以提高性能。
后面的參數指定一個使用該機制的最小包的大小,如果該值等於最大包大小,則相當於禁止使用該機制。可以使用auto/off/fixed
參數。
示例:
#iwconfig eth0 rts 250
#iwconfig eth0 rts off


frag設置發送數據包的分片大小。設置分片會增加額外開銷,但在噪聲環境下可以提高數據包的到達率。一般情況下該參數小於最大包大小,有些支持Burst模式的無線網卡可以設置大於最大包大小的值來允許Burst模式。還可以使用auto/fixed/off參數。
示例:
#iwconfig eth0 frag 512
#iwconfig eth0 frag off     


key/enc[ryption]設置無線網卡使用的加密密鑰,此處為設置WEP模式的加密key,如果要使用WPA,需要wpa_supplicant工具包。密鑰參數可以是 
XXXX-XXXX-XXXX-XXXX 或者 XXXXXXXX
格式的十六進制數值,也可以是s:xxxxxx的ASCII字符。如果在密鑰參數之前加了[index],則只是設置該索引值對應的密鑰,並不改變當前的密鑰。直接指定[index]值可以設置當前使用哪一個密鑰。指定on/off可以控制是否使用加密模式。open/restricted指定加密模式,取決於不同的無線網卡,大多數無線網卡的open模式不使用加密且允許接收沒有加密的數據包,restricted模式使用加密。可以使用多個key參數,但只有最后一個生效。
WEP密鑰可以是40bit,用10個十六進制數字或者5個ASCII字符表示,也可以是128bit,用26個十六進制數字或者13個ASCII字符表示。
示例:
#iwconfig eth0 key 0123-4567-89
#iwconfig eth0 key [3] 0123-4567-89
#iwconfig eth0 key s:password [2]
#iwconfig eth0 key [2]
#iwconfig eth0 key open
#iwconfig eth0 key off
#iwconfig eth0 key restricted [3] 0123456789
#iwconfig eth0 key 01-23 key 45-67 [4] key [4]


power設置無線網卡的電源管理模式。period ‘value’ 指定喚醒的周期,timeout
‘value’指定進入休眠的等待時間,這兩個參數之前可以加min和max修飾,這些值的單位為秒,可以附加m和u來指定毫秒和微秒。off/on參數指定是否允許電源管理,all/unicast/multicast
指定允許喚醒的數據包類型。
示例:
#iwconfig eth0 power period 2
#iwconfig eth0 power 500m unicast
#iwconfig eth0 power timeout 300u all
#iwconfig eth0 power off
#iwconfig eth0 power min period 2 power max period 4


commit提交所有的參數修改給無線網卡驅動。有些無線網卡驅動會先緩存無線網卡參數修,使用這個命令來讓無線網卡的參數修改生效。不過一般不需要使用該命令,因為無線網卡驅動最終都會是參數的修改生效,一般在debug時會用到。
為了方便配置,可以把配置寫到 /etc/network/interfaces中,這樣以后就不用反復配置了。
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
echo nameserver 192.168.1.1>/etc/resolv.conf
pre-up /sbin/iwconfig eth1 essid "LW HOME LINK"
pre-up /sbin/iwconfig eth1 key s:liwei
auto usb0
iface usb0 inet static
address 192.168.0.200
netmask 255.255.255.0
auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
auto eth0
iface eth0 inet manual


ifconfig

ifconfig 是一個用來查看、配置、啟用或禁用網絡接口的工具,這個工具極為常用的。可以用這個工具來臨時性的配置網卡的IP地址、掩碼、廣播地址、網關等。也可以把它寫入一個文件中(比如/etc/rc.d/rc.local),這樣系統引導后,會讀取這個文件,為網卡設置IP地址

1.ifconfig 查看網絡接口狀態

ifconfig 如果不接任何參數,就會輸出當前網絡接口的情況;

[root@linuxchao ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:0D:27:86:41
inet addr:192.168.1.86 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::203:dff:fe27:8641/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:618 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:491238 (479.7 KiB) TX bytes:86286 (84.2 KiB)
Interrupt:5 Base address:0x8c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1692 errors:0 dropped:0 overruns:0 frame:0
TX packets:1692 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3174550 (3.0 MiB) TX bytes:3174550 (3.0 MiB)


解說:
eth0 表示第一塊網卡, 其中 HWaddr 表示網卡的物理地址,可以看到目前這個網卡的物理地址(MAC地址)是00:03:0D:27:86:41; inet addr 用來表示網卡的IP地址,此網卡的 IP地址是 192.168.1.86,廣播地址,Bcast:192.168.1.255,掩碼地址Mask:255.255.255.0

lo 是表示主機的回壞地址,這個一般是用來測試一個網絡程序,但又不想讓局域網或外網的用戶能夠查看,只能在此台主機上運行和查看所用的網絡接口。比如把 HTTPD服務器的指定到回壞地址,在瀏覽器輸入 127.0.0.1就能看到你所架WEB網站了。但只是您能看得到,局域網的其它主機或用戶無從知道;

如果想知道主機所有網絡接口的情況,請用下面的命令;
[root@linuxchao ~]#ifconfig -a

如果想查看某個端口,比如查看eth0 的狀態,就可以用下面的方法;
[root@linuxchao ~]#ifconfig eth0


2.ifconfig 配置網絡接口

ifconfig 可以用來配置網絡接口的IP地址、掩碼、網關、物理地址等;值得一說的是用ifconfig 為網卡指定IP地址,這只是用來調試網絡用的,並不會更改系統關於網卡的配置文件。如果您想把網絡接口的IP地址固定下來,目前有三個方法:一是通過各個發行和版本專用的工具來修改IP地址;二是直接修改網絡接口的配置文件;三是修改特定的文件,加入ifconfig 指令來指定網卡的IP地址,比如在redhat或Fedora中,把ifconfig 的語名寫入/etc/rc.d/rc.local文件中;

ifconfig 配置網絡端口的方法:

ifconfig 工具配置網絡接口的方法是通過指令的參數來達到目的的,我們只說最常用的參數;
ifconfig 網絡端口 IP地址 hw MAC地址 netmask 掩碼地址 broadcast 廣播地址 [up/down]

* 實例一:
比如我們用ifconfig 來調試 eth0網卡的地址
[root@linuxchao ~]#ifconfig eth0 down
[root@linuxchao ~]#ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0
[root@linuxchao ~]#ifconfig eth0 up
[root@linuxchao ~]#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:03:0D:27:86:41
inet addr:192.168.1.99 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::203:dff:fe27:8641/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:618 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:491238 (479.7 KiB) TX bytes:86286 (84.2 KiB)
Interrupt:5 Base address:0x8c00

注解: 上面的例子我們解說一下;

第一行:ifconfig eth0 down 表示如果eth0是激活的,就把它DOWN掉。此命令等同於 ifdown eth0;
第二行:用ifconfig 來配置 eth0的IP地址、廣播地址和網絡掩碼;
第三行:用ifconfig eth0 up 來激活eth0 ; 此命令等同於 ifup eth0
第四行:用 ifconfig eth0 來查看 eth0的狀態;

當然您也可以用直接在指令IP地址、網絡掩碼、廣播地址的同時,激活網卡;要加up參數;比如下面的例子;
[root@linuxchao ~]#ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0 up

* 實例二:在這個例子中,我們要學會設置網絡IP地址的同時,學會設置網卡的物理地址(MAC地址);

比如我們設置網卡eth1的IP地址、網絡掩碼、廣播地址,物理地址並且激活它;
[root@linuxchao ~]#ifconfig eth1 192.168.1.252 hw ether 04:64:03:00:12:51 netmask 255.255.255.0 broadcast 192.168.1.255 up

[root@linuxchao ~]#ifconfig eth1 hw ether 04:64:03:00:12:51
[root@linuxchao ~]#ifconfig eth1 192.168.1.252 netmask 255.255.255.0 broadcast 192.168.1.255 up

其中 hw 后面所接的是網絡接口類型, ether表示乙太網, 同時也支持 ax25 、ARCnet、netrom等,詳情請查看 man ifconfig ;


3.如何用ifconfig 來配置虛擬網絡接口

有時我們為了滿足不同的需要還需要配置虛擬網絡接口,比如我們用不同的IP地址來架運行多個HTTPD服務器,就要用到虛擬地址;這樣就省卻了同一個IP地址,如果開設兩個的HTTPD服務器時,要指定端口號。

虛擬網絡接口指的是為一個網絡接口指定多個IP地址,虛擬接口是這樣的 eth0:0 、 eth0:1、eth0:2 ... .. eth1N。當然您為eth1 指定多個IP地址,也就是 eth1:0、eth1:1、eth1:2 ... ...以此類推;

其實用ifconfig 為一個網卡配置多個IP地址,就用前面我們所說的ifconfig的用法,這個比較簡單;看下面的例子;
[root@linuxchao ~]#ifconfig eth1:0 192.168.1.251 hw ether 04:64:03:00:12:51 netmask 255.255.255.0 broadcast 192.168.1.255 up

[root@linuxchao ~]#ifconfig eth1 hw ether 04:64:03:00:12:51
[root@linuxchao ~]#ifconfig eth1 192.168.1.251 netmask 255.255.255.0 broadcast 192.168.1.255 up

注意:指定時,要為每個虛擬網卡指定不同的物理地址;

在 Redhat/Fedora 或與Redhat/Fedora類似的系統,您可以把配置網絡IP地址、廣播地址、掩碼地址、物理地址以及激活網絡接口同時放在一個句子中,寫入/etc/rc.d/rc.local中。比如下面的例子;
ifconfig eth1:0 192.168.1.250 hw ether 00:11:00:33:11:44 netmask 255.255.255.0 broadcast 192.168.1.255 up
ifconfig eth1:1 192.168.1.249 hw ether 00:11:00:33:11:55 netmask 255.255.255.0 broadcast 192.168.1.255 up

解說:上面是為eth1的網絡接口,設置了兩個虛擬接口;每個接口都有自己的物理地址、IP地址... ...


4.如何用ifconfig 來激活和終止網絡接口的連接

激活和終止網絡接口的用 ifconfig 命令,后面接網絡接口,然后加上 down或up參數,就可以禁止或激活相應的網絡接口了。當然也可以用專用工具ifup和ifdown 工具;
[root@linuxchao ~]#ifconfig eth0 down
[root@linuxchao ~]#ifconfig eth0 up
[root@linuxchao ~]#ifup eth0
[root@linuxchao ~]#ifdown eth0

對於激活其它類型的網絡接口也是如此,比如 ppp0,wlan0等;不過只是對指定IP的網卡有效。

注意:對DHCP自動分配的IP,還得由各個發行版自帶的網絡工具來激活;當然得安裝dhcp客戶端;這個您我們應該明白;

比如Redhat/Fedora
[root@linuxchao ~]#/etc/init.d/network start

Slackware 發行版;
[root@linuxchao ~]#/etc/rc.d/rc.inet1


iwlist

iwlist主要用來顯示無線網卡的一些附加信息,
useage: iwlist [interface] options
scanning 掃描一定范圍內的無線接入點和Ad-Hoc單元信息,包括ESSID,信號質量,頻段以及無線模式等
frequency 頻率
channel顯示設備支持的頻道及當前所在的頻道
rate/bitrate 設備支持的速率
encryption 加密
key 密鑰
power 電源
txpower 發送功率

retry 重傳機制
ap 本地無線接入點及信號質量
peers 直連
event 設備支持的無線事件

auth 當前設置的WPA認證參數

wpa 羅列設備上設置的所有WPA加密密鑰

modu 羅列設備支持的調制模式及當前開啟的調制模式


iwpriv

iwpriv:操作Wireless Extensions 特定驅動。通過iwpriv,我們可以得到AP的一些參數設置,也可以設置自己的WIFI參數。

[root@root- /]#iwpriv

    mlan0     Available private ioctls :
          extscan          (8BFA) : set   0 int   & get   2 char
          hostcmd          (8BE4) : set 2047 byte  & get 2047 byte
          arpfilter        (8BE6) : set 2047 byte  & get 2047 byte
          regrdwr          (8BE3) : set 256 char  & get 256 char
          sdcmd52rw        (8BFE) : set   7 byte  & get   7 byte
          sdcmd53rw        (8BFF) : set   0 char  & get   0 char
          setgetconf       (8BEA) : set 2000 byte  & get 2000 byte
          getcis           (8BE1) : set   0       & get 512 byte
          scantype         (8BEB) : set   8 char  & get   8 char
          deauth           (0001) : set   1 addr  & get   0
          getNF            (0001) : set   1 int   & get   1 int
          getRSSI          (0002) : set   1 int   & get   1 int
          bgscan           (0004) : set   1 int   & get   1 int
          enable11d        (0005) : set   1 int   & get   1 int
          adhocgrate       (0006) : set   1 int   & get   1 int
          sdioclock        (0007) : set   1 int   & get   1 int
          wmm              (0008) : set   1 int   & get   1 int
          uapsdnullgen     (000A) : set   1 int   & get   1 int
          setcoalescing    (000B) : set   1 int   & get   1 int
          adhocgprot       (000C) : set   1 int   & get   1 int
          disable_chsw     (000F) : set   1 int   & get   1 int
          setpowercons     (0001) : set   1 int   & get   1 int
          wmm_qosinfo      (0002) : set   1 int   & get   1 int
          lolisteninter    (0003) : set   1 int   & get   1 int
          psnullinterval   (0005) : set   1 int   & get   1 int
          bcnmisto         (0006) : set   1 int   & get   1 int
          ldocfg           (0008) : set   1 int   & get   1 int
          rtsctsctrl       (000F) : set   1 int   & get   1 int
          moduletype       (000B) : set   1 int   & get   1 int
          autodeepsleep    (000C) : set   1 int   & get   1 int
          enhanceps        (000D) : set   1 int   & get   1 int
          wakeupmt         (000E) : set   1 int   & get   1 int
          setrxant         (0001) : set   1 int   & get   0
          settxant         (0002) : set   1 int   & get   0
          authalgs         (0004) : set   1 int   & get   0
          encryptionmode   (0005) : set   1 int   & get   0
          setregioncode    (0006) : set   1 int   & get   0
          setlisteninter   (0007) : set   1 int   & get   0
          setmultipledtim  (0008) : set   1 int   & get   0
          setbcnavg        (0009) : set   1 int   & get   0
          setdataavg       (000A) : set   1 int   & get   0
          associate        (000B) : set   1 int   & get   0
          getregioncode    (0001) : set   0       & get   1 int
          getlisteninter   (0002) : set   0       & get   1 int
          getmultipledtim  (0003) : set   0       & get   1 int
          gettxrate        (0004) : set   0       & get   1 int
          getbcnavg        (0005) : set   0       & get   1 int
          getdataavg       (0006) : set   0       & get   1 int
          getauthtype      (0007) : set   0       & get   1 int
          getrsnmode       (0008) : set   0       & get   1 int
          act_paircipher   (0009) : set   0       & get   1 int
          act_groupcipher  (000A) : set   0       & get   1 int
          getdtim          (000B) : set   0       & get   1 int
          getrxant         (0001) : set   0       & get  12 char
          gettxant         (0002) : set   0       & get  12 char
          gettsf           (0003) : set   0       & get  12 char
          wpssession       (0004) : set   0       & get  12 char
          deepsleep        (8BFB) : set   1 char  & get   6 char
          adhocstop        (0004) : set   0       & get   0
          radioon          (0001) : set   0       & get   0
          radiooff         (0002) : set   0       & get   0
          rmaeskey         (0003) : set   0       & get   0
          crypto_test      (0006) : set   0       & get   0
          reasso-on        (0007) : set   0       & get   0
          reasso-off       (0008) : set   0       & get   0
          wlanidle-on      (0009) : set   0       & get   0
          wlanidle-off     (000A) : set   0       & get   0
          softreset        (000C) : set   0       & get   0
          sleepparams      (0002) : set  64 char  & get  64 char
          requesttpc       (0004) : set  64 char  & get  64 char
          powercap         (0005) : set  64 char  & get  64 char
          measreq          (000C) : set  64 char  & get  64 char
          bca-ts           (0003) : set  64 char  & get  64 char
          scanmode         (0006) : set  64 char  & get  64 char
          getadhocstatus   (0009) : set  64 char  & get  64 char
          setgenie         (000A) : set  64 char  & get  64 char
          getgenie         (000B) : set  64 char  & get  64 char
          qstatus          (000D) : set  64 char  & get  64 char
          ts_status        (000E) : set  64 char  & get  64 char
          setaeskey        (0001) : set  32 char  & get   0
          getaeskey        (0001) : set   1 int   & get 128 char
          version          (0002) : set   1 int   & get 128 char
          verext           (0003) : set   1 int   & get 128 char
          setwpaie         (8BE0) : set  24 char  & get   0
          setband          (0001) : set  10 char  & get   0
          setadhocch       (0002) : set  10 char  & get   0
          chanswann        (0003) : set  10 char  & get   0
          getband          (0001) : set   0       & get  10 char
          getadhocch       (0002) : set   0       & get  10 char
          getlog           (8BE9) : set   0       & get 512 char
          tpccfg           (0001) : set  16 int   & get  16 int
          scanprobes       (0006) : set  16 int   & get  16 int
          ledgpio          (0005) : set  16 int   & get  16 int
          sleeppd          (0007) : set  16 int   & get  16 int
          rateadapt        (0008) : set  16 int   & get  16 int
          getSNR           (0009) : set  16 int   & get  16 int
          getrate          (000A) : set  16 int   & get  16 int
          getrxinfo        (000B) : set  16 int   & get  16 int
          atimwindow       (000C) : set  16 int   & get  16 int
          bcninterval      (000D) : set  16 int   & get  16 int
          sdiopullctrl     (000E) : set  16 int   & get  16 int
          scantime         (000F) : set  16 int   & get  16 int
          sysclock         (0010) : set  16 int   & get  16 int
          txcontrol        (0012) : set  16 int   & get  16 int
          hscfg            (0014) : set  16 int   & get  16 int
          hssetpara        (0015) : set  16 int   & get  16 int
          inactoext        (0016) : set  16 int   & get  16 int
          dbgscfg          (0017) : set  16 int   & get  16 int
          drvdbg           (0018) : set  16 int   & get  16 int
          drvdelaymax      (001A) : set  16 int   & get  16 int
          intfctrl         (001B) : set  16 int   & get  16 int
          setquietie       (001C) : set  16 int   & get  16 int
          ctspowerctrl     (001E) : set  16 int   & get  16 int
          psmode           (001F) : set  16 int   & get  16 int
          setuserscan      (0001) : set 2000 byte  & get 2000 byte
          getscantable     (0002) : set 2000 byte  & get 2000 byte
          setmrvltlv       (0003) : set 2000 byte  & get 2000 byte
          getassocrsp      (0004) : set 2000 byte  & get 2000 byte
          addts            (0005) : set 2000 byte  & get 2000 byte
          delts            (0006) : set 2000 byte  & get 2000 byte
          qconfig          (0007) : set 2000 byte  & get 2000 byte
          qstats           (0008) : set 2000 byte  & get 2000 byte
          txpktstats       (000C) : set 2000 byte  & get 2000 byte
          getcfptable      (0009) : set 2000 byte  & get 2000 byte
          mefcfg           (000A) : set 2000 byte  & get 2000 byte
          getmem           (000B) : set 2000 byte  & get 2000 byte
       [root@root- /]#iwpriv mlan0 getband
       mlan0     getband:bg

 

 

 

Author: Willer

文章說明:以上是本人的一些見解,希望對您有幫助,如有錯誤,請指正,謝謝!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM