您尚未登录。

楼主 # 2022-06-28 15:46:32

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

软件构建和测试步骤,如下所述

1) buildroot
  https://github.com/YuzukiHD/Buildroot-YuzukiSBC
  make mangopi_mq_defconfig

2) rtl8189驱动
https://github.com/Tina-Linux/Tina_d1x_mangopi-sbc

3)参考https://whycan.com/t_8345.html, 修改dts

    rfkill: rfkill@0 {
        compatible    = "allwinner,sunxi-rfkill";
        chip_en;
        power_en;
        pinctrl-0 = <&wlan_pins_a>;
        pinctrl-names = "default";
        status        = "disabled";

        wlan: wlan@0 {
            compatible    = "allwinner,sunxi-wlan";
            clock-names = "32k-fanout1";
            clocks = <&ccu CLK_FANOUT1_OUT>;
            wlan_busnum    = <0x1>;
            wlan_regon    = <&pio PG 12 GPIO_ACTIVE_HIGH>;
            wlan_hostwake  = <&pio PG 10 GPIO_ACTIVE_HIGH>;
            /*wlan_power    = "VCC-3V3";*/
            /*wlan_power_vol = <3300000>;*/
            /*interrupt-parent = <&pio>;
            interrupts = < PG 10 IRQ_TYPE_LEVEL_HIGH>;*/
            wakeup-source;

        };

        bt: bt@0 {
            compatible    = "allwinner,sunxi-bt";
            pinctrl-0 = <&wlan_pins_a>;
            pinctrl-names = "default";
            clock-names = "32k-fanout1";
            clocks = <&ccu CLK_FANOUT1_OUT>;
            /*bt_power_num = <0x01>;*/
            /*bt_power      = "axp803-dldo1";*/
            /*bt_io_regulator = "axp803-dldo1";*/
            /*bt_io_vol = <3300000>;*/
            /*bt_power_vol = <330000>;*/
            bt_rst_n      = <&pio PG 15 GPIO_ACTIVE_LOW>;
            status        = "okay";
        };
    };

    btlpm: btlpm@0 {
        compatible  = "allwinner,sunxi-btlpm";
        uart_index  = <0x1>;
        bt_wake     = <&pio PG 14 GPIO_ACTIVE_HIGH>;
        bt_hostwake = <&pio PG 13 GPIO_ACTIVE_HIGH>;
        status      = "okay";
    };


5) 启动的log显示已经成功加载了rtl8189驱动
    1.336750] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[    1.348167] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[    1.355475] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[    1.362857] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[    1.370342] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[    1.376928] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[    1.383940] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=131 assert=1
