wifi iw tool introduce


目录

[隐藏]

 About iw

iw is a new nl80211 based CLI configuration utility for wireless devices. It supports almost all new drivers that have 
been added to the kernel recently.

iw is still under development. Features are added 'as we go'. The only documentation that exists for iw is this page.
 Please help expand it.

There is a page listing use cases with iwconfig and iw: replacing iwconfig. 

Getting iw

Release tarballs of iw are available from http://linuxwireless.org/download/iw/.

Alternatively, you can download iw from git: http://git.sipsolutions.net/iw.git, the web interface can also create tarballs
 for arbitrary revisions. 

Build requirements

    
    libnl >= libnl1

    libnl-dev >= libnl-dev-1
    pkg-config 

Using iw requires you to have libnl, the first working version is 1.0 pre8 as this release introduced genl, Generic Netlink,
which nl80211 relies on. Most distributions are shipping 1.1 these days. If your distribution's libnl is a wrong version 
then you'll have to download and compile libnl yourself for now (http://git.kernel.org/?p=libs/netlink/libnl.git;a=summary). 

 How to Build

cd iw 

make 

sudo make install

 Table iw and iwconfig comparison for common scenarios

 

Optioniwconfigiw
Getting device capabilitiesiwconfigiw list
Scanningiwlist wlan0 scaniw dev wlan0 scan
Getting info on wlan0iwconfig wlan0iw dev wlan0 link
Connecting to an open networkiwconfig wlan0 essid xyziw wlan0 connect xyz
Setting the channeliwconfig wlan0 essid xyz freq 2432iw wlan0 connect xyz 2432
Connecting to a protectd network(WPA/WPA2)
  • Use wpa_supplicant with the -te nl80211 option:
  • wpa_supplicant -i wlan0 -Dnl80211 -c <config file>
  • Use wpa_supplicant with the -te nl80211 option:
  • wpa_supplicant -i wlan0 -Dnl80211 -c <config file>
  • Connecting to a protected network(WEP)iwconfig wlan0
  • key s:abcde iwconfig wlan0 key
  • [2]0011223344 1
  • iwconfig wlan0 key '[2]'
  • iwconfig wlan0 essid xyz
  • iw wlan0 connect xyz keys
  • 0:abcde d:1:0011223344
Join an IBSS
  • iwconfig wlan0 mode ad-hoc
  • iwconfig wlan0 essid xyz
  • iw wlan0 set type ibss
  • iw wlan0 ibss join xyz
Leave an IBSSiwconfig wlan0 essid offiw wlan0 ibss leave
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值