3.修改Makefile.google了很多资料,PLATFORM决定了编译的内核树和编译工具,资料上都用了别的参数,然后还要修改很多文件。在这里使用了默认参数:PLATFORM = PC。 修改Makefile:
# 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:""
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