[    1.391878] sun8iw20-pinctrl 2000000.pinctrl: pin PE3 already requested by 2500000.uart; cannot claim for 2000000.pinctrl:131
[    1.404683] sun8iw20-pinctrl 2000000.pinctrl: pin-131 (2000000.pinctrl:131) status -22
[    1.413633] sunxi-rfkill soc@3000000:rfkill@0: can't request wlan_regon gpio 131
[    1.422024] sunxi-rfkill: probe of soc@3000000:rfkill@0 failed with error -22
.....
[    4.735231] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
[    4.749141] device_chose finished 139!
[    4.841985] udevd[97]: starting eudev-3.2.11
[   22.307950] RTL871X: module init start
[   22.312194] RTL871X: rtl8189fs v4.3.24.8_22657.20170607
[   22.319300] RTL871X: CHIP TYPE: RTL8188F
[   22.324102] RTL871X: rtw_hal_config_rftype RF_Type is 3 TotalTxPath is 1
[   22.332414] RTL871X: Chip Version Info: CHIP_8188F_Normal_Chip_SMIC_B_CUT_1T1R_RomVer(0)
[   22.342155] RTL871X: SetHwReg8188F: hci_sus_state=1
[   22.350417] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[   22.355935] RTL871X: SetHwReg8188F: hci_sus_state=2
[   22.362280] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[   22.369906] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[   22.379066] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[   22.384609] RTL871X: EEPROM type is E-FUSE
[   22.390057] RTL871X: HW EFUSE
[   22.393382] RTL871X: 0x000:
[   22.393387] FF
[   22.396607] FF
[   22.399261] FF
...
[   23.622938] RTL871X: rtw_read_efuse_from_file /system/etc/wifi/wifi_efuse_8189fs.map is not readable
[   23.633761] RTL871X: ERROR invalid phy efuse and read from file fail, will use driver default!!
[   23.643889] RTL871X: EEPROM ID(0xffff) is invalid!!
[   23.649914] RTL871X: rtw_read_macaddr_from_file /data/wifimac.txt is not readable
[   23.658751] RTL871X: [A] 2G G00 CCK-1T base:34 from IC_DEF
[   23.664901] RTL871X: [A] 2G G01 CCK-1T base:34 from IC_DEF
[   23.671678] RTL871X: [A] 2G G02 CCK-1T base:34 from IC_DEF
[   23.678219] RTL871X: [A] 2G G03 CCK-1T base:34 from IC_DEF
[   23.684368] RTL871X: [A] 2G G04 CCK-1T base:34 from IC_DEF
[   23.691055] RTL871X: [A] 2G G05 CCK-1T base:34 from IC_DEF
[   23.697239] RTL871X: [A] 2G G00 BW40-1S base:39 from IC_DEF
[   23.704030] RTL871X: [A] 2G G01 BW40-1S base:39 from IC_DEF
[   23.710674] RTL871X: [A] 2G G02 BW40-1S base:39 from IC_DEF
[   23.716978] RTL871X: [A] 2G G03 BW40-1S base:39 from IC_DEF
[   23.723769] RTL871X: [A] 2G G04 BW40-1S base:39 from IC_DEF
[   23.730417] RTL871X: hal_com_config_channel_plan use def_chplan:0x20
[   23.738391] RTL871X: kfree flag:3
[   23.742133] RTL871X: bb_gain:1
[   23.745549] RTL871X: thermal:-6
[   23.749913] RTL871X: rtl8188f_FirmwareDownload((null)) tmp_ps=3
[   23.756552] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[   23.764467] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[   23.777162] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[   23.784907] RTL871X: rtl8188f_FirmwareDownload by IO write!
[   24.003881] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x07050505
[   24.014060] RTL871X: _8051Reset8188: Finish
[   24.029451] RTL871X: _FWFreeToGo: Polling FW ready OK! (114, 20ms), REG_MCUFWDL:0x070505c6
[   24.038803] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[   24.044882] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 260ms
[   24.053206] RTL871X:  <=== rtl8188f_FirmwareDownload()
[   24.059807] RTL871X: hal_read_mac_hidden_rpt OK! (1, 0ms), fwdl:1, id:0x19
[   24.068639] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[   24.074108] RTL871X: SetHwReg8188F: hci_sus_state=3
[   24.080939] RTL871X: SetHwReg8188F: hci_sus_state=0
[   24.086462] RTL871X: rtw_hal_read_chip_info in 1740 ms
[   24.093009] RTL871X: init_channel_set((null)) ChannelPlan ID:0x20, ch num:13
[   24.102549] RTL871X: rtw_alloc_macid((null)) if1, hwaddr:ff:ff:ff:ff:ff:ff macid:1
[   24.111594] RTL871X: Init_ODM_ComInfo_8188f(): fab_ver=0 cut_ver=1
[   24.118576] RTL871X: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1
[   24.129660] RTL871X: phy_ConfigBBWithPgParaFile(): No File PHY_REG_PG.txt, Load from HWImg Array!
[   24.140078] RTL871X: default power by rate loaded
[   24.146212] RTL871X: ERROR invalid mac addr:00:00:00:00:00:00, assign random MAC
[   24.155133] RTL871X: rtw_macaddr_cfg mac addr:00:e0:4c:6d:31:3e
[   24.162296] RTL871X: bDriverStopped:True, bSurpriseRemoved:False, bup:0, hw_init_completed:0
[   24.172272] RTL871X: rtw_wiphy_alloc(phy0)
[   24.176867] RTL871X: rtw_wdev_alloc(padapter=000000004d648a68)
[   24.184019] RTL871X: rtw_wiphy_register(phy0)
[   24.189306] RTL871X: Register RTW cfg80211 vendor cmd(0x67) interface
[   24.197261] RTL871X: _rtw_reg_notifier
[   24.202117] RTL871X: _rtw_reg_notifier_apply: NL80211_REGDOM_SET_BY_CORE to DRV
[   24.210962] RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=00:e0:4c:6d:31:3e
[   24.222530] RTL871X: cfg80211_rtw_get_txpower
[   24.230493] RTL871X: module init ret=0

