您尚未登录。

#1 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 如何降低TinyWSN路由节点的功耗? » 2023-09-08 12:22:54

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/655053282
从三个方面介绍了降低TinyWSN节点功耗的方法(动态时隙,节点数目和全网静默),了解如何平衡功耗和速度之间的取舍

#2 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » TinyWSN的全网静默实战教程 » 2023-08-25 14:23:00

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/652296663

全网节点(包括路由节点)都保持微安级别的功耗,支持自顶向下(top-down)和自底向上(bottom-up)发起的通信。

#3 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » TinyWSN的全网集控的实战教程 » 2023-08-18 10:35:52

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/650790771

对于全网的离线节点进行集中控制,例如阀门,路灯,无需唤醒节点入网,直接全网广播发送通知消息,节点同步进行操作。

#4 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » TinyWSN是否支持Mesh组网? » 2023-08-04 15:28:25

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/648001948
介绍TinyWSN和Mesh组网的各种特点,TinyWSN设计上的一些考虑,以及采纳Mesh组网的哪些优点

#6 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 知乎上关于TinyWSN的全网集采的实战教程 » 2023-07-10 10:43:39

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/642487189
通常终端节点按自己的周期上报数据,如果想要集中采集所有节点的数据,可以参见上面全网集采的实战教程

#10 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 知乎上介绍TinyWSN网关的实战教程-端口转发 » 2023-06-20 10:57:34

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/638373138

当网关和主机不能直接访问时,需要借助公网主机进行端口转发,介绍了具体的转发配置过程

#13 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 介绍知乎上关于TinyWSN的透传型网关的命令接口和配置选项 » 2023-06-12 12:44:23

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/636443403

透传型网关可以把节点模块的命令透传至USB,WIFI,以太网或者BLE,文章中介绍了模块的命令接口和配置选项

#14 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 介绍知乎上关于TinyWSN的透传型网关组网 » 2023-06-07 13:36:47

zhongtao1701
回复: 0

知乎原文
https://zhuanlan.zhihu.com/p/635300935

它是基于ESP32C3开发的,可以把节点模块的命令透传至USB,WIFI,以太网或者BLE,实现对网络的远端管理

#15 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 介绍知乎上关于TinyWSN的内嵌模式调试的文章 » 2023-05-21 10:44:42

zhongtao1701
回复: 1

知乎原文
https://zhuanlan.zhihu.com/p/630987552?

节点模块支持三种开发模式,其中一种是内嵌模式,如下图所示,系统程序和应用程序同时运行在在模块的控制器内,它们之间通过共享内存的消息接口互相通信,应用程序可以单独编译和加载,但是应用程序设计需要符合一定的规范,避免干扰到系统程序的时序, 具体可以参见《TinyWSN内嵌模式手册》,介绍两种调试方法:调试输出和调试命令
...

#16 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 介绍一篇知乎上关于无线传感器网络的文章 » 2023-05-16 20:09:34

zhongtao1701
回复: 0

https://zhuanlan.zhihu.com/p/629492688

TinyWSN从设计初期就是面向无线传感器网络,从团队多年工程的实践经验,设定以下几个优先的设计目标:

支持节点数目多,节点数目可达65536
支持多种组网方式,例如星型,树型和链型
节点支持低功耗,电池可以支持10年以上
支持双向通信,可由网络侧和节点发起通信
可靠通信质量,不随节点数目增加而恶化
...

#17 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2023-03-08 13:09:06

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

#18 全志 SOC » T113加载wifi驱动8189fs.so, 但是却没有触发SDIO读写操作,哪位大侠帮忙看一下 » 2022-09-22 11:22:25

zhongtao1701
回复: 0

T113的板子上原来焊接XR829模块, 加载xr829.so是可以工作的,换成rtl8189模块,加载驱动8189fs.ko

insmod /lib/modules/5.4.61/kernel/drivers/net/wireless/rtl8189fs/8189fs.ko
[ 41.238505] RTL871X: module init start
[ 41.242814] RTL871X: rtl8189fs v4.3.24.8_22657.20170607
[ 41.248914] RTL871X: module init ret=0

没触发sdio的读卡操作,尝试加载xr829的驱动,发现它是可以触发sdio的操作,而且它还能发现芯片是RTL8188F, 于是继续运行8189的驱动,完成eFUSE读取以及FW的加载, rtl8189的驱动来自 https://github.com/Tina-Linux/Tina_d1x_mangopi-sbc

