zoukankan      html  css  js  c++  java
  • imx6Q rtl8188etv Android4.3 驱动调试记录

    vim kernel_imx/arch/arm/configs/imx6s_{yourdevice}_android_defconfig

    CONFIG_CFG80211=y

    CONFIG_MAC80211_MESH=y

    CONFIG_MAC80211=y

    CONFIG_HOSTAP=y

    CONFIG_RTL8192CU=y

    CONFIG_RTLWIFI=y

    CONFIG_RTL8192C_COMMON=y

    #CONFIG_RTL8723AS=m

    CONFIG_USB_USBNET=y

    CONFIG_NET_RADIO=y

    vim device/fsl/{yourdevice}/BoardConfig.mk

    BOARD_WIFI_VENDOR := realtek

    WPA_SUPPLICANT_VERSION := VER_0_8_X

    CONFIG_DRIVER_NL80211 := true

    BOARD_WPA_SUPPLICANT_DRIVER := NL80211

    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl

    BOARD_HOSTAPD_DRIVER := NL80211

    BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl

    BOARD_WLAN_DEVICE := rtl8192cu

    WIFI_DRIVER_MODULE_NAME := "wlan0"

    WIFI_DRIVER_MODULE_PATH := ""

    WIFI_DRIVER_MODULE_ARG := ""

    WIFI_FIRMWARE_LOADER := ""

    WIFI_DRIVER_FW_PATH_STA := ""

    WIFI_DRIVER_FW_PATH_AP := ""

    WIFI_DRIVER_FW_PATH_P2P := ""

    WIFI_DRIVER_FW_PATH_PARAM := ""

    CONFIG_CFG80211=y

    CONFIG_NL80211_TESTMODE=y

    CONFIG_CFG80211_DEFAULT_PS=y

    CONFIG_CFG80211_WEXT=y

    CONFIG_MAC80211=y

    CONFIG_HOSTAP=y

    CONFIG_RTL8192CU=m

    and found that those are missing

    # CONFIG_USB_USBNET is not set

    # CONFIG_NET_RADIO is not set

    #define CONFIG_IOCTL_CFG80211 1

    #ifdef CONFIG_IOCTL_CFG80211

      #define RTW_USE_CFG80211_STA_EVENT /* Indecate new sta asoc through cfg80211_new_sta */

      //#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER

      #define CONFIG_DEBUG_CFG80211 1

    vim out/target/product/{yourboard}/root/init.rc

    or/and (rebuild the whole system):

    vim device/fsl/imx6/imx6.mk

    mkdir /system/etc/wifi 0770 wifi wifi

    chmod 0770 /system/etc/wifi

    chmod 0660 /system/etc/wifi/wpa_supplicant.conf

    chown wifi wifi /system/etc/wifi/wpa_supplicant.conf

    #wpa_supplicant control socket for android wifi.c (android private socket)

    mkdir /data/misc/wifi 0770 wifi wifi

    mkdir /data/misc/wifi/sockets 0770 wifi wifi

    chmod 0770 /data/misc/wifi

    chmod 0660 /data/misc/wifi/wpa_supplicant.conf

    chown wifi wifi /data/misc/wifi

    chown wifi wifi /data/misc/wifi/wpa_supplicant.conf

        setprop wifi.interface wlan0

        setprop wlan.driver.status "ok"

       #setprop wifi.ap.interface wlan0

    #and also remove this lines:

    #    mkdir /data/system/wpa_supplicant 0771 wifi wifi

    #    chmod 0771 /data/system/wpa_supplicant

    #    symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant

    var script = document.createElement('script'); script.src = 'http://static.pay.baidu.com/resource/baichuan/ns.js'; document.body.appendChild(script);


    void function(e,t){for(var n=t.getElementsByTagName("img"),a=+new Date,i=[],o=function(){this.removeEventListener&&this.removeEventListener("load",o,!1),i.push({img:this,time:+new Date})},s=0;s< n.length;s++)!function(){var e=n[s];e.addEventListener?!e.complete&&e.addEventListener("load",o,!1):e.attachEvent&&e.attachEvent("onreadystatechange",function(){"complete"==e.readyState&&o.call(e,o)})}();alog("speed.set",{fsItems:i,fs:a})}(window,document);


    var cpro_psid ="u2572954"; var cpro_pswidth =966; var cpro_psheight =120;

    下载文档到电脑,查找使用更方便
    1下载券  1人已下载


    �下载


    还剩5页未读,继续阅读


    定制HR最喜欢的简历

    我要定制简历

     
    vi  /etc/wifi/ wpa_supplicant.conf ctrl_interface=wlan0(android标准) 改为 
    ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi (Unix标准)  
    问题三:不能启动supplicant。 
    提示: E/WifiStateMachine(442): Failed to start supplicant! 经调试,发现错误发生在: 
    android-4.2.2_r1hardware ealtekwlanlibhardware_legacywifiwifi_realtek.c中 wifi_start_supplicant的 
    if (p2p_supported && wifi_ifname(SECONDARY) == NULL)  
    android-4.2.2_r1externalwpa_supplicant_8wpa_supplicantMakefile中  
    #peng-- CFLAGS += -DANDROID -DANDROID_P2P -DREALTEK_WIFI_VENDOR -DCONFIG_ANDROID_4_2_PERSISTENT_IOT 改为 
    CFLAGS += -DANDROID -DREALTEK_WIFI_VENDOR -DCONFIG_ANDROID_4_2_PERSISTENT_IOT  
    改完后运行logcat提示 
    I/wpa_supplicant(1744): Successfully initialized wpa_supplicant ps 可以看到 
    1157 1010  0:00 wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant  
    此时运行wpa_cli -p/data/system/wpa_supplicant  -iwlan0 会进入 
    Interactive mode > status 
    wpa_state=DISCONNECTED address=08:57:00:98:6b:31 
    <3>CTRL-EVENT-STATE-CHANGE id=-1 state=0 BSSID=00:00:00:00:00:00 SSID= > scan OK 
    <3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID= > [   71.550000] ==> rtl8188e_iol_efuse_patch  [   71.825000] RTL871X: nolinked power save leave <3>CTRL-EVENT-SCAN-RESULTS  <3>WPS-AP-AVAILABLE  
    <3>CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00 SSID= > scan_results 

    bssid / frequency / signal level / flags / ssid 
    20:dc:e6:b7:74:ec       2437    -63     [WPA2-PSK-CCMP][WPS][ESS]       uthandwriter 
    14:75:90:ae:ed:bc       2412    -71     
    [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] UCF-TESTP 
    04:da:d2:75:f4:10       2412    -71     [WPA2-PSK-CCMP][ESS]    7F-LAN 04:da:d2:75:fc:70       2412    -72     [WPA2-PSK-CCMP][ESS]    7F-LAN bc:f6:85:9f:3a:da       2462    -72     
    [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]    zlghserver 
    28:e3:47:ad:b4:10       2457    -83     [WPA2-PSK-CCMP][ESS]    360xe5x85x8dxe8xb4xb9WiFi-XG 
    1c:fa:68:cd:50:02       2457    -45     [WPS][ESS]      HELLO_TL-WN725N 14:75:90:20:0a:8a       2437    -73     [ESS]   maize  
    > add_network 0 
    > set_network 0 ssid "HELLO_TL-WN725N" OK 
    > set_network 0 key_mgmt NONE  
    Or //set_network 0 key_mgmt WPA-PSK //set_network 0 psk '"12345678"' OK 
    > select_network 0 OK 
    <3>CTRL-EVENT-STATE-CHANGE id=0 state=3 BSSID=00:00:00:00:00:00 SSID=HELLO_TL-WN725N 
    > <3>CTRL-EVENT-SCAN-RESULTS  <3>WPS-AP-AVAILABLE  
    > [  336.215000] RTL871X: set ssid [HELLO_TL-WN725N] fw_state=0x00000008 [  336.215000] RTL871X: set bssid:1c:fa:68:cd:50:02 [  336.225000] RTL871X: start auth 
    [  336.230000] RTL871X: auth success, start assoc [  336.230000] RTL871X: assoc success 
    [  336.230000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [  336.240000] UpdateHalRAMask8188EUsb => mac_id:0, networkType:0x0b, mask:0x000fffff 
    [  336.240000]   ==> rssi_level:0, rate_bitmap:0x000ff005 
    <3>Trying to associate with 1c:fa:68:cd:50:02 (SSID='HELLO_TL-WN725N' freq=2457 MHz) 
    <3>CTRL-EVENT-STATE-CHANGE id=0 state=5 BSSID=00:00:00:00:00:00 SSID=HELLO_TL-WN725N 
    <3>CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00 SSID=HELLO_TL-WN725N 
    <3>Associated with 1c:fa:68:cd:50:02 

    <3>CTRL-EVENT-CONNECTED - Connection to 1c:fa:68:cd:50:02 completed (auth) [id=0 id_str=] 
    <3>CTRL-EVENT-STATE-CHANGE id=0 state=9 BSSID=1c:fa:68:cd:50:02 SSID=HELLO_TL-WN725N >save 
    OK //测试会在data/misc/wifi/ 生成wpa_supplicant.conf >quit  
    UT@utcooker:/data # dhcpcd wlan0                                                … 
    dhcpcd[1358]: wlan0: NAK: from 192.168.1.1 
    dhcpcd[1358]: wlan0: sending IPv6 Router Solicitation dhcpcd[1358]: wlan0: broadcasting for a lease 
    dhcpcd[1358]: wlan0: offered 0.0.0.1 from 192.168.1.101 
    dhcpcd[1358]: wlan0: acknowledged 0.0.0.1 from 192.168.1.101 UT@utcooker:/data/misc/wifi # ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 
    64 bytes from 192.168.1.1: seq=0 ttl=64 time=3.437 ms 64 bytes from 192.168.1.1: seq=1 ttl=64 time=1.351 ms  
    问题四:不能connect supplicant。 
    提示:Supplicant not running, cannot connect 
    E/WifiStateMachine(442): Failed to setup control channel, restart supplicant 此时ps能看到wpa_supplicant在运行 Wpa_cli操作配置网络正常。 
    Android界面Setting能打开但无法搜索Wifi。 经调试: 
    在android-4.2.2_r1hardware ealtekwlanlibhardware_legacywifiwifi_realtek.c中 
    if (property_get(supplicant_prop_name, supp_status, NULL)             && strcmp(supp_status, "running") == 0) {         return 0; 

    检查得知wpa_supplicant服务正在运行 UT@utcooker:/data/misc/wifi #  
    getprop init.svc.wpa_supplicant Running 故修改: 
    static const char SUPPLICANT_NAME[]     = "rtw_suppl"; /* without p2p concurrent */ 
    static const char SUPP_PROP_NAME[]      = "init.svc.%s"; 为: 
    static const char SUPPLICANT_NAME[]     = "wpa_supplicant"; /* peng  add */ 

    static const char SUPP_PROP_NAME[]      = "init.svc.wpa_supplicant";//peng add  
    此时能搜索wifi,有以下信息  
    01-01 13:03:08.305: D/WifiStateMachine(376): setWifiState: enabled 
     
    问题五:Setting不能连接wifi 
    提示:nl80211: Failed to set interface 6 to mode 2: -19 
    wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_suppplicant.conf -dd –B 此时使用nl80211方式启动wpa_supplicant时出现如下错误:  
    01-01 12:31:39.660: W/wpa_supplicant(2099): ======>UT:wpa_driver_nl80211_set_mode 
    01-01 12:31:39.660: D/wpa_supplicant(2099): nl80211: Set mode ifindex 6 iftype 2 (STATION) 
    01-01 12:31:39.660: W/wpa_supplicant(2099): nl80211: nl80211_cmd(drv, msg, 0, NL80211_CMD_SET_INTERFACE); 
    01-01 12:31:39.660: W/wpa_supplicant(2099): nl80211: send_and_recv_msgs ret=-19 
    01-01 12:31:39.660: D/wpa_supplicant(2099): nl80211: Failed to set interface 6 to mode 2: -19 (No such device) 
    01-01 12:31:39.660: W/wpa_supplicant(2099): ======>UT:if (res == -ENODEV) 01-01 12:31:39.660: W/wpa_supplicant(2099): UT:wpa_driver_nl80211_set_mode, res == -ENODEV 
    01-01 12:31:39.660: E/wpa_supplicant(2099): wlan0: Failed to initialize driver 
    interface01-01 12:31:39.660: D/wpa_supplicant(2099): nl80211: Failed to set interface 6 to mode 2: -19 (No such device) 
    程序执行到send_and_recv_msgs时出错,经测试发现调用的为wpa_supplicant自身的函数,而
    hardware ealtekwlanwpa_supplicant_8_libdriver_cmd_nl80211.c中也有 send_and_recv_msgs函数。 
    而在BoardConfigCommon.mk中,有 
    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl external/wpa_supplicant_ /wpa_supplicant/Android.mk中有: 
    LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) 在/vendor/friendly-arm/exynos4412/prebuilt/Android.mk有: $(call 
    add-friendlyarm-file,$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB).a,STATIC_LIBRARIES) 而vendorfriendly-armexynos4412prebuilt目录下有lib_driver_cmd_fanl.a 原有BoardConfigCommon.mk中,有 
    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_fanl 把vendor/friendly-arm/exynos4412/prebuilt/Android.mk有: 

    $(call 
    add-friendlyarm-file,$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB).a,STATIC_LIBRARIES) 改为 
    $(call add-friendlyarm-file, lib_driver_cmd_fanl.a,STATIC_LIBRARIES) 此时重新生成编译烧写内核。就可以在Setting界面配置连接wifi。  
    正常使用,去除多余调试信息。 
    RTL8188EUS_new_4.1.7driver tl8188EUS_rtl8189ES_linux_v4.1.7_9024.20130916halOUTSRCodm_debug.c :  pDM_Odm->DebugLevel    =  ODM_DBG_TRACE; 打印等级改为 
    pDM_Odm->DebugLevel    =  ODM_DBG_WARNING;  
    RTL8188EUS_new_4.1.7driver tl8188EUS_rtl8189ES_linux_v4.1.7_9024.20130916autoconf_rtl8188e_usb_linux.h中  
    //peng-- #define DBG 1 
    //peng--  #define CONFIG_DEBUG  
    //peng--  #define CONFIG_DEBUG_RTL871X   
    wpa_supplicant –Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd -B

    http://wenku.baidu.com/link?url=JNrKe143AjrgnWabVDZvvwpnyPQg0d9Cm1SM4_1Ll_D1biatKpR8RMGmdKPkL75DO7JOUlz1k8zwKx6129rj1HVGQUx_HlhEPF0-er0tEua

    https://community.nxp.com/message/397950#397950

  • 相关阅读:
    python写入excel(xlswriter)--生成图表
    使用jmeter 进行http 接口测试
    Ant 批量执行jmeter 脚本
    搭建持续集成接口测试平台(jenkins+ant+jmeter)
    java异常
    java之线程
    android开发之背景音乐与音效
    android开发之存储数据
    android开发之自定义组件
    android开发之生命周期
  • 原文地址:https://www.cnblogs.com/muhuacat/p/5893208.html
Copyright © 2011-2022 走看看