I.MX6 AW-NB177NF wifi HAL 调试修改

Posted zengjf

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了I.MX6 AW-NB177NF wifi HAL 调试修改相关的知识,希望对你有一定的参考价值。

/*************************************************************************
 *                I.MX6 AW-NB177NF wifi HAL 调试修改
 * 说明:
 *     在进行android层的wifi驱动层调试中遇到很多问题,记录一下。
 *
 *                                     2016-6-25 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文章:
    Android KitKat 4.4 Wifi移植之Wifi driver
        http://blog.csdn.net/hantangsongming/article/details/27185759
    Android4.4 wpa_supplicant深入分析之wpa_supplicant初始化流程
        http://blog.csdn.net/lansefeiyang08/article/details/43734083
    linux连接无线网络之wpa_cli,wpa_supplicant 
        http://blog.chinaunix.net/uid-26585427-id-4034213.html
    Android WIFI 架构和控制流程
        http://www.oschina.net/question/54100_26375
    Android4.2移植rtl8192cu驱动要点
        http://blog.csdn.net/djman007/article/details/46731335

二、init.freescale.rc
    ......
    service rtw_suppl_con /system/bin/wpa_supplicant          -ip2p0 -Dwext -c /data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N          -iwlan0 -Dwext -c/data/misc/wifi/wpa_supplicant.conf
         class main
         socket wpa_wlan0 dgram 660 wifi wifi
         disabled
         oneshot

    service rtw_suppl /system/bin/wpa_supplicant -iwlan0 -Dwext -c/etc/wifi/wpa_supplicant.conf
         socket wpa_wlan0 dgram 660 wifi wifi
         class main
         disabled
         oneshot
    ......

三、错误:
    1. error1 :
        1. 现象:
            ioctl[SIOCSIWAP]: Operation not permitted
        2. 原因:ctrl_interface指定的路径文件无法生成获取不存在;
        3. 解决方法:
            将/system/etc/wifi/wpa_supplicant.conf里的:
                ctrl_interface=wlan0
            改为:
                ctrl_interface=/data/misc/wifi/sockets

    2. error2 :
        1. 现象:
            130|[email protected]:/ # wpa_cli                                                   
            wpa_cli v2.0-devel-4.2.2_rtw_r8680.20130821
            Copyright (c) 2004-2012, Jouni Malinen <[email protected]> and contributors

            This software may be distributed under the terms of the BSD license.
            See README for more details.



            Interactive mode

            Could not connect to wpa_supplicant: (null) - re-trying
        2. 原因:
            [email protected]:/ # wpa_cli -h                                                    
            wpa_cli [-p<path to ctrl sockets>] [-i<ifname>] [-hvB] [-a<action file>]                     [-P<pid file>] [-g<global ctrl>] [-G<ping interval>]  [command..]
              -h = help (show this usage text)
              -v = shown version information
              -a = run in daemon mode executing the action file based on events from
                   wpa_supplicant
              -B = run a daemon in the background
              default path: /data/system/wpa_supplicant     <----------------------
              default interface: first interface found in socket path
        3. 解决方法:
            wpa_cli -i wlan0 -p /data/misc/wifi/sockets

    3. error3:
        1. 现象:调试口不断输出:RTL871X: CurIGValue=34, EntryMinUndecoratedSmoothedPWDB = 34
        2. 原因:
            1. drivers/net/wireless/rtl8723bs/hal/rtl8723b/rtl8723b_dm.c
                ......
                void rtl8723b_HalDmWatchDog_in_LPS(IN   PADAPTER    Adapter)
                {
                    ......
                    DBG_871X("CurIGValue=%d, EntryMinUndecoratedSmoothedPWDB = %d\n", pDM_DigTable->CurIGValue, pHalData->EntryMinUndecoratedSmoothedPWDB );
                    ...... 
                }
            2. drivers/net/wireless/rtl8723bs/include/rtw_debug.h
                #ifdef CONFIG_DEBUG
                #if defined(_dbgdump)
                    #undef DBG_871X
                    #define DBG_871X(...)     do {\
                        _dbgdump(DRIVER_PREFIX __VA_ARGS__);                    }while(0)
                
                    #undef MSG_8192C
                    #define MSG_8192C(...)     do {\
                        _dbgdump(DRIVER_PREFIX __VA_ARGS__);                    }while(0)
                    
                    #undef DBG_8192C
                    #define DBG_8192C(...)     do {\
                        _dbgdump(DRIVER_PREFIX __VA_ARGS__);                    }while(0)
                #endif /* defined(_dbgdump) */
                #endif /* CONFIG_DEBUG */
            3. drivers/net/wireless/rtl8723bs/include/autoconf.h
                /*
                 * Debug Related Config
                 */
                #define CONFIG_DEBUG
        3. 解决办法:
            注释掉#define CONFIG_DEBUG

    4. error4:
        1. logcat现象:
            E/WifiStateMachine( 2757): Failed to load driver!
            D/WifiService( 2757): setWifiEnabled: true pid=4175, uid=1000
            E/WifiStateMachine( 2757): DriverFailedState
        2. 原因:
            将wifi驱动作为Linux kernel的内建模块去了,实际上是要做成可插入的模块才行的;
        3. 解决办法:
           编译wifi模块,并放入/system/lib/modules/目录,注意modules目录的权限。

    5. error5:
        1. logcat现象:
            ......
            D/WifiHW  ( 2684): Unable to unload driver module "wlan": No such file or directory
            E/WifiStateMachine( 2684): Failed to unload driver!
            E/WifiStateMachine( 2684): DriverFailedState
        2. 原因是:
            [email protected]:/system/lib/modules # lsmod
            8723bs 1587320 0 - Live 0x00000000
            [email protected]:/system/lib/modules # 
        3. 解决办法
            1. 需要将模块名改为wlan.ko,通过lsmod对应的的模块名,即:wlan.ko。
            2. 将wifi驱动做成Linux内置驱动,然后修改Android层的wifi驱动中insmod、rmmod方法直接return 0:
                hardware/realtek/wlan/libhardware_legacy/wifi/wifi_realtek.c
                    static int insmod(const char *filename, const char *args)
                    {
                        return 0;
                        /*
                        void *module;
                        unsigned int size;
                        int ret;

                        module = load_file(filename, &size);
                        if (!module)
                            return -1;

                        ret = init_module(module, size, args);

                        free(module);

                        return ret;
                        */
                    }
                    static int rmmod(const char *modname)
                    {
                        return 0;
                        /*
                        int ret = -1;
                        int maxtry = 10;

                        while (maxtry-- > 0) {
                            ret = delete_module(modname, O_NONBLOCK | O_EXCL);
                            if (ret < 0 && errno == EAGAIN)
                                usleep(500000);
                            else
                                break;
                        }

                        if (ret != 0)
                            ALOGD("Unable to unload driver module \"%s\": %s\n",
                                 modname, strerror(errno));
                        return ret;
                        */
                    }

    6. error6:
        1. 现象:
            E/WifiHW  ( 2703): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
        2. 解决办法:
            cat hardware/realtek/wlan/libhardware_legacy/wifi
                ......
                // static const char IFACE_DIR[]           = "/data/system/wpa_supplicant";
                static const char IFACE_DIR[]           = "/data/misc/wifi/sockets/";
                ......
            