# insmod /lib/modules/5.4.61/kernel/drivers/net/wireless/xr829/xr829.ko
[  145.348636] ======== XRADIO WIFI OPEN ========
[  145.355347] [XRADIO] Driver Label:XR_V02.16.84_P2P_HT40_01.31
[  145.362187] [XRADIO] Allocated hw_priv @ c656bdcd
[  145.367544] [ADDR_MGT] get_addr_by_name: t->addr:
[  145.374343] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[  145.390658] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[  145.597899] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[  145.601670] [XRADIO] Detect SDIO card 1
[  145.609181] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[  145.632659] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  145.657667] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  145.672341] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  145.685743] sunxi-mmc 4021000.sdmmc: card claims to support voltages below defined range
[  145.704547] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[  145.716202] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[  145.728416] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[  145.741281] mmc1: new high speed SDIO card at address 0001
[  145.748826] RTL871X: CHIP TYPE: RTL8188F
[  145.753747] RTL871X: rtw_hal_config_rftype RF_Type is 3 TotalTxPath is 1
[  145.761339] RTL871X: Chip Version Info: CHIP_8188F_Normal_Chip_SMIC_B_CUT_1T1R_RomVer(0)
[  145.770631] RTL871X: SetHwReg8188F: hci_sus_state=1
[  145.777750] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  145.783258] RTL871X: SetHwReg8188F: hci_sus_state=2
[  145.783725] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  145.783732] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  145.783802] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  145.783881] RTL871X: EEPROM type is E-FUSE
[  145.784522] RTL871X: hal_EfuseSwitchToBank: Efuse switch bank to 0
[  145.852933] RTL871X: hal_ReadEFuse_WiFi: data end at address=0x98
[  145.859788] RTL871X: HW EFUSE
[  145.863151] RTL871X: 0x000

会是什么问题,哪位大侠指点一下,谢谢!

#19 Re: 全志 SOC » D1s的buildroot构建中如何调整引导程序(boot0, opensbi以及uboot)的串口终端 » 2022-07-23 12:50:54

由于无法重建boot0_sdcard.fex, 参见下面对fex文件的分析,直接修改二进制文件boot0_sdcard.fex

https://whycan.com/t_6638.html
https://linux-sunxi.org/Boot0

调整为UART3以及PB6, PB7的管脚复用定义,然后重新生成文件的checksum

boot0_sdcard.png

然后重新烧录,最终效果boot0和opensbi在UART0和UART3都无输出显示

uboot和kernel的显示成功转到UART3上
U-Boot 2018.05-config-dirty (Jul 22 2022 - 19:54:57 -0700) Allwinner Technology

[00.327]DRAM:  64 MiB
[00.329]Relocation Offset is: 01ee9000
[00.333]secure enable bit: 0
[00.336]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.343]flash init start
[00.345]workmode = 0,storage type = 1
[00.348][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.354][mmc]: get sdc_type fail and use default host:tm1.
[00.361][mmc]: can't find node "mmc0",will add new node
[00.365][mmc]: fdt err returned <no error>
[00.369][mmc]: Using default timing para
[00.373][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.409][mmc]: card_caps:0x3000000a
[00.412][mmc]: host_caps:0x3000003f


不知道为什么boot0和opensbi的串口输出没有起效果,哪位大佬能指点一下? 谢谢

#20 Re: 全志 SOC » D1s的buildroot构建中如何调整引导程序(boot0, opensbi以及uboot)的串口终端 » 2022-07-21 15:43:37

或者哪位大侠手里有使用UART3(PB6, PB7)的boot0_sdcard.fex, 是否能提供一份,谢谢!

#21 全志 SOC » D1s的buildroot构建中如何调整引导程序(boot0, opensbi以及uboot)的串口终端 » 2022-07-21 09:25:49

zhongtao1701
回复: 2

在D1s的buildroot构建中,例如 https://gitee.com/GloomyGhost/Buildroot-YuzukiSBC, 想要调整串口
  UART0 (PE2, PE3) - > UART3(PB6, PB7)

按下面的讨论主题进行调整

求助大佬。D1s如何修改默认的Debug串口节点为UART3,也就是PB6 PB7
https://debugdump.com/topic/1429/%E6%B1 … lang=zh-CN

1)uboot 修改  CONFIG_CONS_INDEX 为 4
2) 修改opensbi内的 UART基地址为UART3

管脚复用应该在sys_config.fex进行调整,但是在buildroot中只提供了二进制的
buildroot/board/allwinner-generic/sun20i-d1s/bin/boot0_sdcard.fex

请教各位大佬,这个应该如何进行调整? 谢谢

#22 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-29 15:34:56

最后,测试了一下晕哥的支持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 也是冲掉了

#23 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-29 13:32:30

在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)...

#24 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-28 22:06:35

一点新线索

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模块, 看起来有点麻烦

#25 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-28 20:49:17

进展:只拷贝更新后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

#26 Re: 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-28 15:53:17

如果停止和启动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
#

#27 全志 SOC » MQ-R(D1s) 无线RTL8189连接失败,请大家帮忙看一下 » 2022-06-28 15:46:32

zhongtao1701
回复: 9

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

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

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

