1. Kernel configuration
1、Networking support
> wireless
2、Device Drivers
> Network device support
> wireless LAN
Second, drive compilation
1. Configure wifi chip model
2. Add a new platform
ifeq ($(CONFIG_PLATEORM_HI3520D), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
CROSS_COMPILE := arm-hisiv500-linux-
KVER := $(shell uname -r)
KSRC := /home/huabiao/share/3520DV400/3520DV400_1040/linux-3.18.y
ARCH := arm
MODULE_NAME := wlan
endif
3、make
4. Insert the driver wlan.ko
5. ifconfig wlan0 up ifconfig -a View wireless network card
Three, wpa_supplicant tool transplantation
tar -xvf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
cd ./wpa_supplicant_hostapd-0.8_rtw_r7475.20130812/wpa_supplicant/
Modify the cross compiler
Add a line
CC=arm-hisiv500-linux-gcc
Then execute
make clean;make
Four, wifi connection
1. Put this file in the /app/wpa.conf directory of the lower computer. The contents are as follows:
- ctrl_interface=/tmp/wpa_supplicant
- update_config=1
- network={
- ssid="imlsq"
- key_mgmt=WPA-PSK
- proto=RSN WPA WPA2
- pairwise=TKIP CCMP
- group=TKIP CCMP
- psk="123456"
2. Copy the 3 files wpa_supplicant, wpa_cli and wpa_passphrase to the / bin directory, as shown below:
The key step, connect wifi command
wpa_supplicant -B -Dwext -iwlan0 -c /app/wpa.conf &
If it is to obtain a dynamic IP address
udhcpc -i wlan0 &
If it is to set a static IP address
ifconfig wlan0 192.168.3.30
The following picture obtains IP successfully