打印
[i.MX]

imx6 使用rtl8189无线网卡无法连接外部设备

[复制链接]
5537|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
imlyi|  楼主 | 2017-11-22 18:08 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 imlyi 于 2017-11-22 18:21 编辑

开发板使用为imx6ul  
内核使用版本为:3.14.52
无线网卡为rtl8189ES版本,接口为SDIO。
驱动版本为:rtl8189ES_linux_v4.3.18.2_17395.20160422
加载驱动log:
root@imx6ulevk:~# insmod wlan.ko 
RTL871X: module init start
RTL871X: rtl8189es v4.3.18.2_17395.20160422
RTL871X: build time: Nov 16 2017 06:58:40
RTL871X: CHIP TYPE: RTL8188E
RTL871X: rtw_hal_config_rftype RF_Type is 3 TotalTxPath is 1
RTL871X: Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_K_CUT_1T1R_RomVer(0)
RTL871X: EEPROM type is E-FUSE
RTL871X: =>_CardEnable
RTL871X: SetHwReg8188E: bMacPwrCtrlOn=1
RTL871X: <=_CardEnable
RTL871X: _ReadPROMContent: 9346CR=0x20, Boot from EFUSE, Autoload OK
RTL871X: =>_InitPowerOn_8188ES
RTL871X: =>_CardEnable
RTL871X: =>_CardEnable bMacPwrCtrlOn == _TRUE do nothing !!
RTL871X: <=_CardEnable
RTL871X: <=_InitPowerOn_8188ES
bFWReady == _FALSE call reset 8051...
RTL871X: =====> _8051Reset88E(): 8051 reset success .
RTL871X: efuse_read_phymap_from_txpktbuf bcnhead:0
RTL871X: efuse_read_phymap_from_txpktbuf len:162, lenbak:162, aaa:162, aaabak:162
RTL871X: efuse_read_phymap_from_txpktbuf read count:160
RTL871X: EEPROM ID=0x8129
RTL871X: Hal_ReadPowerSavingMode88E...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(0)
RTL871X: ### PS params=>  power_mgnt(2),usbss_enable(0) ###
RTL871X: ======= Path 0, Channel 1 =======
RTL871X: Index24G_CCK_Base[0][1] = 0x24
RTL871X: Index24G_BW40_Base[0][1] = 0x2a
RTL871X: ======= Path 0, Channel 2 =======
RTL871X: Index24G_CCK_Base[0][2] = 0x24
RTL871X: Index24G_BW40_Base[0][2] = 0x2a
RTL871X: ======= Path 0, Channel 3 =======
RTL871X: Index24G_CCK_Base[0][3] = 0x24
RTL871X: Index24G_BW40_Base[0][3] = 0x2a
RTL871X: ======= Path 0, Channel 4 =======
RTL871X: Index24G_CCK_Base[0][4] = 0x24
RTL871X: Index24G_BW40_Base[0][4] = 0x2a
RTL871X: ======= Path 0, Channel 5 =======
RTL871X: Index24G_CCK_Base[0][5] = 0x24
RTL871X: Index24G_BW40_Base[0][5] = 0x2a
RTL871X: ======= Path 0, Channel 6 =======
RTL871X: Index24G_CCK_Base[0][6] = 0x24
RTL871X: Index24G_BW40_Base[0][6] = 0x2a
RTL871X: ======= Path 0, Channel 7 =======
RTL871X: Index24G_CCK_Base[0][7] = 0x24
RTL871X: Index24G_BW40_Base[0][7] = 0x2a
RTL871X: ======= Path 0, Channel 8 =======
RTL871X: Index24G_CCK_Base[0][8] = 0x24
RTL871X: Index24G_BW40_Base[0][8] = 0x2a
RTL871X: ======= Path 0, Channel 9 =======
RTL871X: Index24G_CCK_Base[0][9] = 0x24
RTL871X: Index24G_BW40_Base[0][9] = 0x2a
RTL871X: ======= Path 0, Channel 10 =======
RTL871X: Index24G_CCK_Base[0][10] = 0x24
RTL871X: Index24G_BW40_Base[0][10] = 0x2a
RTL871X: ======= Path 0, Channel 11 =======
RTL871X: Index24G_CCK_Base[0][11] = 0x24
RTL871X: Index24G_BW40_Base[0][11] = 0x2a
RTL871X: ======= Path 0, Channel 12 =======
RTL871X: Index24G_CCK_Base[0][12] = 0x24
RTL871X: Index24G_BW40_Base[0][12] = 0x2a
RTL871X: ======= Path 0, Channel 13 =======
RTL871X: Index24G_CCK_Base[0][13] = 0x24
RTL871X: Index24G_BW40_Base[0][13] = 0x2a
RTL871X: ======= Path 0, Channel 14 =======
RTL871X: Index24G_CCK_Base[0][14] = 0x24
RTL871X: Index24G_BW40_Base[0][14] = 0x2a
RTL871X: ======= TxCount 0 =======
RTL871X: CCK_24G_Diff[0][0]= 0
RTL871X: OFDM_24G_Diff[0][0]= 0
RTL871X: BW20_24G_Diff[0][0]= -2
RTL871X: BW40_24G_Diff[0][0]= 0
RTL871X: EEPROMRegulatory = 0x0
RTL871X: mlmepriv.ChannelPlan = 0x20
RTL871X: CrystalCap: 0x2a
RTL871X: EEPROM Customer ID: 0x 0
RTL871X: Board Type: 0x 0
RTL871X: ThermalMeter = 0x1a
RTL871X: pHalData->EEPROMRFGainVal=0
RTL871X: Hal_ReadRFGainOffset => EEPRORFGainOffset = 0x00,EEPROMRFGainVal=0x00,thermal_offset:0x00
RTL871X: <==== ReadAdapterInfo8188ES in 300 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((null)) if1, hwaddr:ff:ff:ff:ff:ff:ff macid:1
RTL871X: rtw_macaddr_cfg mac addr:00:95:69:b8:bf:cb
RTL871X: bDriverStopped:True, bSurpriseRemoved:False, bup:0, hw_init_completed:0
RTL871X: rtw_wiphy_alloc(phy0)
RTL871X: rtw_wdev_alloc(padapter=90c06000)
RTL871X: rtw_wiphy_register(phy0)
RTL871X: Register RTW cfg80211 vendor cmd(0x67) interface
RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=00:95:69:b8:bf:cb
RTL871X: module init ret=0