#29 Re: 全志 SOC » 开源自己的Openwrt衍生版 HandsomeMod 支持f1c100s/f1c200s v3s » 2022-02-16 13:06:58

首先谢谢大侠handsomehacker 分享,我用sipeed-licheepi-zero-dock的配置构建一个版本,板子是淘宝sipeed店购买Zero拓展板,就是底板和核心板是一起的烧录到SD卡,能够顺利启动,其中以太网可以正常使用, 但是USB的OTG不能正常工作,我使用的是一根micro转OTG延长线,外接一个U盘或FTDI232,我首先用sipeed的版本验证了硬件,发现可以正确枚举设备,后面是分别插U盘和FTDI232的记录。

1) U盘

licheepi# [   64.170092] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (98, VALID), retry #0, port1 00000100
[   69.350072] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   69.552104] usb-storage 1-1:1.0: USB Mass Storage device detected
[   69.561298] scsi host0: usb-storage 1-1:1.0
[   70.571234] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Micro     8.02 PQ: 0 ANSI: 0 CCS
[   70.587025] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  349.448511] usb 1-1: USB disconnect, device number 2

2) FTDI232
[  352.950057] usb 2-1: new full-speed USB device number 2 using ohci-platform


使用HandSomeMd/openwrt,插入设备,系统没有反应,但是会给设备供电,后面是完整的启动记录,  好像USB的驱动都已经加载,
不知道还需要调整些什么,谢谢!

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.171 (forlinx@ubuntu) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r152-de59cfa486)) #0 SMP Sun Feb 6 02:27:36 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero With Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30924 r8192 d22324 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 14971
[    0.000000] Kernel command line: console=tty0 console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 swiotlb=1 rootwait
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 46692K/60416K available (6625K kernel code, 423K rwdata, 1808K rodata, 2048K init, 245K bss, 13724K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x2fc/0x4ac with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000018] Switching to timer-based delay loop, resolution 41ns
[    0.000285] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000545] Console: colour dummy device 80x30
[    0.000849] printk: console [tty0] enabled
[    0.000915] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000946] pid_max: default: 32768 minimum: 301
[    0.001159] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001194] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002304] CPU: Testing write buffer coherency: ok
[    0.002928] /cpus/cpu@0 missing clock-frequency property
[    0.002978] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003859] Setting up static identity map for 0x40200000 - 0x40200060
[    0.004141] rcu: Hierarchical SRCU implementation.
[    0.004786] smp: Bringing up secondary CPUs ...
[    0.004831] smp: Brought up 1 node, 1 CPU
[    0.004848] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.004863] CPU: All CPU(s) started in HYP mode.
[    0.004875] CPU: Virtualization extensions available.
[    0.008774] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.009208] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009261] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.009535] pinctrl core: initialized pinctrl subsystem
[    0.011408] NET: Registered protocol family 16
[    0.011969] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013273] No ATAGs?
[    0.065328] SCSI subsystem initialized
[    0.068291] usbcore: registered new interface driver usbfs
[    0.068449] usbcore: registered new interface driver hub
[    0.068554] usbcore: registered new device driver usb
[    0.068762] pps_core: LinuxPPS API ver. 1 registered
[    0.068786] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.068835] PTP clock support registered
[    0.069212] Advanced Linux Sound Architecture Driver Initialized.
[    0.074288] clocksource: Switched to clocksource arch_sys_counter
[    0.081660] thermal_sys: Registered thermal governor 'step_wise'
[    0.082055] NET: Registered protocol family 2
[    0.082358] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.082949] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.083030] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083071] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.083106] TCP: Hash tables configured (established 1024 bind 1024)
[    0.083270] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.083339] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.083659] NET: Registered protocol family 1
[    0.097606] kvm [1]: vgic interrupt IRQ16
[    0.097737] kvm [1]: Hyp mode initialized successfully
[    0.100216] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.107483] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.107716] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.124777] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.130284] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.131521] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.131768] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    0.132047] pwm-backlight backlight: invalid default brightness level: 50, using 10
[    0.138549] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.140777] printk: console [ttyS0] disabled
[    0.161081] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 35, base_baud = 1500000) is a U6_16550A
[    0.719973] printk: console [ttyS0] enabled
[    0.732641] loop: module loaded
[    0.737784] libphy: Fixed MDIO Bus: probed
[    0.742814] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[    0.749326] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[    0.755477] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.761290] dwmac-sun8i 1c30000.ethernet: No regulator found
[    0.773114] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 38000 (expect 58000)
[    0.782611] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    0.789901] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    0.797155] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    0.802124] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    0.808929] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    0.814605] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    0.820282] dwmac-sun8i 1c30000.ethernet: device MAC address d2:a1:ba:33:84:75
[    0.827848] libphy: stmmac: probed
[    0.832037] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    0.838445] libphy: mdio_mux: probed
[    0.842070] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    0.848494] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    0.857181] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.863746] ehci-platform: EHCI generic platform driver
[    0.869510] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.875220] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.883179] ehci-platform 1c1a000.usb: irq 39, io mem 0x01c1a000
[    0.914150] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.920639] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    0.928998] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.936260] usb usb1: Product: EHCI Host Controller
[    0.941142] usb usb1: Manufacturer: Linux 5.4.171 ehci_hcd
[    0.946645] usb usb1: SerialNumber: 1c1a000.usb
[    0.952340] hub 1-0:1.0: USB hub found
[    0.956693] hub 1-0:1.0: 1 port detected
[    0.961443] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.967823] ohci-platform: OHCI generic platform driver
[    0.973484] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.980244] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.988281] ohci-platform 1c1a400.usb: irq 40, io mem 0x01c1a400
[    1.068376] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    1.076726] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.083957] usb usb2: Product: Generic Platform OHCI controller
[    1.089902] usb usb2: Manufacturer: Linux 5.4.171 ohci_hcd
[    1.095405] usb usb2: SerialNumber: 1c1a400.usb
[    1.100879] hub 2-0:1.0: USB hub found
[    1.105283] hub 2-0:1.0: 1 port detected
[    1.110147] usbcore: registered new interface driver usb-storage
[    1.116628] mousedev: PS/2 mouse device common for all mice
[    1.122994] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.131476] i2c /dev entries driver
[    1.136902] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.145899] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.186830] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.194288] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    1.229619] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.239337] NET: Registered protocol family 10
[    1.248902] Segment Routing with IPv6
[    1.252772] NET: Registered protocol family 17
[    1.257436] can: controller area network core (rev 20170425 abi 9)
[    1.263716] NET: Registered protocol family 29
[    1.268239] 8021q: 802.1Q VLAN Support v1.8
[    1.272585] Registering SWP/SWPB emulation handler
[    1.285024] simple-framebuffer 43b00000.framebuffer: framebuffer at 0x43b00000, 0x177000 bytes, mapped to 0x(ptrval)
[    1.295675] simple-framebuffer 43b00000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    1.311623] Console: switching to colour frame buffer device 100x30
[    1.328620] simple-framebuffer 43b00000.framebuffer: fb0: simplefb registered!
[    1.341505] hctosys: unable to open rtc device (rtc0)
[    1.350979] ALSA device list:
[    1.357799]   No soundcards found.
[    1.366706] Waiting for root device /dev/mmcblk0p2...
[    1.375841] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.391481] mmc0: new high speed SDHC card at address aaaa
[    1.402734] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[    1.413866]  mmcblk0: p1 p2
[    1.426091] mmc1: new high speed SDIO card at address 0001
[    1.448280] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[    1.459895] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.473739] Freeing unused kernel memory: 2048K
[    1.484400] Run /sbin/init as init process
[    1.545669] init: Console is alive
[    1.553048] init: - watchdog -
[    1.628334] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.639299] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.660781] init: - preinit -
[    1.906661] random: jshn: uninitialized urandom read (4 bytes read)
[    1.943142] random: jshn: uninitialized urandom read (4 bytes read)
[    1.972987] random: jshn: uninitialized urandom read (4 bytes read)
[    2.047121] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY]
[    2.059669] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[    2.070588] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    2.081682] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[    2.091546] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.164617] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[    4.176385] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    6.239625] mount_root: mounting /dev/root
[    6.248009] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended
[    6.262879] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    6.304246] random: fast init done
[    6.323881] urandom-seed: Seeding with /etc/urandom.seed
[    6.372478] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[    6.390675] procd: - early -
[    6.398449] procd: - watchdog -
[    7.068837] procd: - watchdog -
[    7.076810] procd: - ubus -
[    7.095282] urandom_read: 3 callbacks suppressed
[    7.095292] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.132744] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.142793] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.154824] procd: - init -
Please press Enter to activate this console.
[    7.661448] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.679021] urngd: v1.0.2 started.
[    7.801797] xt_time: kernel timezone is -0000
[    7.812730] random: crng init done
[    7.819046] random: 1 urandom warning(s) missed due to ratelimiting
[    7.847295] PPP generic driver version 2.4.2
[    7.865317] NET: Registered protocol family 24
[    7.917267] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.242348] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY]
[   12.254409] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[   12.264827] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[   12.275518] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[   12.285054] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[   12.483360] br-lan: port 1(eth0) entered blocking state
[   12.491687] br-lan: port 1(eth0) entered disabled state
[   12.500121] device eth0 entered promiscuous mode
[   18.724642] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   18.736057] br-lan: port 1(eth0) entered blocking state
[   18.744186] br-lan: port 1(eth0) entered forwarding state
[   18.754634] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   31.844120] vcc5v0: disabling

页脚

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

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