专注于Linux系统移植及应用开发
RSS
>
热门关键字:  s3c2410x  linux  u-boot  yaffs  weiyan
当前位置 :| 伟研科技>成功案例>

ad hoc wifi 组网

来源:伟研科技 作者: 时间:2008-10-09 点击:

客户端:
[root@WEIYAN /]$ insmod rt73.ko   加载驱动
rtusb init ====>
usbcore: registered new driver rt73
[root@WEIYAN /]$ usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: configuration #1 chosen from 1 choice
idVendor = 0x148f, idProduct = 0x2573
idVendor2 = 0x4600, idProduct2 = 0xc3f0
idVendor = 0x148f, idProduct = 0x2573

[root@WEIYAN /]$ ifconfig rausb0 up  打开无线网卡
rt73 driver version - 1.0.4.0

[root@WEIYAN /]$ ifconfig eth0 down 关闭以太网

[root@WEIYAN /]$ iwconfig rausb0 mode ad-hoc  设置AD-HOC模式
[root@WEIYAN /]$ iwconfig rausb0 essid weiyan  设置接入点

[root@WEIYAN /]$ iwconfig rausb0
rausb0    RT73 WLAN  ESSID:"weiyan" 
          Mode:Ad-Hoc  Frequency=2.412 GHz  Cell: BE:5C:23:88:5C:75  
          Bit Rate=11 Mb/s  
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=87/100  Signal level:-52 dBm  Noise level:-79 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[root@WEIYAN /]$ ifconfig rausb0 192.168.2.22  设置无线网络IP
[root@WEIYAN /]$ ping 192.168.2.33     测试与服务端的连接状态
PING 192.168.2.33 (192.168.2.33): 56 data bytes
64 bytes from 192.168.2.33: seq=0 ttl=64 time=11.946 ms
64 bytes from 192.168.2.33: seq=1 ttl=64 time=5.332 ms
64 bytes from 192.168.2.33: seq=2 ttl=64 time=3.692 ms
64 bytes from 192.168.2.33: seq=3 ttl=64 time=4.038 ms
64 bytes from 192.168.2.33: seq=4 ttl=64 time=3.469 ms

--- 192.168.2.33 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 3.469/5.695/11.946 ms

[root@WEIYAN /]$ wget http://192.168.2.33/busybox    通过http协议下载服务端的busybox文件
Connecting to 192.168.2.33 (192.168.2.33:80)
busybox              100% |*******************************|   731k 00:00:00 ETA
[root@WEIYAN /]$ ll busybox
-rw-r--r--    1 root     root       749104 Aug 29 00:03 busybox

 

联系我们