使用iwlist 正常(字数限制,截图来表示,不好意思):




使用ifconfig wlan0 up
root@imx6ulevk:~# ifconfig wlan0 up
RTL871X: +871x_drv - drv_open, bup=0
RTL871X: +rtl8188es_hal_init
RTL871X: FW does not exit before power on!!
RTL871X: =>_InitPowerOn_8188ES
RTL871X: =>_CardEnable
RTL871X: =>_CardEnable bMacPwrCtrlOn == _TRUE do nothing !!
RTL871X: <=_CardEnable
RTL871X: <=_InitPowerOn_8188ES
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: Power on ok!
RTL871X: _init_available_page_threshold(): Enable Tx FIFO Page Threshold H:0x7777,N:0x7777,L:0x7c7c
RTL871X: rtl8188e_FirmwareDownload fw:NIC, size: 15028
RTL871X: rtl8188e_FirmwareDownload: fw_ver=17 fw_subver=0000 sig=0x88e1, Month=15, Date=19, Hour=94, Minute=3a
RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00030005
RTL871X: =====> _8051Reset88E(): 8051 reset success .
RTL871X: _FWFreeToGo: Polling FW ready OK! (1, 10ms), REG_MCUFWDL:0x000300c6
RTL871X: FWDL success. write_fw:1, 210ms
==> rtl8188e_iol_efuse_patch
RTL871X: HalDetectPwrDownMode(): PDN=0
RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
RTL871X: pDM_Odm TxPowerTrackControl = 1
RTL871X: DISABLE_BB_RF=0
RTL871X: IS_HARDWARE_TYPE_8188ES=1
RTL871X: -rtl8188es_hal_init
RTL871X: rtl8188es_hal_init in 850ms
RTL871X: wlan0Port-0  set opmode = 2
RTL871X: Using the default RF gain.
RTL871X: MAC Address = 00:95:69:b8:bf:cb
RTL871X: rtw_cfg80211_init_wiphy:rf_type=3
RTL871X: start rtl8188es_xmit_thread
RTL871X: [HT] HAL Support STBC = 0x01
RTL871X: -871x_drv - drv_open, bup=1
RTL871X: cfg80211_rtw_set_power_mgmt(wlan0) enabled:1, timeout:-1
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@imx6ulevk:~#
root@imx6ulevk:~# 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: =>rtl8188es_hal_deinit
RTL871X: =>hal_poweroff_8188es
RTL871X: SetHwReg8188E: bMacPwrCtrlOn=0
RTL871X: SetHwReg8188E: bMacPwrCtrlOn=0
RTL871X: <=hal_poweroff_8188es
RTL871X: <=rtl8188es_hal_deinit
RTL871X: <=== rtw_ips_pwr_down..................... in 50ms


