Chinaunix首页 | 论坛 | 博客
  • 博客访问: 287379
  • 博文数量: 68
  • 博客积分: 1121
  • 博客等级: 少尉
  • 技术积分: 634
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-01 09:43
文章分类
文章存档

2014年(1)

2013年(8)

2012年(37)

2011年(22)

分类:

2012-12-07 15:33:59

原文地址:Wireless WiFi驱动及工具 作者:wqhl.mark


Hardware Interfaces: USB, SDIO, PCMCIA, PCI....

Drivers Hierarchy:

Wireless Extension: to patch kernel

Woreless Tools: to generate the
              tools like iwconfig iwevent iwgetid iwlist iwspy iwpriv
              library libiw.so.xx

Configurations:
        ifconfig wlan0 down;
        ifconfig wlan0 192.168.1.23
        iwconfig wlan0 essid linksys     // the same as AP's ssid
        iwconfig wlan0 mode Manager      // i.e. iw_mode=2, the channel should be also same as AP's and can be set via iwconfig wlan0 channel channel_No
        iwconfig
        Ping AP: ping 192.168.1.44
        surfe on the web:
              route add default gw 192.168.1.1
              append the DNS resolve: vi /tmp/var/tmp/resolv.conf and add nameserver like 'nameserver xxxxxx'
             
wpa_supplicant:
        cross-compiling the wpa_supplicant package to generate the binary command: wpa_supplicant, wpa_cli. wpa_supplicant acts as server and wpa_cli as client to searching,setting and connecting network.
        In most cases, if wpa_supplicant.conf is ok, wpa_supplicant will establish the connection with network.

wpa_supplicant.conf:
        可有可无,没有的话无法用wpa_cli terminate来关闭wpa_supplicant
ctrl_interface=/var/run/wpa_supplicant

# 确保只有root用户能读取WPA的配置,可有可无,尤其是在嵌入式设备上
ctrl_interface_group=0

# 使用wpa_supplicant来扫描和选择AP,也可以设置成0或2,但只有1才能正确工作
ap_scan=1


network={
#AP的名字
ssid="my_network"
#AP的key
psk="my_key"
}


edit /etc/network/interface
xxxxxx

        Then, It is OK!


Some useful information and tools on WiFi:
1.     Airopeek: wireless network sniffer tools with hack functionalities
       : 伙聚WiFi无线联盟

2. a、安装wpa_supplicant  apt-get install wpasupplicant

  b、创建/etc/wpa_supplicant.conf包含以下内容:

  network={

  ssid="你的无线网ssid"

  psk="你的wpa口令"

  key_mgmt=WPA-PSK

  proto=WPA

  pairwise=TKIP

  }

  c、编辑/etc/network/interfaces

  iface eth1 inet dhcp

  pre-up wpa_supplicant -Bw -Dwext -ieth1 -c/etc/wpa_supplicant.conf

  post-down killall -q wpa_supplicant

  注:eth1是你的,并且假设你使用dhcp协议。

  d、启动你的网卡

  ifup eth1

  如果有必要请关闭你的有线网络(ifdown eth0),防止路由问题。

===========EOF============

阅读(1128) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~