错误信息
代码语言:javascript复制root@TinaLinux:/# wifi_connect_ap_test test test
==================================
connect wpa_supplicant failed,please check wifi driver!
wifi on failed
代码语言:javascript复制root@TinaLinux:/# wifi_connect_ap_test ssid_ubuntu 123456785
==================================
Connecting to the network(ssid_ubuntu)......
[ 49.066175] [STA_WRN] Freq 2412 (wsm ch: 1) prev: 3.
[ 49.072027] wlan0: authenticate with e4:26:8b:89:a9:f8 (try 1)
[ 49.083424] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 49.083424] [primary_chan :0x00000001]
[ 49.083424] [ht_param :0x00000000]
[ 49.083424] [operation_mode:0x00000017]
[ 49.083424] [stbc_param :0x00000000]
[ 49.083424] [basic_set[0] :0x00000000]
[ 49.111324] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 49.111324] [ModemFlags :0x00000007]
[ 49.111324] [ChWidthCfg :0x00000000]
[ 49.111324] [PriChCfg :0x00000000]
[ 49.111324] [BandCfg :0x00000000]
[ 49.111324] [STBC_Enable :0x00000000]
[ 49.111324] [PreambleCfg :0x00000000]
[ 49.111324] [SGI_Enable :0x00000000]
[ 49.111324] GF_Enable :0x00000000]
[ 49.173244] wlan0: authenticated
[ 49.177518] wlan0: associate with e4:26:8b:89:a9:f8 (try 1)
[ 49.192728] wlan0: RX AssocResp from e4:26:8b:89:a9:f8 (capab=0x1431 status=0 aid=78)
[ 49.202004] wlan0: associated
[ 49.212504] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 49.217367] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 49.217843] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 49.217843] [ModemFlags :0x00000007]
[ 49.217843] [ChWidthCfg :0x00000000]
[ 49.217843] [PriChCfg :0x00000000]
[ 49.217843] [BandCfg :0x00000000]
[ 49.217843] [STBC_Enable :0x00000000]
[ 49.217843] [PreambleCfg :0x00000001]
[ 49.217843] [SGI_Enable :0x00000001]
[ 49.217843] [GF_Enable :0x00000000]
[ 49.347203] [TXRX_WRN] [RX] IF=0, No key found.
[ 49.652668] [TXRX_WRN] [RX] IF=0, No key found.
[ 49.859090] [TXRX_WRN] [RX] IF=0, No key found.
[ 51.700693] [TXRX_WRN] [RX] IF=0, No key found.
[ 51.906338] [TXRX_WRN] [RX] IF=0, No key found.
[ 53.646240] [TXRX_WRN] [RX] IF=0, No key found.
[ 53.851963] [TXRX_WRN] [RX] IF=0, No key found.
[ 55.694229] [TXRX_WRN] [RX] IF=0, No key found.
[ 57.641342] [TXRX_WRN] [RX] IF=0, No key found.
[ 59.288146] wlan0: deauthenticating from e4:26:8b:89:a9:f8 by local choice (reason=3)
[ 59.297210] [WSM_WRN] Issue unjoin command(TX).
[ 59.303604] [WSM_WRN] STA mode, send_deauth_to_self
[ 59.309107] [TXRX_WRN] Issue unjoin command(TX) by self.
spi nand 自带的固件是这样的
整理一下Wi-Fi的启动流程: 1.系统启动通过sunxi-rf驱动读取board.dts配置,解析供电,sdio,引脚,时钟等配置。完成上电动作。 2.驱动加载时完成扫卡,下载firmware,add wlan0 interface。 3.系统的自启动脚本在etc/init.d/wpa_supplicant中启动服务,启wlan0。 4.利用wpa_cli/wifimanager进行应用的操作。
建议排查思路: 1.系统起来执行lsmod 查看xradio_mac/xradio_core/xradio_wlan(也有可能是单ko的形式xr829)驱动是否加载成功。 顺便提一下驱动加载失败最常见的错误:
代码语言:javascript复制1.供电不匹配。
2.扫卡时失败,sdio配置错误。
3.下载firmware失败。(注意路径:默认是/lib/firmware)
2.执行ps | grep wpa_supplicant查看服务是否启动。 也可以直接执行
代码语言:javascript复制./etc/init.d/wpa_supplicant start //再次手动启动
服务启动失败的常见原因:
代码语言:javascript复制1.前面驱动加载已经失败了,导致没有wlan0 interface.
2.配置文件不存在比如:wpa_supplicant.conf。默认是在/etc/wifi、目录下
3.文件存在,但是文件系统只读,导致无法对配置文件写操作。
可以手动执行wpa_supplicant命令起服务就可以看到提示如下:
代码语言:javascript复制Successfully initialized wpa_supplicant
[ 796.252780] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
mkdir[ctrl_interface=/etc/wifi/sockets]: **Read-only file system**
Failed to initialize control interface '/etc/wifi/sockets'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
解决办法: 1.直接修改文件系统,换成可读写的,例如ext4. 2.可以自己临时创建配置文件到/tmp目录。
原贴链接:https://bbs.aw-ol.com/topic/427/