wpa_supplicant 移植
到官方下载个 http://hostap.epitest.fi/wpa_supplicant/ 最新版到 http://www.openssl.org/source/ 下载个 /wpa_supplicant-0.6.9/patches 有对应补丁的源码首先先编译openssl打对应的补丁后./Configure linux-elf-mips -DB_ENDIAN linux:mipsel
到官方下载个 http://hostap.epitest.fi/wpa_supplicant/ 最新版
到 http://www.openssl.org/source/ 下载个 /wpa_supplicant-0.6.9/patches 有对应补丁的源码
首先先编译openssl
打对应的补丁后
./Configure linux-elf-mips -DB_ENDIAN linux:'mipsel-linux-gcc' shared --prefix=/home/blue/linux/wpa_supplicant-0.6.9/openssl-h
Ok,
然后
#[root@localhost wpa_supplicant]# cp defconfig .config
修改.config 里
加入 CC=mipsel-linux-gcc -L /home/blue/linux/wpa_supplicant-0.6.9/openssl-h/lib/
CFLAGS += -I/home/blue/linux/wpa_supplicant-0.6.9/openssl-h/include/
LIBS += -L/home/blue/linux/wpa_supplicant-0.6.9/openssl-h/lib/
make
copy 一个 wpa_supplicant/examples/wpa-psk-tkip.conf 到 文件系统 /etc/tkip.conf
修改tkip.conf
# WPA-PSK/TKIP
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
network={
ssid="XXX"//你的AP名
scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="htw123789"//AP密码
}
OK,打包文件系统
cd wlan/sd8686/
insmod sdio.ko gpio_sd_vcc_en_n=113 gpio_sd_cd_n=110
insmod sd8686.ko helper_name=./FwImage/helper_sd.bin fw_name=./FwImage/sd8686.bin
ifconfig eth1 192.168.0.111
iwpriv eth1 setregioncode 0x30
mkdir -p /var/run/wpa_supplicant//这个很重要,要不然会提示Failed to initialize control interface '/var/run/wpa_supplicant'.
wpa_supplicant -B -ieth1 -c/etc/tkip.conf
出现
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
不用管,不影响使用
Ok,到这里就可以ping 到路由了
# iperf-jz -t 100 -i 4 -c 192.168.0.127
------------------------------------------------------------
Client connecting to 192.168.0.127, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.0.111 port 54383 connected with 192.168.0.127 port 5001
[ 5] 0.0- 4.0 sec 680 KBytes 1.39 Mbits/sec
[ 5] 4.0- 8.0 sec 592 KBytes 1.21 Mbits/sec
[ 5] 8.0-12.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 12.0-16.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 16.0-20.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 20.0-24.0 sec 592 KBytes 1.21 Mbits/sec
[ 5] 24.0-28.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 28.0-32.0 sec 592 KBytes 1.21 Mbits/sec
[ 5] 32.0-36.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 36.0-40.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 40.0-44.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 44.0-48.0 sec 592 KBytes 1.21 Mbits/sec
[ 5] 48.0-52.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 52.0-56.0 sec 616 KBytes 1.26 Mbits/sec
[ 5] 56.0-60.0 sec 576 KBytes 1.18 Mbits/sec
[ 5] 60.0-64.0 sec 552 KBytes 1.13 Mbits/sec
[ 5] 64.0-68.0 sec 560 KBytes 1.15 Mbits/sec
[ 5] 68.0-72.0 sec 576 KBytes 1.18 Mbits/sec
[ 5] 72.0-76.0 sec 560 KBytes 1.15 Mbits/sec
[ 5] 76.0-80.0 sec 576 KBytes 1.18 Mbits/sec
[ 5] 80.0-84.0 sec 552 KBytes 1.13 Mbits/sec
[ 5] 84.0-88.0 sec 576 KBytes 1.18 Mbits/sec
[ 5] 88.0-92.0 sec 576 KBytes 1.18 Mbits/sec
[ 5] 92.0-96.0 sec 560 KBytes 1.15 Mbits/sec
[ 5] 96.0-100.0 sec 592 KBytes 1.21 Mbits/sec
[ 5] 0.0-100.0 sec 14.5 MBytes 1.22 Mbits/sec
1.2MBit=150K的速度,实现不怎么样....呵呵
更多推荐
所有评论(0)