wenshanshan0824
wenshanshan0824
采纳率0%
2016-11-08 14:14

求助!使用wpa_supplicant连接WIFI问题

公司有个项目需要手机同时打开wifi+4g
wifi链接专用设备, 4G与外网通信
(众所周知,手机打开wifi后,4g将自动关闭)

研发阶段用的 红米手机,通过如下方法能实现

adb命令:

挂载wifi网卡
insmod /system/lib/modules/wlan.ko
开启wifi网卡
netcfg wlan0 up
后台链接wifi
wpa_supplicant -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -B
dhcp自动获取ip
dhcpcd wlan0
设置路由
ip route add 192.0.0.0/8 dev wlan0

临上线客户选用了mate s 手机,机子采购回来以后,先root然后adb执行如上命令,到wpa_supplicant -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -B这句的时候
logcat显示
11-08 20:09:08.338 13647-13647/? E/wpa_supplicant: interface wlan0
11-08 20:09:08.582 13647-13647/? I/wpa_supplicant: rfkill: Cannot open RFKILL control device
11-08 20:09:08.338 13647-13647/? E/wpa_supplicant: WIFI_lib_init WIFI_lib_init WIFI_lib_init WIFI_lib_init
11-08 20:09:08.341 13647-13647/? I/wpa_supplicant: nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
11-08 20:09:08.470 13647-13647/? E/wpa_supplicant: Own WAPI MAC address: dc:ee:06:f0:00:30

11-08 20:09:08.582 13647-13647/? E/wpa_supplicant: interface p2p-dev-wlan0
11-08 20:09:08.582 13647-13647/? I/wpa_supplicant: rfkill: Cannot open RFKILL control device
11-08 20:09:08.582 13647-13647/? E/wpa_supplicant: Could not read interface p2p-dev-wlan0 flags: No such device
11-08 20:09:08.588 13647-13647/? I/wpa_supplicant: nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
11-08 20:09:08.588 13647-13647/? E/wpa_supplicant: Own WAPI MAC address: 00:00:00:00:00:00

后面dhcp的就卡住不会执行了.....
看样子是没有链接上wlan

已经折腾了一周多了,google,baidu相关的资料很少.
有没有高手知道这个问题大概出在什么地方呢?求大师指条明路,

另外,华为机子里没有wifi模块/system/lib/modules/wlan.ko
但是关闭wifi后模块不会被卸载所以没有执行/system/lib/modules/wlan.ko,不知道有没有影响

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

相关推荐