First of all, thanks to the USB wireless network card of ipvwn321g. I went to Zhongguancun and asked about it. The result was that this network card was too old to be sold. I bought it all for wn322g. Fortunately, the lab had bought this network card before, you can also find one for me.
Open the TP-LINK wn321g shell can view the wireless network card used by the chip, is ralink rt2571wf, so find the official website of ralink to see, find the chip Linux driver.
Http://www.ralinktech.com.tw/data/RT73_Linux_STA_Drv1.0.4.0.tar.gz
Download, decompress, and read readme carefully in the CD module to learn about the installation process on the PC. It is also very similar to the ARM platform, but it only uses a cross compiler.
# Cp-F makefile.6 makefile // use the 2.6 makefile
Of course, we also need to modify this MAKEFILE file. I will give it my MAKEFILE file.
######################################## ##############################
# Module name: makefile
# Abstract: makefile for rt73 Linux driver on Kernel series 2.6
######################################## ##############################
Wflags: =-wall-wstrict-prototypes-wno-trigraphs
Cflags + = $ (wflags)-fsigned-Char
OBJ-M: = rt73.o
Rt73-objs: = rtmp_main.o mlme. O connect. O export rtusb_io.o sync. O Assoc. O Auth. O auth_rsp.o rtusb_data.o export sanity. O rtmp_wep.o rtmp_info.o export WPA.
Kdir: = ~ Linux-2.6.14
ALL:
Make-C $ (kdir) subdirs = $ (shell PWD) Modules
Clean:
Rm-RF *. O *~ .. *. CMD *. Ko *. Mod. C. tmp_versions built-in.o
Just remove the install command and leave only the compilation command. Of course, the Directory of the kernel source code tree also needs to be modified. It is also very important to note that, I have searched the internet for 30 days. On the ARM platform, the C char type is unsigned char by default, so I need to add a-fsigned-Char option to cflags.
Otherwise, there will be a lot of warning in compilation. I am a perfect person, And I have modified the other warning, that is, to convert "/0" to '/0' in single quotes ', the definition of unused warning is gone, so I feel very perfect. compiled and generated the rt73.ko module. I copied it to my norflash jffs2 directory.
If this parameter is selected, it is compiled into a module to make the kernel small. Otherwise, the kernel will overwrite ramdisk when it is burned to norflash. Of course, it can also be compiled into the kernel.
Next, we need to configure the wireless network card tool iwconfig in Linux.
Http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
Here we can find wireless tools for Linux. download the latest version.
Http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.tar.gz
This is of course very simple. Modify the cross compiler and add
Cross =/usr/local/ARM/3.4.1/bin/ARM-Linux-
Add $ (Cross) to CC, AR, and ranlib.
For convenience, mkdir iwconfig under root
Then, change the prefix in makefile to/root/iwconfig.
In this way, the compilation result is installed in this directory.
# Make
# Make install
OK. In the/root/iwconfig directory, copy the tools in the sbin directory to the ramdisk sbin.
The library under the lib directory is also copied to the ramdisk Lib. The tool installation is complete.
The kernel is configured below. I believe you have already driven the USB to use the USB flash drive. If not
Let's take a look at this article first, S3C2410 transplantation of linux2.6.14.1 U disk cs8900a busybox detailed process http://www.linuxforum.net/forum/gshowflat.php? Cat = & board = embedded & number = 648878 & page = 0 & view = collapsed & SB = 5 & O = All & fpart =
Networking --->
<*> Generic IEEE 802.11 networking stack
<*> IEEE 802.11 WEP encryption (802.1x)
Device Drivers --->
Network Device Support --->
Wireless LAN (non-hamradio) --->
<*> Wireless LAN drivers (non-hamradio) & wireless extensions
These are wireless network-related options, which are recommended for compiling the kernel.
Test starts when the configuration is complete. If I do not have an AP, select point-to-point connection between two wireless NICs.
Configure a point-to-point network with wn322g on a Windows host. refer to the following user manual.
Set network name Dansen, Channel 1, network connection mode point-to-point, Authentication Mode Automatic Identification, network connection encryption to cancel WEP encryption, IP address 192.168.0.1
Insert wn321g and CD jffs2 on the board to write a script here.
# Insmod rt73.ko
# Ifconfig rausb0 Inet 192.168.0.3 up
# Route add default GW 192.168.0.1
# Iwconfig rausb0 Essid "Dansen"
# Iwconfig rausb0 mode ad-hoc
# Iwconfig rausb0 Channel 1
Then run the script to establish a connection with the Windows host.
Ping. OK.