6)   网络设备wlan0也已经出现
# ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:E0:4C:6D:31:3E
          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)

7)当时使用wpa_supplicant 进行连接是总是不成功,不停输出下信息

# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf&
# Successfully initialized wpa_supplicant
[ 2051.464162] RTL871X: cfg80211_rtw_get_txpower
[ 2051.469478] RTL871X: cfg80211_rtw_get_txpower
[ 2051.475753] RTL871X: cfg80211_rtw_get_txpower
[ 2051.481984] RTL871X: cfg80211_rtw_get_txpower
rfkill: Cannot open RFKILL contr[ 2051.494551] RTL871X: cfg80211_rtw_get_txpower
ol device
[ 2051.529882] RTL871X: cfg80211_rtw_flush_pmksa(wlan0)
[ 2051.636522] RTL871X: cfg80211_rtw_scan(wlan0)
[ 2051.641542] RTL871X: _rtw_pwr_wakeup call ips_leave....
[ 2051.647939] RTL871X: ==>ips_leave cnts:6
[ 2051.652343] RTL871X: ===>  rtw_ips_pwr_up..............
[ 2051.658780] RTL871X: ===> ips_netdrv_open.........
[ 2051.664412] RTL871X: FW does not exist before power on!!
[ 2051.671744] RTL871X: SetHwReg8188F: hci_sus_state=1
[ 2051.679945] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[ 2051.685440] RTL871X: SetHwReg8188F: hci_sus_state=2
[ 2051.691899] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[ 2051.699529] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[ 2051.708697] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[ 2051.714166] RTL871X: Power on ok!
[ 2051.718729] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[ 2051.725272] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[ 2051.733196] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[ 2051.745919] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[ 2051.753712] RTL871X: rtl8188f_FirmwareDownload by IO write!
[ 2051.974275] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[ 2051.984529] RTL871X: _8051Reset8188: Finish
[ 2051.999904] RTL871X: _FWFreeToGo: Polling FW ready OK! (111, 20ms), REG_MCUFWDL:0x000505c6
[ 2052.009259] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[ 2052.015317] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 260ms
[ 2052.023675] RTL871X:  <=== rtl8188f_FirmwareDownload()
[ 2052.029899] RTL871X: HalDetectPwrDownMode(): PDN=0
[ 2052.035275] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[ 2052.532918] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[ 2052.541354] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:1
[ 2052.552430] RTL871X: kfree gain_offset 0x55:0x82060
[ 2052.553335] RTL871X:  after :0x86070
[ 2052.563702] RTL871X: <===  rtw_ips_pwr_up.............. in 910ms
[ 2052.571155] RTL871X: nolinked power save leave
[ 2052.576275] RTL871X: ==> ips_leave.....LED(0x01028282)...
[ 2052.582943] RTL871X: rtw_cfg80211_set_probe_req_wpsp2pie(wlan0) listen channel - country:XX, class:81, ch:1
[ 2054.331173] RTL871X: survey done event(0) band:0 for wlan0
[ 2054.337351] RTL871X: rtw_indicate_scan_done(wlan0)
[ 2054.352310] RTL871X: ==>rtw_ps_processor .fw_state(8)
[ 2054.358069] RTL871X: ==>ips_enter cnts:7
[ 2054.362490] RTL871X: nolinked power save enter
[ 2054.368183] RTL871X: ===> rtw_ips_pwr_down...................
[ 2054.374632] RTL871X: ====> rtw_ips_dev_unload...
[ 2054.391263] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[ 2054.396740] RTL871X: SetHwReg8188F: hci_sus_state=3
[ 2054.403599] RTL871X: SetHwReg8188F: hci_sus_state=0
[ 2054.409513] RTL871X: <=== rtw_ips_pwr_down..................... in 40ms
[ 2059.350332] RTL871X: cfg80211_rtw_scan(wlan0)
[ 2059.355229] RTL871X: _rtw_pwr_wakeup call ips_leave....
[ 2059.361921] RTL871X: ==>ips_leave cnts:7
[ 2059.366314] RTL871X: ===>  rtw_ips_pwr_up..............
[ 2059.372823] RTL871X: ===> ips_netdrv_open.........
[ 2059.378867] RTL871X: FW does not exist before power on!!
[ 2059.385615] RTL871X: SetHwReg8188F: hci_sus_state=1
[ 2059.394109] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[ 2059.399977] RTL871X: SetHwReg8188F: hci_sus_state=2
[ 2059.405788] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[ 2059.413594] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[ 2059.422772] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[ 2059.428636] RTL871X: Power on ok!
[ 2059.432669] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[ 2059.439816] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[ 2059.447137] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[ 2059.459969] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[ 2059.467310] RTL871X: rtl8188f_FirmwareDownload by IO write!
[ 2059.689930] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[ 2059.700175] RTL871X: _8051Reset8188: Finish
[ 2059.715497] RTL871X: _FWFreeToGo: Polling FW ready OK! (109, 10ms), REG_MCUFWDL:0x000505c6
[ 2059.724808] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[ 2059.731398] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 270ms
[ 2059.739539] RTL871X:  <=== rtl8188f_FirmwareDownload()
[ 2059.745309] RTL871X: HalDetectPwrDownMode(): PDN=0
[ 2059.751269] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[ 2060.306510] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[ 2060.315079] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:1
[ 2060.326178] RTL871X: kfree gain_offset 0x55:0x82060
[ 2060.327094] RTL871X:  after :0x86070
[ 2060.337520] RTL871X: <===  rtw_ips_pwr_up.............. in 980ms
[ 2060.344274] RTL871X: nolinked power save leave
[ 2060.350363] RTL871X: ==> ips_leave.....LED(0x01028282)...
[ 2062.091206] RTL871X: survey done event(0) band:0 for wlan0
[ 2062.097490] RTL871X: rtw_indicate_scan_done(wlan0)
[ 2062.113136] RTL871X: ==>rtw_ps_processor .fw_state(8)
[ 2062.119061] RTL871X: ==>ips_enter cnts:8
[ 2062.123454] RTL871X: nolinked power save enter
[ 2062.129160] RTL871X: ===> rtw_ips_pwr_down...................
[ 2062.135608] RTL871X: ====> rtw_ips_dev_unload...
[ 2062.152211] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[ 2062.157718] RTL871X: SetHwReg8188F: hci_sus_state=3
[ 2062.163979] RTL871X: SetHwReg8188F: hci_sus_state=0
[ 2062.170225] RTL871X: <=== rtw_ips_pwr_down..................... in 40ms

