移植环境:
阅读(1718) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
主机:ubuntu10.10
目标机:broadcom 7405
驱动:DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.bz2
内核:stblinux-2.6.18-7.5
wireless_tools;wireless_tools.29.tar.gz
1.首先编译内核,生成内核树。
2.解压驱动,进入目录,里面有一些说明文档,打开README_STA_usb,这里面是移植说明文档,以及一些无线网络配置参数。这在后边配置网络时会用到。
282
@> AuthMode=value
283
value
284
OPEN
For open system
285
SHARED
For shared key system
286
WEPAUTO Auto switch between OPEN and SHARED
287
WPAPSK For WPA pre-shared key (Infra)
288
WPA2PSK For WPA2 pre-shared key (Infra)
289
WPANONE
For WPA pre-shared key (Adhoc)
290
WPA Use WPA-Supplicant
291
WPA2 Use WPA-Supplicant
292
293
@> EncrypType=value
294
value
295
NONE
For AuthMode=OPEN
296
WEP
For AuthMode=OPEN or AuthMode=SHARED
297
TKIP
For AuthMode=WPAPSK or WPA2PSK
298
AES
For AuthMode=WPAPSK or WPA2PSK
299
3.修改Makefile.google了很多资料,PLATFORM决定了编译的内核树和编译工具,资料上都用了别的参数,然后还要修改很多文件。在这里使用了默认参数:PLATFORM = PC。 修改Makefile:
10
ifneq ($(TARGET),THREADX)
11
#RT28xx_DIR = home directory of RT28xx source code
12
RT28xx_DIR = $(shell pwd)
13
endif
119
ifeq ($(PLATFORM),PC)
120
# Linux 2.6
121
LINUX_SRC = /work/stblinux-2.6.18-7.5
122
#LINUX_SRC = /lib/modules/$(shell uname -r)/build
123
# Linux 2.4 Change to your local setting
124
#LINUX_SRC = /usr/src/linux-2.4
125
#LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
126
CROSS_COMPILE = /opt/toolchains/crosstools_hf-linux-2.6.18.0_gcc-4.2-11ts_uclibc-nptl-0.9.29-20070423_20090508/bin/mipsel-linux-
127
endif
编译:make
root@wang:/work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604# make
make -C tools
make[1]: 正在进入目录 `/work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools'
gcc -g bin2h.c -o bin2h
make[1]:正在离开目录 `/work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools'
/work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools/bin2h
cp -f os/linux/Makefile.6 /work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/Makefile
make -C /work/stblinux-2.6.18-7.5 SUBDIRS=/work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux modules
make[1]: 正在进入目录 `/work/stblinux-2.6.18-7.5'
WARNING: Symbol version dump /work/stblinux-2.6.18-7.5/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/rtmp_mcu.o
LD [M] /work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/rt3070sta.o
Building modules, stage 2.
MODPOST
LD [M] /work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/rt3070sta.ko
make[1]:正在离开目录 `/work/stblinux-2.6.18-7.5'
cp -f /work/wifi/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/rt3070sta.ko /tftpboot
4.编译wireless_tools
修改Makefile:
7
ifndef PREFIX
8
PREFIX = $(shell pwd)/wifi
9
endif
10
11
## Compiler to use (modify this for cross compile).
12
CC = mipsel-linux-gcc
13
## Other tools you need to modify for cross compile (static lib only).
14
AR = mipsel-linux-ar
15
RANLIB = ranlib
make;make install
root@wang:/work/wireless_tools.29/wifi# ls
include lib man sbin
root@wang:/work/wireless_tools.29/wifi# ls sbin/
ifrename iwconfig iwevent iwgetid iwlist iwpriv iwspy
5.将驱动和iw工具copy 到nfs目录
wifi为无密码类型
# insmod rt3070sta.ko
rtusb init --->
=== pAd = c00df000, size = 501336 ===
<-- RTMPAllocAdapterBlock, Status=0
usbcore: registered new driver rt2870
# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
ra0 Ralink STA
# ifconfig ra0 up
<-- RTMPAllocTxRxRingMemory, Status=0
-->RTUSBVenderReset
<--RTUSBVenderReset
Key1Str is Invalid key length(0) or Type(0)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
1. Phy Mode = 5
2. Phy Mode = 5
RTMPSetPhyMode: channel is out of range, use first channel=1
3. Phy Mode = 9
MCS Set = ff 00 00 00 01
<==== rt28xx_init, Status=0
0x1300 = 00064300
#
# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
ra0 Ralink STA ESSID:"11n-AP" Nickname:"RT2870STA"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Bit Rate:1 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=10/100 Signal level:0 dBm Noise level:-115 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
# ifconfig ra0 192.168.1.230 netmask 255.255.255.0
#
# iwlist ra0 scan
===>rt_ioctl_giwscan. 11(11) BSS returned, data->length = 1742
ra0 Scan completed :
Cell 01 - Address: E0:05:C5:78:16:2A
Protocol:802.11b/g
ESSID:"wanghuan"
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality:100/100 Signal level:-47 dBm Noise level:-92 dBm
Encryption key:off
Bit Rates:54 Mb/s
Cell 02 - Address: 00:1F:A3:14:26:05
Protocol:802.11b/g
ESSID:"CNC_A59B"
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality:83/100 Signal level:-57 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
Cell 03 - Address: 00:23:CD:45:AA:2A
Protocol:802.11b/g/n
ESSID:"WUPENG-PC_Network"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:57/100 Signal level:-67 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD2C0050F204104A0001101044000102105700010010470010565AA94967C14C0EAA8FF349E6F59311103C000101
Cell 04 - Address: 00:07:63:15:DD:66
Protocol:802.11b/g/n
ESSID:"sunniwell-1608"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:100/100 Signal level:-37 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:150 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Cell 05 - Address: D8:5D:4C:22:67:CA
Protocol:802.11b/g
ESSID:"Sunniwell-MeetingRoom-1608"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:100/100 Signal level:-43 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Preauthentication Supported
Cell 06 - Address: 00:1D:0F:84:1C:CE
Protocol:802.11b/g
ESSID:"BJHY"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:68/100 Signal level:-63 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Preauthentication Supported
Cell 07 - Address: F4:EC:38:4F:EA:FE
Protocol:802.11b/g/n
ESSID:"sp_wire"
Mode:Managed
Frequency:2.452 GHz (Channel 9)
Quality:52/100 Signal level:-69 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD0E0050F204104A0001101044000102
Cell 08 - Address: 00:03:0F:0E:D3:27
Protocol:802.11b/g
ESSID:"DCW-BR54+"
Mode:Managed
Frequency:2.457 GHz (Channel 10)
Quality:42/100 Signal level:-73 dBm Noise level:-82 dBm
Encryption key:on
Bit Rates:54 Mb/s
Cell 09 - Address: 00:18:F8:28:46:42
Protocol:802.11b/g
ESSID:"node2"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:99/100 Signal level:-51 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Cell 10 - Address: 00:1B:2F:6A:9D:0E
Protocol:802.11b/g
ESSID:"NETGEAR"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:68/100 Signal level:-63 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
Cell 11 - Address: 94:0C:6D:11:91:9E
Protocol:802.11b/g/n
ESSID:"www.yeekang.com"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:42/100 Signal level:-73 dBm Noise level:-68 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
# iwpriv ra0 set SSID="wanghuan"
# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
ra0 Ralink STA ESSID:"wanghuan" Nickname:"RT2870STA"
Mode:Managed Frequency=2.412 GHz Access Point: E0:05:C5:78:16:2A
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=100/100 Signal level:-17 dBm Noise level:-83 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
#
# iwconfig ra0 ap auto
# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=11.456 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=7.625 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=3.642 ms
64 bytes from 192.168.1.1: seq=3 ttl=64 time=1.526 ms
64 bytes from 192.168.1.1: seq=4 ttl=64 time=7.040 ms
64 bytes from 192.168.1.1: seq=5 ttl=64 time=2.251 ms
--- 192.168.1.1 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 1.526/5.590/11.456 ms
相关热门文章
给主人留下些什么吧!~~
评论热议