四、logcat :
    D/dalvikvm( 3335): GC_CONCURRENT freed 444K, 48% free 3860K/7292K, paused 5ms+4ms, total 41ms
    D/WifiService( 2669): setWifiEnabled: true pid=3094, uid=1000
    D/WifiHW  ( 2669): insmod  module : /system/lib/modules/8723bs.ko
    D/BluetoothAdapter( 3094): 1100209728: getState() :  mService = null. Returning STATE_OFF
    RTL871X: module init start
    RTL871X: rtl8723bs v4.3.16_13854.20150410_BTCOEX20150119-5844
    RTL871X: build time: Jun 25 2016 15:13:46
    RTL871X: rtl8723bs BT-Coex version = BTCOEX20150119-5844
    RTL871X: register rtw_netdev_ops to netdev_ops
    RTL871X: rtw_wdev_alloc(padapter=e0f30000)
    RTL871X: rtw_hal_config_rftype RF_Type is 3 TotalTxPath is 1 
    RTL871X: Chip Version Info: CHIP_8723B_Normal_Chip_TSMC_B_CUT_1T1R_RomVer(0)
    RTL871X: EEPROM type is E-FUSE
    RTL871X: SetHwReg8723B: bMacPwrCtrlOn=1
    RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
    RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
    RTL871X: PowerOnCheck: 0x1B8 test Pass.
    RTL871X: _ReadAdapterInfo8723BS, 0x4e=0xe2
    RTL871X: hal_EfuseSwitchToBank: Efuse switch bank to 0
    RTL871X: hal_ReadEFuse_WiFi: data end at address=0xad
    RTL871X: Efuse Realmap:
    
    29 81 03 7C 51 08 28 00 62 07 0D 45 10 02 00 00 
    29 29 29 29 28 28 2F 2F 2F 2E 2E E0 FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF 2D 2D 2D 2D 2D 2D 
    2D 2D 2D 2D 2D E0 FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF 20 2C 20 00 00 00 FF FF 
    FF 29 20 11 00 00 00 FF 00 FF 12 FF FF FF FF FF 
    3E 10 01 02 23 00 00 FF 20 04 4C 02 26 06 21 02 
    0C 00 22 04 00 08 00 32 FF 21 02 0C 00 22 2A 01 
    01 00 00 00 00 00 00 00 00 00 00 00 02 00 FF FF 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 EB 00 6E 01 00 00 00 00 FF 80 A5 89 49 6E 81 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
    RTL871X: Hal_EfuseParseBTCoexistInfo_8723B: Enable BT-coex, ant_num=1
    RTL871X: Hal_EfuseParsePackageType_8723B phy efuse read 0x1FB =fc 
    RTL871X: PackageType = 0x4
    RTL871X: Hal_EfuseParseVoltage_8723B hwinfo[EEPROM_Voltage_ADDR_8723B] =62 
    RTL871X: Hal_EfuseParseVoltage_8723B pHalData->adjuseVoltageVal =6 
    RTL871X: AutoloadFail =0,
    RTL871X: pHalData->EEPROMRFGainVal=f0
    RTL871X: EEPRORFGainOffset = 0x29
    RTL871X: SetHwReg8723B: bMacPwrCtrlOn=0
    RTL871X: <==== _ReadAdapterInfo8723BS in 270 ms
    RTL871X: Hal_ChannelPlanToRegulation ChannelPlan:0x20,Regulation(2_4G/5G):0x03,0x03
    RTL871X: init_channel_set ChannelPlan ID 20 Chan num:13  
    RTL871X: rtw_alloc_macid(eth%d) if1, hwaddr:ff:ff:ff:ff:ff:ff macid:1
    RTL871X: rtw_register_early_suspend
    RTL871X: Init_ODM_ComInfo_8723b(): fab_ver=0 cut_ver=0
    RTL871X: rtw_macaddr_cfg mac addr:80:a5:89:49:6e:81
    RTL871X: bDriverStopped:1, bSurpriseRemoved:0, bup:0, hw_init_completed:0
    RTL871X: register rtw_netdev_ops to netdev_ops
    RTL871X: register rtw_netdev_if2_ops to netdev_ops
    RTL871X: rtw_wdev_alloc(padapter=e0f9e000)
    RTL871X: Hal_ChannelPlanToRegulation ChannelPlan:0x20,Regulation(2_4G/5G):0x03,0x03
    RTL871X: init_channel_set ChannelPlan ID 20 Chan num:13  
    RTL871X: rtw_alloc_macid(eth%d) if2, hwaddr:ff:ff:ff:ff:ff:ff macid:1
    RTL871X: rtw_ndev_init(wlan0)
    RTL871X: _rtw_drv_register_netdev, MAC Address (if1) = 80:a5:89:49:6e:81
    D/Tethering( 2669): sendTetherStaRTL871X: rtw_ndev_init(p2p0)
    teChangedBroadcast 1, 0, 0
    D/Tethering( 2669): InitialState.procRTL871X: _rtw_drv_register_netdev, MAC Address (if2) = 82:a5:89:49:6e:81
    essMessage what=4
    D/Tethering( 2RTL871X: module init ret=0
    669): sendTetherStateChangedBroadcast 0, 0, 0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find lo
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHRTL871X: +871x_drv - if2_open, bup=0
    W  ( 2669): check_wifi_ifname_froRTL871X: +871x_drv - drv_open, bup=0
    m_proc: find sit0
    D/WifiHW  ( 26RTL871X: FW does not exist before power on!!
    69): check_wifi_ifname_from_proc:RTL871X: SetHwReg8723B: bMacPwrCtrlOn=1
     find ip6tnl0
    D/WifiHW  ( 2669):RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
     check_wifi_ifname_from_proc: finRTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
    d wlan0
    D/WifiHW  ( 2669): checkRTL871X: PowerOnCheck: 0x1B8 test Pass.
    _wifi_ifname_from_proc: find p2p0RTL871X: Power on ok!
    
    D/WifiHW  ( 2669): check_wifi_iRTL871X: rtl8723b_FirmwareDownload fw: FW_NIC, size: 32108
    fname_from_proc: find lo
    D/WifiHRTL871X: rtl8723b_FirmwareDownload: fw_ver=23 fw_subver=0000 sig=0x5301, Month=03, Date=26, Hour=14, Minute=35
    W  ( 2669): check_wifi_ifname_froRTL871X: rtl8723b_FirmwareDownload(): Shift for fw header!
    m_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find sit0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find ip6tnl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find p2p0
    D/SoftapController( 2268): Softap fwReload - Ok
    D/CommandListener( 2268): Setting iface cfg
    D/CommandListener( 2268): Trying to bring down wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find lo
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find sit0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find ip6tnl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find p2p0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find lo
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find sit0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find ip6tnl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find p2p0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find lo
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find sit0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find ip6tnl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find p2p0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find lo
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find can1
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find tunl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find sit0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find ip6tnl0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find wlan0
    D/WifiHW  ( 2669): check_wifi_ifname_from_proc: find p2p0
    E/WifiHW  ( 2669): Unable to open connection to supplicant on "/data/misc/wifi/sockets//wlan0": Connection refused
    I/wpa_supplicant( 4014): Successfully initialized wpa_supplicant
    I/wpa_supplicant( 4014): rfkill: Cannot open RFKILL control device
    RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00070605
    RTL871X: _8051Reset8723: Finish
    RTL871X: _FWFreeToGo: Polling FW ready OK! (294, 30ms), REG_MCUFWDL:0x000706c6
    RTL871X: FWDL success. write_fw:1, 300ms
    RTL871X:  <=== rtl8723b_FirmwareDownload()
    RTL871X: HalDetectPwrDownMode(): PDN=0
    RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
    RTL871X: _init_available_page_threshold(): Enable Tx FIFO Page Threshold H:0x7676,N:0x7171,L:0x7171
    RTL871X: ===>phy_SwChnl8723B: Channel = 1
    E/WifiHW  ( 2669): Unable to open connection to supplicant on "/data/misc/wifi/sockets//wlan0": Connection refused
    RTL871X: pDM_Odm TxPowerTrackControl = 1
    RTL871X: ===>phy_SwChnl8723B: Channel = 1
    RTL871X: #### hw_var_set_opmode() -5250 iface_type(0) mode = 2 ####
    RTL871X: Using the default RF gain.
    RTL871X: MAC Address = 80:a5:89:49:6e:81
    RTL871X: start rtl8723bs_xmit_thread(wlan0)
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=9 seq=0 len=7
    RTL871X: rtw_cfg80211_init_wiphy:rf_type=3
    RTL871X: +871x_drv - if2_open, bup=0
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=1 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=2 len=7
    RTL871X: start rtl8723bs_xmit_thread(p2p0)
    RTL871X: rtw_cfg80211_init_wiphy:rf_type=3
    RTL871X: -871x_drv - if2_open, bup=1
    RTL871X: -871x_drv - drv_open, bup=1
    RTL871X: -871x_drv - if2_open, bup=1
    RTL871X: cfg80211_rtw_set_power_mgmt(p2p0) enabled:1, timeout:-1
    ADDRCONF(NETDEV_UP): p2p0: link is not ready
    RTL871X: [rtw_wx_set_pmkid] IW_PMKSA_FLUSH!
    RTL871X: set_mode = IW_MODE_INFRA
    RTL871X: set bssid:00:00:00:00:00:00
    RTL871X: [rtw_wx_set_pmkid] IW_PMKSA_FLUSH!
    RTL871X: +871x_drv - drv_open, bup=1
    RTL871X: -871x_drv - drv_open, bup=1
    I/wpa_supplicant( 4014): rfkill: RTL871X: cfg80211_rtw_set_power_mgmt(wlan0) enabled:1, timeout:-1
    Cannot open RFKILL control deviceADDRCONF(NETDEV_UP): wlan0: link is not ready
    
    RTL871X: [rtw_wx_set_pmkid] IW_PMKSA_FLUSH!
    RTL871X: set_mode = IW_MODE_INFRA
    RTL871X: set bssid:00:00:00:00:00:00
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=3 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=4 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=5 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=6 len=7
    RTL871X: [rtw_wx_set_pmkid] IW_PMKSA_FLUSH!
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=7 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=8 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=9 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=10 len=7
    RTL871X: #### hw_var_set_opmode()-5127 iface_type(1) mode=2 ####
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=11 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=12 len=7
    RTL871X: #### hw_var_set_opmode() -5250 iface_type(0) mode = 2 ####
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER MACADDR
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: LIST_NETWORKS
    E/WifiConfigStore( 2669): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory)
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SET device_name sabresd_6dq
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SET manufacturer Freescale
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SET model_RTL871X: [HW_VAR_CHECK_TXBUF] no packet in tx packet buffer (0)
    name SABRESD-MX6DQ
    I/wpa_supplicRTL871X: rtl8723b_c2h_packet_handler: C2H, ID=9 seq=13 len=7
    ant( 4014): [CTRL_IFACE]wlan0: SERTL871X: ===>phy_SwChnl8723B: Channel = 1
    T model_number SABRESD-MX6DQ
    I/wpa_supplicant( 4014): [CTRL_IFACRTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=14 len=7
    E]wlan0: SET serial_number 
    I/wpRTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=15 len=7
    a_supplicant( 4014): [CTRL_IFACE]wlan0: SET config_methods physical_display virtual_push_button keypad
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SET device_type 10-0050F204-5
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SCAN_INTERVAL 15
    D/BluetoothAdapter( 3094): 1100209728: getState() :  mService = null. Returning STATE_OFF
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER BTCOEXSCAN-STOP
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER RXFILTER-STOP
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER RXFILTER-STOP
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: AP_SCAN 1
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: RECONNECT
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: STATUS
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SET ps 1
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER SETBAND 0
    E/WifiStateMachine( 2669): Failed to set frequency band 0
    D/CommandListener( 2268): Setting iface cfg
    D/CommandListener( 2268): Trying to bring up p2p0
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SET persistent_reconnect 1
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SET device_name Android_799b
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SET p2p_ssid_postfix -Android_799b
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SET device_type 10-0050F204-5
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SET config_methods virtual_push_button physical_display keypad
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: P2P_SET conc_pref sta
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: STATUS
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: P2P_FLUSH
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: P2P_SERVICE_FLUSH
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: LIST_NETWORKS
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: AP_SCAN 1
    I/wpa_supplicant( 4014): [CTRL_IFACE]p2p0: SAVE_CONFIG
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER SCAN-ACTIVE
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: SCAN
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: DRIVER SCAN-PASSIVE
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=16 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=17 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=18 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=19 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=20 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=21 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=22 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=23 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=24 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=25 len=7
    RTL871X: ===>phy_SwChnl8723B: Channel = 2
    RTL871X: ===>phy_SwChnl8723B: Channel = 3
    RTL871X: ===>phy_SwChnl8723B: Channel = 4
    RTL871X: ===>phy_SwChnl8723B: Channel = 5
    RTL871X: ===>phy_SwChnl8723B: Channel = 6
    RTL871X: ===>phy_SwChnl8723B: Channel = 7
    RTL871X: ===>phy_SwChnl8723B: Channel = 8
    RTL871X: ===>phy_SwChnl8723B: Channel = 9
    RTL871X: IsBtDisabled=0, IsBtControlLps=0
    RTL871X: ===>phy_SwChnl8723B: Channel = 10
    RTL871X: ===>phy_SwChnl8723B: Channel = 11
    RTL871X: ===>phy_SwChnl8723B: Channel = 12
    RTL871X: ===>phy_SwChnl8723B: Channel = 13
    RTL871X: ===>phy_SwChnl8723B: Channel = 1
    RTL871X: survey done event(2c) band:0 for wlan0
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=9 seq=26 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=27 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=28 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=29 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=30 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=31 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=32 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=33 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=34 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=35 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=36 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=37 len=7
    RTL871X: rtl8723b_c2h_packet_handler: C2H, ID=11 seq=38 len=7
    RTL871X: rtw_indicate_scan_done(wlan0)
    RTL871X: IsBtDisabled=0, IsBtControlLps=0
    RTL871X: ==>rtw_ps_processor .fw_state(8)
    RTL871X: ==>ips_enter cnts:1
    RTL871X: nolinked power save enter
    RTL871X: ===> rtw_ips_pwr_down...................
    RTL871X: ====> rtw_ips_dev_unload...
    RTL871X: rtl8723bs_hal_deinit: issue H2C to FW when entering IPS
    RTL871X: rtl8723b_set_FwPwrModeInIPS_cmd()
    RTL871X: rtl8723bs_hal_deinit  polling REG_HMETFR=0x4, cnt=1 
    RTL871X: rtl8723bs_hal_deinit  polling REG_HMETFR=0x0, cnt=2 
    RTL871X: rtl8723bs_hal_deinit: write rpwm=81
    RTL871X: rtl8723bs_hal_deinit  polling 0x100=0xea, cnt=1 
    RTL871X: polling done when entering IPS, check result : 0x100=0xea, cnt=1, MAC_1cc=0xea
    RTL871X: <=== rtw_ips_pwr_down..................... in 70ms
    D/dalvikvm( 3335): GC_CONCURRENT freed 420K, 48% free 3857K/7292K, paused 5ms+3ms, total 41ms
    D/dalvikvm( 3335): GC_CONCURRENT freed 401K, 48% free 3849K/7292K, paused 4ms+2ms, total 39ms
    D/dalvikvm( 3468): GC_FOR_ALLOC freed 343K, 20% free 4252K/5312K, paused 24ms, total 24ms
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: AP_SCAN 1
    I/wpa_supplicant( 4014): [CTRL_IFACE]wlan0: BSS RANGE=ALL MASK=0xRTL871X: ==>ips_leave cnts:1
    1986
    I/wpa_supplicant( 4014): [CRTL871X: ===>  rtw_ips_pwr_up..............
    TRL_IFACE]wlan0: DRIVER SCAN-ACTIRTL871X: ===> ips_netdrv_open.........
    VE
    I/wpa_supplicant( 4014): [CTRRTL871X: rtl8723bs_hal_init: Leaving IPS in FWLPS state
    L_IFACE]wlan0: SCAN
    RTL871X: rtl8723bs_hal_init: write rpwm=40
    RTL871X: rtl8723bs_hal_init: polling cpwm ok when leaving IPS in

以上是关于I.MX6 AW-NB177NF wifi HAL 调试修改的主要内容,如果未能解决你的问题,请参考以下文章

I.MX6 AW-NB177NF WIFi 驱动移植问题

I.MX6 AW-NB177NF p2p support

I.MX6 WIFI wireless_tools 移植

i.MX6UL 开发板 WIFI热点调试解决方法

i.MX6ULL驱动开发 | 29 - 使用USB WIFI网卡(RTL8188EU)

i.MX6ULL驱动开发 | 29 - 使用USB WIFI网卡(RTL8188EU)