请大家帮忙看一下,给一点建议,谢谢

离线

楼主 #1 2022-06-28 15:53:17

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

如果停止和启动wlan0, 也会有以下提示

# ifconfig wlan0 down
[ 2170.385025] RTL871X: -871x_drv - drv_close, bup=1
# ifconfig wlan0 up
[ 2174.191120] RTL871X: +871x_drv - drv_open, bup=1
[ 2174.196313] RTL871X: -871x_drv - drv_open, bup=1
[ 2174.202458] RTL871X: cfg80211_rtw_set_power_mgmt(wlan0) enabled:1, timeout:-1
#

离线

楼主 #2 2022-06-28 20:49:17

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

进展:只拷贝更新后sun20i-mangopi-mq-linux.dtb到sdcard, 其实是不生效的,重新烧录sdcard.img, 可以看到PG12,PG10和PG15是生效的

[    1.335069] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not  found, using dummy regulator
[    1.346428] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[    1.353737] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[    1.361115] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[    1.368573] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[    1.375094] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[    1.382149] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[    1.390121] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[    1.398323] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[    1.406125] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[    1.412947] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=207 assert=0
[    1.421049] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[    1.429090] [ADDR_MGT] addr_mgt_probe: success.
[    1.435474] sunxi-spinand: AW SPINand MTD Layer Version: 2.0 20201228

