九鼎创展论坛
标题:
wpa_supplicant在android上的移植
[打印本页]
作者:
armeasy
时间:
2012-7-19 11:50
标题:
wpa_supplicant在android上的移植
wpa_supplicant在android上的移植
使用自己在linux下编译的wpa_supplicant,编辑出来的文件无法识别,使用默认的mx53包里面自带的wpa_supplicant,
出现如下错误:
/system/bin # (Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
RTMP_TimerListAdd: add timer obj d4aa9fb0!
RTMP_TimerListAdd: add timer obj d4aa9fe0!
RTMP_TimerListAdd: add timer obj d4aaa010!
RTMP_TimerListAdd: add timer obj d4aa9f80!
RTMP_TimerListAdd: add timer obj d4aa9ef0!
RTMP_TimerListAdd: add timer obj d4aa9f20!
RTMP_TimerListAdd: add timer obj d4a74b24!
RTMP_TimerListAdd: add timer obj d4a63e5c!
RTMP_TimerListAdd: add timer obj d4a63e94!
RTMP_TimerListAdd: add timer obj d4a74bc8!
RTMP_TimerListAdd: add timer obj d4a74ac4!
RTMP_TimerListAdd: add timer obj d4a74b94!
-->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
phy mode> Error! The chip does not support 5G band 5!
RTMPSetPhyMode: channel is out of range, use first channel=1
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
3. Phy Mode = 9
MCS Set = ff 00 00 00 01
<==== rt28xx_init, Status=0
0x1300 = 00064300
===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 531
ioctl[SIOCSIWGENIE]: Operation not supported on transport endpoint
===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 531
===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 531
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not ===>rt_ioctl_giwscan. 4(4) BSS returned, da3
supported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 5(5) BSS returned, data->length = 828
ioctl[SIOCSIWGENIE]: Operation not ===>rt_ioctl_giwscan. 5(5) BSS returned, da8
supported on transport endpoint
===>rt_ioctl_giwscan. 5(5) BSS returned, data->length = 828
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 5(5) BSS returned, 8
pported on transport endpoint
===>rt_ioctl_giwscan. 5(5) BSS returned, data->length = 828
ioctl[SIOCSIWGENIE]: Operation not ===>rt_ioctl_giwscan. 5(5) BSS returned, da8
supported on transport endpoint
===>rt_ioctl_giwscan. 5(5) BSS returned, data->length = 828
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not ===>rt_ioctl_giwscan. 4(4) BSS returned, da3
supported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 663
ioctl[SIOCSIWGENIE]: Operation not su===>rt_ioctl_giwscan. 4(4) BSS returned, 3
pported on transport endpoint
===>rt_ioctl_giwscan. 5(5) BSS returned, data->length = 843
ioctl[SIOCSIWGENIE]: Operation not ===>rt_ioctl_giwscan. 5(5) BSS returned, da3
supported on transport endpoint
怀疑默认的wpa_supplicant是针对atheros的,将device/fsl/imx53_loco/BoardConfig.mk中的如下
语句屏蔽掉,修改后如下:
#WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/ar6000.ko" #lqm changed.
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/rt3070sta.ko"
WIFI_DRIVER_MODULE_ARG := ""
#WIFI_DRIVER_MODULE_NAME := "ar6000" #lqm changed.
WIFI_DRIVER_MODULE_NAME := "rt3070sta"
WIFI_FIRMWARE_LOADER := ""
#WPA_SUPPLICANT_VERSION := VER_0_6_ATHEROS #lqm masked.
#BOARD_WLAN_ATHEROS_SDK := system/wlan/atheros/AR6kSDK.3.0_RC.298 #lqm masked.
#BOARD_WLAN_CHIP := AR6003 #lqm masked.
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
这是由于在external下有wpa_supplicant,wpa_supplicant_ath以及wpa_supplicant_6三个目录,我们
应该使用第一个目录,而该目录下的Android.mk前几句为:
ifndef WPA_SUPPLICANT_VERSION
WPA_SUPPLICANT_VERSION := VER_0_5_X
endif
ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
LOCAL_PATH := $(call my-dir)
......
可见,如果定义了WPA_SUPPLICANT_VERSION,如果不是为VER_0_5_X,则后面的语句不会执行,而在imx53_loco目录
却定义为VER_0_6_ATHEROS了,故将定义直接屏蔽掉,再单独编译wpa_supplicant目录即可:
source build/envsetup.sh
mm external/wpa_supplicant/ PRODUCT-imx53_loco-eng
编译完后,将会更新/out/..../system/bin下的wpa_supplicant文件。
通过adb将新生成的wpa_supplicant拷贝到开发板的/system/bin目录,然后执行:
wpa_supplicant -Dwext -ira0 -c /system/etc/wifi/wpa_supplicant.conf &
有如下提示:
/system/bin # wpa_supplicant -Dwext -ira0 -c /system/etc/wifi/wpa_supplicant.cn
f &
/system/bin # (Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
RTMP_TimerListAdd: add timer obj d4aa9fb0!
RTMP_TimerListAdd: add timer obj d4aa9fe0!
RTMP_TimerListAdd: add timer obj d4aaa010!
RTMP_TimerListAdd: add timer obj d4aa9f80!
RTMP_TimerListAdd: add timer obj d4aa9ef0!
RTMP_TimerListAdd: add timer obj d4aa9f20!
RTMP_TimerListAdd: add timer obj d4a74b24!
RTMP_TimerListAdd: add timer obj d4a63e5c!
RTMP_TimerListAdd: add timer obj d4a63e94!
RTMP_TimerListAdd: add timer obj d4a74bc8!
RTMP_TimerListAdd: add timer obj d4a74ac4!
RTMP_TimerListAdd: add timer obj d4a74b94!
-->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
phy mode> Error! The chip does not support 5G band 5!
RTMPSetPhyMode: channel is out of range, use first channel=1
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
3. Phy Mode = 9
MCS Set = ff 00 00 00 01
<==== rt28xx_init, Status=0
0x1300 = 00064300
===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 531
ioctl[SIOCSIWGENIE]==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=1)
: Operation not supported on transport endpoint
===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 531
ioctl[SIOCSIWGENIE]==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=1)
: Operation not supported on tra===>rt_ioctl_giwscan. 3(3) BSS returned, data-1
nsport endpoint
RTMP_TimerListAdd: add timer obj d4ad873c!
/system/bin #
这时ping路由:
ping 192.168.1.1
已经可以ping通了。
但是无法ping通外网,做如下设置:
ip route add default via 192.168.1.1
setprop net.dns1 192.168.1.1
这时就可以ping通外网了。
欢迎光临 九鼎创展论坛 (http://bbs.9tripod.com/)
Powered by Discuz! X3.2