之后使用ifconfig可正常看到网卡信息:
root@imx6ulevk:~# ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:95:69:B8:BF:CB  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


扫描外界节点信息看上去也是正常的。
root@imx6ulevk:~# iwlist wlan0 scan
^HRTL871X: _rtw_pwr_wakeup call ips_leave....
RTL871X: ==>ips_leave cnts:1
RTL871X: ===>  rtw_ips_pwr_up..............
RTL871X: ===> ips_netdrv_open.........
RTL871X: +rtl8188es_hal_init
RTL871X: FW does not exit before power on!!
RTL871X: =>_InitPowerOn_8188ES
RTL871X: =>_CardEnable
RTL871X: SetHwReg8188E: bMacPwrCtrlOn=1
RTL871X: <=_CardEnable
RTL871X: <=_InitPowerOn_8188ES
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: Power on ok!
RTL871X: _init_available_page_threshold(): Enable Tx FIFO Page Threshold H:0x7777,N:0x7777,L:0x7c7c
RTL871X: rtl8188e_FirmwareDownload fw:NIC, size: 15028
RTL871X: rtl8188e_FirmwareDownload: fw_ver=17 fw_subver=0000 sig=0x88e1, Month=15, Date=19, Hour=94, Minute=3a
RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00030005
RTL871X: =====> _8051Reset88E(): 8051 reset success .
RTL871X: _FWFreeToGo: Polling FW ready OK! (1, 10ms), REG_MCUFWDL:0x000300c6
RTL871X: FWDL success. write_fw:1, 210ms
==> rtl8188e_iol_efuse_patch
RTL871X: HalDetectPwrDownMode(): PDN=0
RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
RTL871X: pDM_Odm TxPowerTrackControl = 1
RTL871X: DISABLE_BB_RF=0
RTL871X: IS_HARDWARE_TYPE_8188ES=1
RTL871X: -rtl8188es_hal_init
RTL871X: rtl8188es_hal_init in 870ms
RTL871X: wlan0Port-0  set opmode = 2
RTL871X: Using the default RF gain.
RTL871X: <===  rtw_ips_pwr_up.............. in 900ms
RTL871X: nolinked power save leave
RTL871X: ==> ips_leave.....LED(0x00028282)...
RTL871X: SetHwReg8188E:(HW_VAR_CHECK_TXBUF)TXBUF Empty(1) in 0 ms
RTL871X: survey done event(1a) band:0 for wlan0
RTL871X: rtw_indicate_scan_done(wlan0)
RTL871X: ==>rtw_ps_processor .fw_state(8)
RTL871X: ==>ips_enter cnts:2
RTL871X: nolinked power save enter
RTL871X: ===> rtw_ips_pwr_down...................
RTL871X: ====> rtw_ips_dev_unload...
wlan0     Scan completed :