但是使用wpa_supplicant进行连接,问题依旧失败,不停提示
[  814.954970] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  814.961602] RTL871X: ==>ips_leave cnts:85
[  814.966096] RTL871X: ===>  rtw_ips_pwr_up..............
[  814.972679] RTL871X: ===> ips_netdrv_open.........
[  814.978754] RTL871X: FW does not exist before power on!!
[  814.985536] RTL871X: SetHwReg8188F: hci_sus_state=1
[  814.993996] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  814.999914] RTL871X: SetHwReg8188F: hci_sus_state=2
[  815.005729] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  815.013463] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the sa
-[  815.022875] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  815.028729] RTL871X: Power on ok!
[  815.032752] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  815.039856] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  815.047213] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x887, Minute=36
[  815.060187] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  815.067961] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  815.310784] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUF
[  815.321103] RTL871X: _8051Reset8188: Finish
[  815.336435] RTL871X: _FWFreeToGo: Polling FW ready OK! (101, 10ms), REG_MCUFWDL:
[  815.345831] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  815.352519] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 280ms
[  815.360735] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  815.366508] RTL871X: HalDetectPwrDownMode(): PDN=0
[  815.372440] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
9 [  815.902927] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ###
[  815.911305] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0
[  815.922236] RTL871X: kfree gain_offset 0x55:0x82060
[  815.923195] RTL871X:  after :0x86070
[  815.933513] RTL871X: <===  rtw_ips_pwr_up.............. in 970ms
[  815.940937] RTL871X: nolinked power save leave
[  815.946085] RTL871X: ==> ips_leave.....LED(0x01028282)...
238
# [  817.691731] RTL871X: survey done event(0) band:0 for wlan0
[  817.707451] RTL871X: rtw_indicate_scan_done(wlan0)
[  817.738107] RTL871X: ==>rtw_ps_processor .fw_state(8)
[  817.743778] RTL871X: ==>ips_enter cnts:86
[  817.757437] RTL871X: nolinked power save enter
[  817.762416] RTL871X: ===> rtw_ips_pwr_down...................
[  817.787425] RTL871X: ====> rtw_ips_dev_unload...
[  817.828475] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[  817.833941] RTL871X: SetHwReg8188F: hci_sus_state=3
[  817.858367] RTL871X: SetHwReg8188F: hci_sus_state=0
[  817.863836] RTL871X: <=== rtw_ips_pwr_down..................... in 100ms

离线

楼主 #3 2022-06-28 22:06:35

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

一点新线索

https://debugdump.com/topic/1427/%E6%B7%98%E5%AE%9D%E6%8A%93%E4%BA%86%E5%8F%AA%E7%83%82%E9%BA%BB%E9%9B%80-mq/2?_=1656421718464&lang=zh-CN

其中提到 wifi_efuse_8189fs.map is not readable 传说中的efuse被冲了?

在log可以看到是相同的现象
...
[   23.622938] RTL871X: rtw_read_efuse_from_file /system/etc/wifi/wifi_efuse_8189fs.map is not readable
[   23.633761] RTL871X: ERROR invalid phy efuse and read from file fail, will use driver default!!
[   23.643889] RTL871X: EEPROM ID(0xffff) is invalid!!

处理的方法是需要跟换wifi模块, 看起来有点麻烦

离线

楼主 #4 2022-06-29 13:32:30

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

在log可以看到如果读efuse失败,它会尝试从文件系统加载

[   23.622938] RTL871X: rtw_read_efuse_from_file /system/etc/wifi/wifi_efuse_8189fs.map is not readable
[   23.633761] RTL871X: ERROR invalid phy efuse and read from file fail, will use driver default!!
[   23.643889] RTL871X: EEPROM ID(0xffff) is invalid!!

在https://whycan.com/t_6229.html,他的log输出了一个完整eFuse数据, 把这些数据存成文件
放置在文件系统中 /system/etc/wifi/wifi_efuse_8189fs.map, 重新启动, efuse 数据似乎能正确
加载了, 下面是它的log

[   24.946103] FF
[   24.948907] FF
[   24.950867] FF
[   24.954662]
[   24.956543] RTL871X: hal_EfuseSwitchToBank: Efuse switch bank to 0
[   25.013459] RTL871X: hal_ReadEFuse_WiFi: data end at address=0x98
[   25.020427] RTL871X: hal_com_config_channel_plan chplan:0x20
[   25.027238] RTL871X: kfree flag:1

但是,当尝试连接时,问题依旧存在

# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf&
# Successfully initialized wpa_supplicant
[  144.854258] RTL871X: cfg80211_rtw_get_txpower
[  144.859552] RTL871X: cfg80211_rtw_get_txpower
[  144.865824] RTL871X: cfg80211_rtw_get_txpower
[  144.872657] RTL871X: cfg80211_rtw_get_txpower
rfkill: Cannot open RFKILL contr[  144.887036] RTL871X: cfg80211_rtw_get_txpower
ol device
[  144.929954] RTL871X: cfg80211_rtw_flush_pmksa(wlan0)
[  145.036769] RTL871X: cfg80211_rtw_scan(wlan0)
[  145.041837] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  145.048225] RTL871X: ==>ips_leave cnts:1
[  145.052624] RTL871X: ===>  rtw_ips_pwr_up..............
[  145.059048] RTL871X: ===> ips_netdrv_open.........
[  145.064681] RTL871X: FW does not exist before power on!!
[  145.071989] RTL871X: SetHwReg8188F: hci_sus_state=1
[  145.080261] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  145.085752] RTL871X: SetHwReg8188F: hci_sus_state=2
[  145.092193] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  145.099804] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  145.109003] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  145.114466] RTL871X: Power on ok!
[  145.119019] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  145.125551] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  145.133515] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[  145.146210] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  145.154010] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  145.397058] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[  145.407957] RTL871X: _8051Reset8188: Finish
[  145.423302] RTL871X: _FWFreeToGo: Polling FW ready OK! (109, 20ms), REG_MCUFWDL:0x000505c6
[  145.432704] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  145.439299] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 290ms
[  145.446978] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  145.453335] RTL871X: HalDetectPwrDownMode(): PDN=0
[  145.459143] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[  145.965860] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[  145.974268] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:1
[  145.985199] RTL871X: kfree gain_offset 0x55:0x82060
[  145.986165] RTL871X:  after :0x86070
[  145.996690] RTL871X: <===  rtw_ips_pwr_up.............. in 940ms
[  146.003840] RTL871X: nolinked power save leave
[  146.009480] RTL871X: ==> ips_leave.....LED(0x01028282)...
[  146.015557] RTL871X: rtw_cfg80211_set_probe_req_wpsp2pie(wlan0) listen channel - country:XX, class:81, ch:6
[  147.761455] RTL871X: survey done event(0) band:0 for wlan0
[  147.767685] RTL871X: rtw_indicate_scan_done(wlan0)
[  147.783290] RTL871X: ==>rtw_ps_processor .fw_state(8)
[  147.789090] RTL871X: ==>ips_enter cnts:2
[  147.793457] RTL871X: nolinked power save enter
[  147.799135] RTL871X: ===> rtw_ips_pwr_down...................
[  147.805675] RTL871X: ====> rtw_ips_dev_unload...
[  147.822517] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[  147.828020] RTL871X: SetHwReg8188F: hci_sus_state=3
[  147.834357] RTL871X: SetHwReg8188F: hci_sus_state=0
[  147.840496] RTL871X: <=== rtw_ips_pwr_down..................... in 40ms
[  152.779856] RTL871X: cfg80211_rtw_scan(wlan0)
[  152.784742] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  152.791432] RTL871X: ==>ips_leave cnts:2
[  152.795844] RTL871X: ===>  rtw_ips_pwr_up..............
[  152.802341] RTL871X: ===> ips_netdrv_open.........
[  152.808329] RTL871X: FW does not exist before power on!!
[  152.815240] RTL871X: SetHwReg8188F: hci_sus_state=1
[  152.823708] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  152.829582] RTL871X: SetHwReg8188F: hci_sus_state=2
[  152.835395] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  152.843252] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  152.852344] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  152.858193] RTL871X: Power on ok!
[  152.862262] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  152.869355] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  152.876643] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[  152.889510] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  152.896817] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  153.142751] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[  153.152972] RTL871X: _8051Reset8188: Finish
[  153.168315] RTL871X: _FWFreeToGo: Polling FW ready OK! (108, 20ms), REG_MCUFWDL:0x000505c6
[  153.177667] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  153.183713] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 290ms
[  153.192111] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  153.198266] RTL871X: HalDetectPwrDownMode(): PDN=0
[  153.203630] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[  153.706052] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[  153.714453] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:1
[  153.725672] RTL871X: kfree gain_offset 0x55:0x82060
[  153.726625] RTL871X:  after :0x86070
[  153.736992] RTL871X: <===  rtw_ips_pwr_up.............. in 940ms
[  153.744503] RTL871X: nolinked power save leave
[  153.750033] RTL871X: ==> ips_leave.....LED(0x01028282)...
[  155.491458] RTL871X: survey done event(0) band:0 for wlan0
[  155.497725] RTL871X: rtw_indicate_scan_done(wlan0)
[  155.513298] RTL871X: ==>rtw_ps_processor .fw_state(8)
[  155.519094] RTL871X: ==>ips_enter cnts:3
[  155.523467] RTL871X: nolinked power save enter
[  155.529265] RTL871X: ===> rtw_ips_pwr_down...................
[  155.535720] RTL871X: ====> rtw_ips_dev_unload...
[  155.552563] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[  155.558054] RTL871X: SetHwReg8188F: hci_sus_state=3
[  155.564382] RTL871X: SetHwReg8188F: hci_sus_state=0
[  155.570531] RTL871X: <=== rtw_ips_pwr_down..................... in 40ms

