1. iwpriv interface [private-command [private-arguments]]
功能: 用来配置无线网络接口的各种私有可选参数
iwpriv wifi0 //查看所有radio接口相关参数
iwpriv ath0 //查看bss接口相关参数
It is recommended to use the radio layer commands over the protocol layer command (wifiN commands over athN commands) when duplication exists.(当iwpriv wifi0
/ iwpriv ath0 获取到的命令有重复的时候 优先使用radio接口的命令)
iwpriv ath0 set SSID="centurylink"
iwpriv wifi0 set Channel=6iwpriv ath0 show SSID
iwpriv wifi0 show Channel
2. iwconfig
The iwconfig commands are a fixed set of commands used to set up and operate the WLAN interface. They are used in much the same way as ifconfig commands, but are specific to 802.11 device operations. Thus they interface to
the particular VAP interface. Note that the Radio Layer does not support iwconfig.
无线标准ioctl用户态工具对应iwconfig; 无线私有ioctl用户态工具对应iwpriv;
无线标准ioctl用户态工具对应iwconfig; 无线私有ioctl用户态工具对应iwpriv;
eg:
iwconfig ath0 channel 6
iwconfig ath0 rate 38M
iwconfig ath0 txpower 40
3.iwlist wifi-name scanning
wifi-name为无线网卡的名字,比如网卡eth0
功能: 扫描可用的无线网络
iwlist wlan0 scanning