(字数限制,后面一部分用截图代替,不好意思






但是问题就出在连接节点这一块:
“lyi”节点是我简历的一个开放热点:
root@imx6ulevk:~# iwconfig wlan0 essid "lyi"
RTL871X: _rtw_pwr_wakeup call ips_leave....
RTL871X: ==>ips_leave cnts:2
RTL871X: ===>  rtw_ips_pwr_up..............
RTL871X: ===> ips_netdrv_open.........
RTL871X: +rtl8188es_hal_init
RTL871X: FW does not exit before power on!!
RTL871X: =>_InitPowerOn_8188ES
RTL871X: =>_CardEnable
RTL871X: SetHwReg8188E: bMacPwrCtrlOn=1
RTL871X: <=_CardEnable
RTL871X: <=_InitPowerOn_8188ES
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: Power on ok!
RTL871X: _init_available_page_threshold(): Enable Tx FIFO Page Threshold H:0x7777,N:0x7777,L:0x7c7c
RTL871X: rtl8188e_FirmwareDownload fw:NIC, size: 15028
RTL871X: rtl8188e_FirmwareDownload: fw_ver=17 fw_subver=0000 sig=0x88e1, Month=15, Date=19, Hour=94, Minute=3a
RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00030005
RTL871X: =====> _8051Reset88E(): 8051 reset success .
RTL871X: _FWFreeToGo: Polling FW ready OK! (1, 10ms), REG_MCUFWDL:0x000300c6
RTL871X: FWDL success. write_fw:1, 210ms
==> rtl8188e_iol_efuse_patch
RTL871X: HalDetectPwrDownMode(): PDN=0
RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
RTL871X: pDM_Odm TxPowerTrackControl = 1
RTL871X: DISABLE_BB_RF=0
RTL871X: IS_HARDWARE_TYPE_8188ES=1
RTL871X: -rtl8188es_hal_init
RTL871X: rtl8188es_hal_init in 850ms
RTL871X: wlan0Port-0  set opmode = 2
RTL871X: Using the default RF gain.
RTL871X: <===  rtw_ips_pwr_up.............. in 880ms
RTL871X: nolinked power save leave
RTL871X: ==> ips_leave.....LED(0x00028282)...
RTL871X: =>rtw_wx_set_essid
RTL871X: ssid=lyi, len=3
RTL871X: set ssid [lyi] fw_state=0x00000008
RTL871X: Set SSID under fw_state=0x00000008
RTL871X: [by_bssid:0][assoc_ssid:lyi][to_roam:0] new candidate: lyi(00:36:76:27:df:a7, ch11) rssi:-44
RTL871X: rtw_select_and_join_from_scanned_queue: candidate: lyi(00:36:76:27:df:a7, ch:11)
RTL871X: link to Ralink AP
RTL871X: [HT] HAL Support STBC = 0x01
RTL871X: [HT] Declare supporting RX STBC_1R
RTL871X: rtw_chk_start_clnt_join(wlan0) req: 11,1,2
RTL871X: rtw_chk_start_clnt_join(wlan0) union: 11,1,2
RTL871X: <=rtw_wx_set_essid, ret 0
root@imx6ulevk:~# RTL871X: OnBeacon: beacon keys ready
RTL871X: link to Ralink AP
RTL871X: start auth
RTL871X: issue_auth
RTL871X: OnAuthClient
RTL871X: auth success, start assoc
RTL871X: network.SupportedRates[0]=82
RTL871X: network.SupportedRates[1]=84
RTL871X: network.SupportedRates[2]=8B
RTL871X: network.SupportedRates[3]=96
RTL871X: network.SupportedRates[4]=12
RTL871X: network.SupportedRates[5]=24
RTL871X: network.SupportedRates[6]=48
RTL871X: network.SupportedRates[7]=6C
RTL871X: network.SupportedRates[8]=0C
RTL871X: network.SupportedRates[9]=18
RTL871X: network.SupportedRates[10]=30
RTL871X: network.SupportedRates[11]=60
RTL871X: bssrate_len = 12
RTL871X: OnAssocRsp
RTL871X: report_join_res(2)
RTL871X: rtw_joinbss_update_network
RTL871X: +rtw_update_ht_cap()
RTL871X: rtw_alloc_macid(wlan0) if1, hwaddr:00:36:76:27:df:a7 macid:0
RTL871X: rtw_joinbss_update_stainfo
RTL871X: supp_mcs_set = ff, 00, 00, rf_type=3, tx_ra_bitmap=00000000000fffff
RTL871X: ### Set STA_(0) info ###
RTL871X: rtw_cfg80211_indicate_connect(wlan0)
RTL871X: assoc success
------------[ cut here ]------------
WARNING: CPU: 0 PID: 19 at net/wireless/sme.c:655 cfg80211_process_wdev_events+0x144/0x168()
RTL871X: HW_VAR_BASIC_RATE: 0x15f -> 0x15f -> 0x15f
RTL871X: WMM(0): 0, a42b
Modules linked in:
RTL871X: WMM(1): 0, a44f
wlan(O) evbug
RTL871X: WMM(2): 0, 5e4322

CPU: 0 PID: 19 Comm: kworker/u2:1 Tainted: G           O 3.14.52+g5f6f0a5 #68
Workqueue: cfg80211 cfg80211_event_work
[<80014a00>] (unwind_backtrace) from [<80011714>] (show_stack+0x10/0x14)
[<80011714>] (show_stack) from [<807310c8>] (dump_stack+0x7c/0xbc)
[<807310c8>] (dump_stack) from [<80032200>] (warn_slowpath_common+0x6c/0x88)
[<80032200>] (warn_slowpath_common) from [<800322b8>] (warn_slowpath_null+0x1c/0x24)
[<800322b8>] (warn_slowpath_null) from [<806dc148>] (cfg80211_process_wdev_events+0x144/0x168)
[<806dc148>] (cfg80211_process_wdev_events) from [<806dc1a4>] (cfg80211_process_rdev_events+0x38/0x94)
[<806dc1a4>] (cfg80211_process_rdev_events) from [<806d876c>] (cfg80211_event_work+0x14/0x1c)
[<806d876c>] (cfg80211_event_work) from [<80046c40>] (process_one_work+0xec/0x420)
[<80046c40>] (process_one_work) from [<80047a88>] (worker_thread+0x130/0x430)
[<80047a88>] (worker_thread) from [<8004d83c>] (kthread+0xcc/0xe4)
[<8004d83c>] (kthread) from [<8000e4c0>] (ret_from_fork+0x14/0x34)
RTL871X: WMM(3): 0, 2f3222
RTL871X: wmm_para_seq(0): 0
---[ end trace 4aa2e773cea70825 ]---
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
RTL871X: wmm_para_seq(1): 1
RTL871X: wmm_para_seq(2): 2
RTL871X: wmm_para_seq(3): 3
RTL871X: HTOnAssocRsp
RTL871X: ODM_Get_Rate_Bitmap ==> rssi_level:0x00, WirelessMode:0x0b, rate_bitmap:0x000ff015
RTL871X: UpdateHalRAMask8188E => mac_id:0, rate_id:0, networkType:0x0b, mask:0x000fffff
         ==> rssi_level:0, rate_bitmap:0x000ff015
RTL871X: ### MacID(31),Set Max Tx RPT MID(32)
RTL871X: ### rtl8188e_set_FwMediaStatus_cmd: MStatus=1 MACID=0
RTL871X: SetHwReg8188E(wlan0): [HW_VAR_MACID_WAKEUP] macid=0, org reg_0x48c=0x00000000
RTL871X: rtl8188e_set_FwJoinBssReport_cmd mstatus(1)
RTL871X: rtw_hal_set_fw_rsvd_page wowlan_in_resume: 0
RTL871X: rtw_hal_set_fw_rsvd_page PageSize: 128, RsvdPageNUm: 8
RTL871X: LocPsPoll: 2
RTL871X: LocNullData: 3
RTL871X: LocQosNull: 4
RTL871X: rtw_hal_set_fw_rsvd_page: Set RSVD page location to Fw ,TotalPacketLen(570), TotalPageNum(5)
RTL871X: RsvdPageLoc: ProbeRsp=0 PsPoll=2 Null=3 QoSNull=4 BTNull=0
RTL871X: wlan0: 1 DL RSVD page success! DLBcnCount:1, poll:1
RTL871X: Set RSVD page location to Fw.
RTL871X: =>mlmeext_joinbss_event_callback - End to Connection without 4-way
RTL871X: ODM_Get_Rate_Bitmap ==> rssi_level:0x01, WirelessMode:0x0b, rate_bitmap:0x000f0000
RTL871X: UpdateHalRAMask8188E => mac_id:0, rate_id:0, networkType:0x0b, mask:0x000fffff
         ==> rssi_level:1, rate_bitmap:0x000f0000
RTL871X: rtw_set_ps_mode(wlan0) Enter 802.11 power save - WIFI-TRAFFIC_IDLE
RTL871X: rtl8188e_set_FwPwrMode_cmd: Mode=2 SmartPS=2 UAPSD=0
RTL871X: SetHwReg8188E(wlan0): [HW_VAR_MACID_WAKEUP] macid=0, org reg_0x48c=0x00000000
RTL871X: SetHwReg8188E(wlan0): [HW_VAR_MACID_WAKEUP] macid=0, org reg_0x48c=0x00000000
RTL871X: SetHwReg8188E(wlan0): [HW_VAR_MACID_WAKEUP] macid=0, org reg_0x48c=0x00000000

无法连接到这个热点。
使用wpa_supplicant 软件也无是同样的问题。
连接有密码的热点也不行。
搭建AP也可以被搜索的到,但是就是无法和外部设备连接。
搭建的热点就在开发板旁边,信号应该没问题。
能搜索到这么热点信息,我想信号强度这一块应该是没有什么问题的。
是驱动有问题吗?但是扫描热点又很正常,搭建AP也正常,就是无法连接手机。是wpa_supplicant
软件的问题吗?还是驱动的问题。有大神知道什么原因吗?希望能解答一下,或提供下解决思路,万分感谢!!!












评论
qwe743852 2018-11-24 11:02 回复TA
大哥你解决了吗 我也遇到这个问题了 

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

16

帖子

0

粉丝