# wpa_[  160.509836] RTL871X: cfg80211_rtw_scan(wlan0)
[  160.514730] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  160.521404] RTL871X: ==>ips_leave cnts:3
[  160.525831] RTL871X: ===>  rtw_ips_pwr_up..............
[  160.532329] RTL871X: ===> ips_netdrv_open.........
[  160.538423] RTL871X: FW does not exist before power on!!
[  160.545196] RTL871X: SetHwReg8188F: hci_sus_state=1
[  160.553719] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  160.559590] RTL871X: SetHwReg8188F: hci_sus_state=2
[  160.565400] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  160.573343] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  160.582471] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  160.588326] RTL871X: Power on ok!
[  160.592348] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  160.599481] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  160.606797] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date=22, Hour=17, Minute=36
[  160.619672] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  160.626982] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  160.872588] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[  160.882826] RTL871X: _8051Reset8188: Finish
[  160.898224] RTL871X: _FWFreeToGo: Polling FW ready OK! (109, 20ms), REG_MCUFWDL:0x000505c6
[  160.907564] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  160.913605] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 290ms
[  160.921988] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  160.928139] RTL871X: HalDetectPwrDownMode(): PDN=0
c[  160.933723] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
li[  161.435968] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[  161.444450] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:1
[  161.455593] RTL871X: kfree gain_offset 0x55:0x82060
[  161.456545] RTL871X:  after :0x86070
[  161.466909] RTL871X: <===  rtw_ips_pwr_up.............. in 940ms
[  161.474420] RTL871X: nolinked power save leave
[  161.479954] RTL871X: ==> ips_leave.....LED(0x01028282)...

离线

楼主 #5 2022-06-29 15:34:56

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

最后,测试了一下晕哥的支持wifi的版本,现象依旧,确实可能是需要跟换wifi模块

https://bbs.aw-ol.com/topic/791/%E8%8A%92%E6%9E%9C%E6%B4%BE%E9%BA%BB%E9%9B%80%E5%88%B0%E6%89%8B%E8%AF%95%E7%8E%A9/24,  芒果派麻雀固件,支持WIFI 2021-12-19.7z

#> wifi_connect_ap_test xxxx xxxx

get scan results is null
Disconnected,the reason:WSE_NETWORK_NOT_EXIST
Wifi connect ap :[  103.734586] RTL871X: ==>rtw_ps_processor .fw_state(8) Failure!
root@TinaLinux:/# [  103.740775] RTL871X: ==>ips_enter cnts:5
[  103.747833] RTL871X: nolinked power save enter
[  103.752795] RTL871X: ===> rtw_ips_pwr_down...................
[  103.759525] RTL871X: ====> rtw_ips_dev_unload...
[  103.776203] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[  103.781831] RTL871X: SetHwReg8188F: hci_sus_state=3
[  103.788230] RTL871X: SetHwReg8188F: hci_sus_state=0
[  103.793929] RTL871X: <=== rtw_ips_pwr_down..................... in 50ms

无法连接成功, RTL8189 模块确实问题比较多,我还有另外一块MQ-R(T113) 板子,它的EFUSE 也是冲掉了

离线

楼主 #9 2023-03-08 13:09:06

zhongtao1701
会员
注册时间: 2022-02-05
已发帖子: 29
积分: 20

Re: MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下

谢谢答复,我上次更新过最新的驱动,发现这个问题被自动修复了

最近编辑记录 zhongtao1701 (2023-03-08 13:13:28)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn