WIFI development environment to build

The main work to do: tell the kernel how to support existing wireless network card. We know that this process can be, and no need to get to the bottom.

When using the WIFI function, it involves two things:

 

 

 The same handset can also be used for WIFI AP mode, allowing other devices to connect to it. That is, we usually use the phone to open a hot spot.

As can be seen from this, the same WIFI card, which can operate in different modes.

For ARM board, an external wifi card, it can operate in STA mode, to connect hotspot.

Likewise, it can work with AP mode, allowing other devices to connect to it.

 

 

First ascertain which of a wifi card that selection.

Selection criterion is to look at linux kernel supports this a card, how to see it?

Open website: wireless.kernel.org ----> users -----> devices

OK card VID, PID is in the device list. General understanding of what you can, do not get to the bottom. Usually at work, will not let you go selection.

Setup the development environment:
First look at how computers and the development board is connected?
Development Boards 3 in connection with a computer.
1. Direct
This method is very simple, but very inconvenient to use.
When development board using uboot when the network card on your computer will appear as disconnected, led linux
can not transfer files between and windows.
2. hub / router
3. Some computer does not wired network card, it is only wireless network card, then you need to use a wireless router.

 

 

 

The above development board will pick a wifi card, development board itself has wired LAN. AP wifi card will assign an IP address, the assumption is
192.168.1.xxx. So the development board wired network card should use another network, such as 192.168.7.xxx.

Summarize setup the development environment:

a. Set the VMWARE network bridge, and select which card
b. Place the PC windows LAN, wired LAN card vmware linux, IP Development Board set 192.168.7.xxx (for example only), development board USB WIFI card will use 192.168.1.xxx.

Configuring the kernel to support USB WIFI card
a. Patch
tar XJF Linux-3.4.2.tar.bz2
cd Linux-3.4.2
Patch -p1 <../linux-3.4.2_camera_mini2440.patch
cp .config config_ok
b. Configuring the kernel
the card VID / PID determine which source to use. Open source directory Makefile in turn determine the name of the configuration items.
make menuconfig, search / name
cd the Drivers / NET / Wireless /
grep "0x3327" * -nr

ath/ath9k/hif_usb.c

The ath / ath9k following Makefile open, you can see

ath9k_htc-y += htc_hst.o \
hif_usb.o

obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o

You can know the configuration item is CONFIG_ATH9K_HTC

To the directory linux-3.4.2 in, make menuconfig

CI subsequent supplements.

make uImage

Configure the kernel, compile the kernel to understand and use, this place is not important.

把固件htc_9271.fw放到单板/lib/firmware下,接上USB网卡。
ifconfig wlan0 up

 

Guess you like

Origin www.cnblogs.com/-glb/p/11581061.html