//----------------------------------------------------
// Author: lanyang123456
// Date: 2012-3-19
//----------------------------------------------------
Hardware: arm Development Board ok6410
System: Linux 2.6.28 Kernel
Wireless USB Nic tengda model: w311m
Chip type rt5370
Step 1: Download the driver
Download driver from tengda Official Website
Http://www.tenda.com.cn/tendacn/Product/show.aspx? Productid = 172 & type = 2
Or go to the official website of ralink technology, a wireless chipset Solution Developer.
Http://www.ralinktech.com/en/04_support/support.php? Sn = 501
Step 2:
Decompress tar-jvxf 2011_0225_rt5370_rt5372_linux_sta_v2.5.0.20.dpo.tar.bz2
Modify makefile in the root directory of the driver source code
Platform = smdk
Linux_src =/usr/local/ARM/linux-2.6.28 (kernel source directory)
Cross_compile =/usr/local/ARM/4.2.2-Eabi/usr/bin/ARM-Linux-
Step 3:
Compilation driver
# Make
Generate the final Ko file rt5370sta. KO in the OS/Linux directory.
Step 4:
Copy rt2870sta. dat under the rt5370 driver source code directory to the/etc/wireless/rt2870sta/directory (Create/etc/wireless/rt2870sta first)
Step 5:
Load driver
Copy rt5370sta. Ko TO THE DEVELOPMENT BOARD
# Insmod rt5370sta. Ko
[Root @ ok6410 Linux] # insmod rt5370sta. Ko
Rtusb init rt2870 --->
=== Pad = c884c000, size = 512016 ====
<-- Rtmpalloctxrxringmemory, status = 0
<-- Rtmpallocadapterblock, status = 0
Usbcore: registered new interface driver rt2870
Step 6:
Enable wireless network card
Insert wireless USB Nic
Nic interface is ra0
Activate ra0
# Ifconfig ra0 up
[Root @ ok6410 Linux] # ifconfig ra0 up
(Efuse for 3062/3562/3572) size = 0x2d [2d0-2fc]
Rtmp_timerlistadd: Add timer OBJ c8893b48!
Rtmp_timerlistadd: Add timer OBJ c8893b74!
Rtmp_timerlistadd: Add timer OBJ c8893ba0!
Rtmp_timerlistadd: Add timer OBJ c8893b1c!
Rtmp_timerlistadd: Add timer OBJ c8893a98!
Rtmp_timerlistadd: Add timer OBJ c8893ac4!
Rtmp_timerlistadd: Add timer OBJ c885e6dc!
Rtmp_timerlistadd: Add timer OBJ c884dfec!
Rtmp_timerlistadd: Add timer OBJ c884e020!
Rtmp_timerlistadd: Add timer OBJ c885e774!
Rtmp_timerlistadd: Add timer OBJ c885e684!
Rtmp_timerlistadd: Add timer OBJ c885e744!
--> 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
NVM is efuse and its size = 2D [2d0-2fc]
PHY mode> error! The chip does not support 5G band 15!
Rtmpsetphymode: channel is out of range, use first channel = 1
(Efuse for 3062/3562/3572) size = 0x2d [2d0-2fc]
3. PHY mode = 9
Macvalue1 = 2
Macvalue2 = 0
MCS set = ff 00 00 00 01
<=== Rt28xx_init, status = 0
0x1300 = 00064300
Step 7: configure the Wireless Network
Configure the wireless network Essid
[Root @ ok6410 Linux] # iwconfig ra0 Essid dlut
View configurations
[Root @ forlinx6410] # iwconfig wlan0
Wlan0 IEEE 802.11bgn Essid: "dlut"
Mode: managed frequency: 2.412 GHz Access Point: 11: 22: 33: 44: 55: 66
Bit Rate = 21.7 Mb/s TX-power = 20 dBm
Retry long limit: 7 RTS thr: Off fragment thr: Off
Encryption key: Off
Power Management: On
Link quality = 43/70 signal level =-67 dBm
RX invalid nwid: 0 RX invalid crypt: 0 RX invalid frag: 0
TX excessive retries: 2 invalid MISC: 0 missed Beacon: 0
Configure Automatic IP address acquisition
In an arm-board Linux system, if you use the dhclient command, you are prompted that the command cannot be found. You must first port the command through DHCP.
For more information about port DHCP, see http://blog.csdn.net/lanyang123456/article/details/7361781.
After successful transplantation
[Root @ forlinx6410] # dhclient wlan0
Internet Systems Consortium DHCP Client v3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/AA: BB: CC: DD: EE: FF
Sending on LPF/wlan0/AA: BB: CC: DD: EE: FF
Sending on socket/fallback
Dhcpdiscover on wlan0 to strongswan 255 port 67 interval 3
Dhcpoffer from 192.168.1.254
Dhcprequest on wlan0 to strongswan 255 port 67
Dhcpack from 192.168.1.254
Bound to 192.168.1.235 -- renewal in 801 seconds.
View configurations
[Root @ forlinx6410] # ifconfig wlan0
Wlan0 link encap: Ethernet hwaddr AA: BB: CC: DD: EE: FF
Inet ADDR: 192.168.1.235 bcast: 192.168.1.255 mask: 255.255.255.0
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 99322 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1577 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX Bytes: 6920184 (6.5 MIB) TX Bytes: 185103 (180.7 kib)
After the configuration is complete, open the browser and enter the wireless account and password. Now you can access the Internet.
There is a problem: # dmesg looks at the kernel buffer and finds that it has been output all the time, somehow.
Getdesiredtssiandcurrenttssi: BBP tssi info is not ready .(
Bbpr47 = 0x4)
Asicadjusttxpower: Incorrect desired tssi or current tssi
Getdesiredtssiandcurrenttssi: BBP tssi info is not ready. (bbpr47 = 0x4)
Asicadjusttxpower: Incorrect desired tssi or current tssi
Getdesiredtssiandcurrenttssi: BBP tssi info is not ready. (bbpr47 = 0x4)
Asicadjusttxpower: Incorrect desired tssi or current tssi
Bytes -------------------------------------------------------------------------------------------
In addition, the driver Drivers/NET/wireless/rt2x00/of the system chip such as rt53 ** rt28 ** in Linux kernel 3.0.1 does not need to be downloaded and the above problems will not occur.
After the USB wireless network card is inserted, the system identifies and outputs
USB 1-1: new full speed USB device number 5 using s3c2410-ohci
USB 1-1: not running at top speed; connect to a high speed hub
USB 1-1: new USB device found, idvendor = 148f, idproduct = 5370
USB 1-1: new USB device strings: MFR = 1, Product = 2, serialnumber = 3
USB 1-1: Product: 802.11 n WLAN
USB 1-1: Manufacturer: ralink
USB 1-1: serialnumber: 1.0
Phy1-> rt2x00_set_chip: Info-chipset detected-RT: 5390, RF: 5370, Rev: 0502
.
Next, go to the driver source code directorycommon/rt2870.bin
Copy the file to the Development Board/lib/firmware/directory.
Activate wireless interfaces
[Root @ forlinx6410] # ifconfig wlan0 up
Phy1-> rt2x00lib_request_firmware: Info-loading firmware file 'rt2870. bin '.
Phy1-> rt2x00lib_request_firmware: Info-firmware detected-version: 0.236.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 0-cwmin: 3, cwmax: 4, AI
FS: 2 and txop: 102.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 1-cwmin: 4, cwmax: 5, AI
FS: 2 and txop: 188.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 2-cwmin: 5, cwmax: 10,
Ifs: 3, txop: 0.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 3-cwmin: 5, cwmax: 10,
Ifs: 7, txop: 0.
[Root @ forlinx6410] # phy1-> rt2x00mac_conf_tx: Info-configured TX queue 2-CW
Min: 4, cwmax: 10, AIFS: 3, txop: 0.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 3-cwmin: 4, cwmax: 10,
Ifs: 7, txop: 0.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 1-cwmin: 3, cwmax: 4, AI
FS: 2, txop: 94.
Phy1-> rt2x00mac_conf_tx: Info-configured TX queue 0-cwmin: 2, cwmax: 3, AI
FS: 2, txop: 47.
Then configure the Essid of the wireless network. After the IP address is automatically obtained, you can access the Internet.
Reference
Port rt73 wireless NIC Driver to ARM platform
Http://www.paulchan.tk/site? P = 36
Transplantation (switch) of wireless NIC Driver rt73)
Http://www.cnitblog.com/zouzheng/archive/2008/02/18/36358.html