I.MX6 wpa_applicant 开启 debug 输出

简介: /*********************************************************************** * I.MX6 wpa_applicant 开启 debug 输出 * 说明: * 当我们在使用一些工具的时候,为了有助于调试,打开调试功能很多时候 * 是一种需求。
/***********************************************************************
 *                I.MX6 wpa_applicant 开启 debug 输出
 * 说明:
 *     当我们在使用一些工具的时候,为了有助于调试,打开调试功能很多时候
 * 是一种需求。
 *
 *                                   2016-6-28 深圳 南山平山村 曾剑锋
 **********************************************************************/

一、修改:
    external/wpa_supplicant_8/src/utils/wpa_debug.c 
        ......
        // int wpa_debug_level = MSG_INFO;
        int wpa_debug_level = MSG_DEBUG;
        ......
        void wpa_printf(int level, const char *fmt, ...) {
            va_list ap;
        
            va_start(ap, fmt);
            if (level >= wpa_debug_level) {
        #ifdef CONFIG_ANDROID_LOG
                __android_log_vprint(wpa_to_android_level(level),
                             ANDROID_LOG_NAME, fmt, ap);
        #else /* CONFIG_ANDROID_LOG */
            ......
        }

二、logcat查看运行效果:
    D/wpa_supplicant( 3980): wpa_supplicant v2.0-devel-4.2.2_rtw_r8680.20130821
    D/wpa_supplicant( 3980): random: Trying to read entropy from /dev/random
    I/wpa_supplicant( 3980): Successfully initialized wpa_supplicant
    D/wpa_supplicant( 3980): Initializing interface 'wlan0' conf '/etc/wifi/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
    D/wpa_supplicant( 3980): Configuration file '/etc/wifi/wpa_supplicant.conf' -> '/etc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 3980): Reading configuration file '/etc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 3980): update_config=1
    D/wpa_supplicant( 3980): ctrl_interface='/data/misc/wifi/sockets'
    D/wpa_supplicant( 3980): eapol_version=1
    D/wpa_supplicant( 3980): ap_scan=1
    D/wpa_supplicant( 3980): fast_reauth=1
    E/wpa_supplicant( 3980): wlan0: Unsupported driver 'nl80211'
    D/wpa_supplicant( 3980): Failed to add interface wlan0
    D/wpa_supplicant( 3980): wlan0: Cancelling scan request
    D/wpa_supplicant( 3980): wlan0: Cancelling authentication timeout

 

目录
打赏
0
0
0
0
12
分享
相关文章
I.MX6 开启 1000Mb/s interface
/*********************************************************************** * I.MX6 开启 1000Mb/s interface * 说明: * 最近出现1000Mb/s网卡不用的现象,于是tony对这个问题进行了解决。
555 0
【PR】视频输出的一些设置
【PR】视频输出的一些设置
163 0
【PR】视频输出的一些设置
devc++中debug无法正常使用(debug启动后无反应)
devc++中debug无法正常使用(debug启动后无反应)
851 0
在cmd里面输入debug
听说是04年某锦标赛NO.1作品。全指令,做出的画面仿CS带音乐。     使用方法。 复制以下代码放入C盘根目录下,然后,开始--运行--cmd--在cmd里面输入debug
827 0
Qt日志重定向qInstallMessageHandler,输出Log至文件及网络
Qt日志重定向qInstallMessageHandler,输出Log至文件及网络
1065 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等