logo elektroda
logo elektroda
X
logo elektroda

RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?

divadiow 10503 276
ADVERTISEMENT
  • #61 21360786
    insmod
    Level 22  
    >>21360762 WBR3 is a no (or if you preflash it, and then rely only on ota).
    But if you have a BW15, then, since its log uart pins are easily accessible, just connect log_tx and tx, log_rx and rx and it should work.
    I use this board for all esp-12 sized modules, and it worked ok for a bw15.
    RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?
    Though it only booted if the com port was opened (some pull-up thing?).
  • ADVERTISEMENT
  • #62 21360906
    DeDaMrAz
    Level 19  
    @insmod

    MQTT is not working on WBR3
    Info:MQTT:mqtt_connection_cb: Disconnected, reason: 5(Refused not authorized)


    DTH is working 6-7 out of 10 readings, 3-4 will give either "timeout waiting for pulse" or something something checksum. With power save no readings were observed. Will check OTA after a new commit. Let me know if you want anything else checked and I'll prepare another RTL module as well for testing.

    Info:SENSOR:DHT start, pin is 18
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT timeout waiting for pulse.
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT timeout waiting for pulse.
    Info:SENSOR:DHT start, pin is 18
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT start, pin is 18
    Info:SENSOR:DHT timeout waiting for pulse.
    Info:SENSOR:DHT start, pin is 18


    @p.kaczmarek2

    PROTA tool is not recognizing RTL platforms.

    Error message in a program window showing Unknown platform RTL87X0C.

    Next module in line for testing...

    Close-up of an electronic module labeled T102 V1.1 with various components.
  • ADVERTISEMENT
  • #63 21361003
    p.kaczmarek2
    Moderator Smart Home
    Prota has Platforms list here, where RTL was not yet added:
    https://github.com/openshwprojects/OBKotaTool/blob/main/PROTATool/Platforms.cs
    Helpful post? Buy me a coffee.
  • #65 21361267
    insmod
    Level 22  
    >>21361242 AmebaZ is RTL B, any RTL A is Ameba1. I have a t102 BX module, as well as wrg1 (RTL8711AM) from a zigbee bridge. But afaik, Ameba1 cannot be flashed via uart, only swd.
  • #67 21361443
    p.kaczmarek2
    Moderator Smart Home
    Great job @insmod !!!
    OpenRTL87X0C user interface with device information and function buttons.
    What's left before merge? Check if DHT11 works on... BL602 and W600/W800?

    Added after 7 [minutes]:

    Which RTL is it? It says on UART:
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3              
    ROM Version: v3.0              
    Test Mode: boot_cfg1=0x20
    Download Image over UART2[tx=16,rx=15] baud=115200
    


    Added after 35 [seconds]:

    WBR3 electronic module held by metal tweezers.

    Added after 2 [minutes]:

    DeDaMrAz wrote:
    We got the option how to flash AmebaZ device (RTL8710BN or RTL8195A) also pinout and flashing procedure is clear so we "only" need an image for it :)

    RTL8710BN worked with https://github.com/openshwprojects/OpenRTL8710BN but was not stable and I lost the module and was not able to continue.

    @insmod what do you think about it? It's somewhat old SDK so maybe it's worth to take newer?

    Added after 2 [hours] 48 [minutes]:

    Interesting document (not much new info but still useful):
    Helpful post? Buy me a coffee.
  • #68 21361618
    DeDaMrAz
    Level 19  
    I played around with PWM on A12 and it is not perfect but it's working, waveform is stable but first approximately 20% of the slider is zero, but my A12 was set to PWM and I rebooted the module, this is the logport output:

    Info:MAIN:Time 43, idle 0/s, free 91832, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 44, idle 0/s, free 92000, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 45, idle 0/s, free 92168, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 46, idle 0/s, free 91832, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Module reboot in 2...
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 47, idle 0/s, free 91832, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Module reboot in 1...
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    
    == Boot Loader ==
    Aug 30 2024:04:22:00
    
    Boot Loader <==
    
    == RAM Start ==
    Build @ 12:47:19, Dec 23 2024
    interface 0 is initialized
    interface 1 is initialized
    
    Initializing WIFI ...Entering initLog()...
    Commands registered!
    initLog() done!
    Info:MAIN:Main_Init_Before_Delay
    EasyFlash V4.1.0 is initialize success.
    You can get the latest version on https://github.com/armink/EasyFlash .
    
    WIFI initialized
    
    init_thread(47), Available heap 0x1a710Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 35 changes count.
    Error:CMD:no file early.bat err -2


    Device will go offline and will not boot back unless I go for a safe mode 5 reboot's method and then remove PWM association on A12.

    I got more findings like this, if of any interest let me know I can post them in this thread.
  • ADVERTISEMENT
  • #69 21361625
    p.kaczmarek2
    Moderator Smart Home
    WBR2 log:
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    Test Mode: boot_cfg1=0x20
    Download Image over UART2[tx=16,rx=15] baud=115200
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    Test Mode: boot_cfg1=0x20
    Download Image over UART2[tx=16,rx=15] baud=115200
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    
    == Boot Loader ==
    Dec  5 2019:14:02:18
    
    fwx SELE[fffffffe]
    fw SELE Bitidx 1, fw1 valid 1, sn 100, fw2 valid 1, sn 101
    fw2 USE, return sn 101
    
    Boot Loader <==
    
    == RAM Start ==
    Build @ 14:44:45, Jul 29 2020
    
     Create Task init, stack 0x1000fb28, len 5120
    
     Create Task app_init, stack 0x10010f88, len 8192
    
     Create Task IDLE, stack 0x10012fe8, len 768
    
     Create Task Tmr Svc, stack 0x10013640, len 2048
    
     Create Task TCP_IP, stack 0x10013fb8, len 4000
    interface 0 is initialized
    interface 1 is initialized
    
    In[01-01 18:12itializing :15 TUYA InfWIFI ...o][mqc_app.c:175] mqc app init ...
    
     Create Task sys_timer, stack 0x1001a800, len 4096
    
     Create Task cmmod, stack 0x1001eca8, len 4096
    [01-01 18:12:15 TUYA Info][sf_mqc_cb.c:42] register mqc app callback
    [01-01 18:12:15 TUYA Debug][mqc_app.c:118] mq_pro:5 mqc_handler_cnt:1
    [01-01 18:12:15 TUYA Debug][mqc_app.c:118] mq_pro:31 mqc_handler_cnt:2
    [01-01 18:12:15 TUYA Debug][log_seq.c:732] read from uf. max:0 first:0 last:0
    [01-01 18:12:15 TUYA Debug][svc_online_log.c:288] svc online log init success
    
     Create Task wk_th-0, stack 0x10023e18, len 5120
    [01-01 18:12:15 TUYA Err][tuya_ws_db.c:314] kvs_read fails gw_bi -1
    [01-01 18:12:15 TUYA Err][ws_db_gw.c:111] gw base read fails -935
    [01-01 18:12:15 TUYA Debug][tuya_bt_sdk.c:89] ty bt cmmod register finish 1
    [01-01 18:12:15 TUYA Notice][tuya_ble_api.c:301] ble sdk inited
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:1047] tuya_hal_bt_port_init
    
    [01-01 18:12:15 TUYA Debug][uni_thread.c:215] Thread:sys_timer Exec Start. Set to Running Status
    [01-01 18:12:15 TUYA Debug][uni_thread.c:215] Thread:cmmod Exec Start. Set to Running Status
    [01-01 18:12:15 TUYA Debug][uni_thread.c:215] Thread:wk_th-0 Exec Start. Set to Running Status
    
     Create Task rtw_recv_tasklet, stack 0x10025328, len 5936
    
     Create Task rtw_xmit_tasklet, stack 0x10026b68, len 1024
    
     Create Task rtw_interrupt_thread, stack 0x10027078, len 1024
    
     Create Task cmd_thread, stack 0x10027588, len 2048
    
    WIFI initialized
    
    init_thread(55), Available hea
     Createp 0x16be0 Task trace_task, stack 0x10027ef8, len 512
    
     Create Task UpperStackTask, stack 0x100287c8, len 3072
    
     Create Task HCI I/F, stack 0x1002b2b0, len 2048
    BT BUILD Date: Jul 29 2020, 16:17:09 
    BT RESET LOG...
    [01-01 18:12:15 TUYA Debug][tuya_hal_wifi.c:575] read wifi mac:38:1f:8d:39:13:c2
    [01-01 18:12:15 TUYA Notice][tuya_hal_bt.c:893] BLE MAC: 0x38-0x1f-0x8d-0x39-0x13-0xc2
    
     Create Task tuya_bt_main_task, stack 0x1002c3d8, len 2560
    BT Reset ok
    bt_iqk_efuse_valid: has data
    
    hci_tp_phy_efuse[0]=0,
    bt_dump_iqk:    DUMP,
    the IQK_xx  data is 0x127,
    the IQK_yy  data is 0x3fe,
    the QDAC   data is 0x1a,
    the IDAC   data is 0x1b,
    the QDAC2  data is 0x19,
    the IDAC2  data is 0x19,
    
     Create Task rtw_coex_mailbox_thread, stack 0x1000fc08, len 1024
    hci_read_rom_check: rom_version 0x0003, bt_hci_chip_id 0x0004
    
    BT ADDRESS:
    38:1f:8d:39:13:c2:
    
     WRITE  physical FLATK=tx_flatk=ff00 
    
    We use fw_buf=1002f128, fw_len = 13a0, config_buf = 10010128, config_len= 32
    Set baudrate to 921600
    
    hci_tp_config:BT INIT success 7
    Start upperStack
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:788] tuya_bt_app_profile_callback(), service_id:255, tuya_bt_srv_id:1
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:338] tuya_bt_handle_io_msg(), msg_type:0
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:239] app_handle_gap_msg: subtype 1
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:72] app_handle_dev_state_evt: init state 1, adv state 0, cause 0x0
    
    
    [BLE peripheral] GAP stack ready
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:338] tuya_bt_handle_io_msg(), msg_type:0
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:239] app_handle_gap_msg: subtype 1
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:72] app_handle_dev_state_evt: init state 1, adv state 1, cause 0x0
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:338] tuya_bt_handle_io_msg(), msg_type:0
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:239] app_handle_gap_msg: subtype 1
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:72] app_handle_dev_state_evt: init state 1, adv state 2, cause 0x0
    
    [01-01 18:12:15 TUYA Debug][tuya_hal_bt.c:91] GAP adv start
    
    [01-01 18:12:15 TUYA Notice][tuya_ble_api.c:337] ble sdk re_inited
    [01-01 18:12:15 TUYA Notice][tuya_bt_sdk.c:130] ty bt sdk init success finish
    [01-01 18:12:15 TUYA Notice][tuya_main.c:396] Base firmware: rtl8720cf_tls_common_iot_config:2.1.6 compiled at Date:Jul 29 2020 Time:16:17:40
    [01-01 18:12:15 TUYA Notice][tuya_main.c:397] reset reset reason num 0
    [01-01 18:12:15 TUYA Debug][tuya_device.c:19] < TUYA IOT SDK V:1.0.12 BS:40.00_PT:2.2_LAN:3.3_CAD:1.0.2_CD:1.0.0 >
    < BUILD AT:2020_07_28_19_56_28 BY embed FOR ty_iot_wf_bt_sdk_rtos AT rtl8720cf_ameba >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 LITTLE_END:1 TLS_MODE:2 ENABLE_LOCAL_LINKAGE:0 ENABLE_CLOUD_OPERATION:0 ENABLE_SUBDEVICE:0 ENABLE_ENGINEER_TO_NORMAL:0 OPERATING_SYSTEM:2 ENABLE_SYS_RPC:0 TY_SECURITY_CHIP:0 RELIABLE_TRANSFER:RELIABLE_TRANSFER ENABLE_LAN_ENCRYPTION:1 ENABLE_LAN_LINKAGE:0 ENABLE_LAN_LINKAGE_MASTER:0 >
    
    [01-01 18:12:15 TUYA Debug][tuya_device.c:20] rtl8720cf_tls_common_iot_config:2.1.6
    [01-01 18:12:15 TUYA Notice][simple_flash.c:430] key_addr: 0x1d8000   block_sz 4096
    [01-01 18:12:15 TUYA Notice][simple_flash.c:498] get key:
    0x52 0x32 0x7c 0x62 0xcc 0x45 0x99 0xbc 0x1f 0x80 0x21 0xa7 0xfa 0x6 0xbe 0x6c 
    [01-01 18:12:15 TUYA Notice][tuya_main.c:447] have actived over 15 min, not enter mf_init
    [01-01 18:12:15 TUYA Notice][tuya_uart_common_api.c:118] ty_uart_common_main_components_version:1.0.5,memrory left:67400...
    [01-01 18:12:15 TUYA Notice][uart_common.c:238] pConfig = {low_sw:close,wifi_bdrate:115200,wifi_cofig_ver:1.0.0,crc:13,}---config len:62
    [01-01 18:12:15 TUYA Notice][flash_config.c:192] ty_uart_public_iot_table_read_component_version:1.0.0
    [01-01 18:12:15 TUYA Notice][flash_config.c:160] key:wifi_cofig_ver,value:1.0.0,len:5
    [01-01 18:12:15 TUYA Notice][flash_config.c:157] key:wifi_bdrate,value:115200,len:3
    [01-01 18:12:15 TUYA Notice][flash_config.c:167] key:low_sw,value:0,len:1
    [01-01 18:12:15 TUYA Err][flash_config.c:129] json key 'flow_sw' not exist!
    [01-01 18:12:15 TUYA Err][flash_config.c:129] json key 'ir_sw' not exist!
    [01-01 18:12:15 TUYA Err][flash_config.c:129] json key 'ir_tx' not exist!
    [01-01 18:12:15 TUYA Err][flash_config.c:129] json key 'ir_rx' not exist!
    [01-01 18:12:15 TUYA Notice][uart_common.c:122] get_config_flow_sw err.
    [01-01 18:12:15 TUYA Notice][uart_common.c:138] get_config_ir_sw err.
    [01-01 18:12:15 TUYA Notice][uart_common.c:170] uart badrate:115200
    [01-01 18:12:16 TUYA Notice][uart_common.c:171] flow_open:0
    [01-01 18:12:16 TUYA Notice][uart_common.c:172] lowpower_open:0
    [01-01 18:12:16 TUYA Notice][uart_common.c:173] ir_open:0
    [01-01 18:12:16 TUYA Notice][uart_common.c:174] ir_tx:2
    [01-01 18:12:16 TUYA Notice][uart_common.c:175] ir_rx:3
    [01-01 18:12:16 TUYA Notice][tuya_uart.c:134] 0   115200
    
     Create Task ty_uart_task, stack 0x1002f128, len 4096
    [01-01 18:12:16 TUYA Notice][uart_common.c:748] uart_task_init ok
    [01-01 18:12:16 TUYA Notice][weather_sever.c:348] ty_uart_public_weather_component_version:1.0.0
    [01-01 18:12:16 TUYA Notice][tuya_download_file.c:630] ty_uart_public_file_download_component_version:1.0.0
    [01-01 18:12:16 TUYA Notice][tuya_download_file.c:662] file_download_init OK
    [01-01 18:12:16 TUYA Notice][tuya_uart_common_api.c:186]  tuya_uart_common_init ok,memrory left:60624...
    [01-01 18:12:16 TUYA Notice][process_server.c:110] send jump_pack
    [01-01 18:12:18 TUYA Notice][uart_common.c:631] heart timer out clear all
    [01-01 18:12:19 TUYA Notice][process_server.c:110] send jump_pack
    [01-01 18:12:21 TUYA Notice][uart_common.c:631] heart timer out clear all
    [01-01 18:12:22 TUYA Notice][process_server.c:110] send jump_pack
    [01-01 18:12:24 TUYA Notice][uart_common.c:631] heart timer out clear all
    [01-01 18:12:25 TUYA Notice][process_server.c:110] send jump_pack
    [01-01 18:12:27 TUYA Notice][uart_common.c:631] heart timer out clear all
    [01-01 18:12:28 TUYA Notice][process_server.c:110] send jump_pack
    [01-01 18:12:30 TUYA Notice][uart_common.c:631] heart timer out clear all
    [01-01 18:12:31 TUYA Notice][process_server.c:110] send jump_pack
    

    Works on WBR2 as well:
    WBR2 electronic module connected to wires. Breadboard with connected wires and modules on a wooden background.
    I need to make some testing setup...

    Added after 31 [seconds]:

    @DeDaMrAz please post all error reports heer
    Helpful post? Buy me a coffee.
  • Helpful post
    #70 21361628
    DeDaMrAz
    Level 19  
    My focus now is on RTL (new toy syndrome) so I am testing whatever comes to mind.

    Not working so far:
    - static IP is not working
    - PWM is working (in slider range of 20-25% to 100%) but if set on any pin and module rebooted will freeze the module
    - MQTT is not connecting
    - DS18B20

    Working so far:
    - safemode and initial AP
    - basic IO (relay, led, WiFi led...)
    - DHT reading (about 80% of the time)

    I'll continue to report what I find and post more logs but also if you'd like me to test anything specific let me know, I'll do my best to test it asap.

    Added after 3 [hours] 3 [minutes]:

    BTW - RTL8710B module on LCSC - https://www.lcsc.com/product-detail/WiFi-Modules_Ai-Thinker-BW12-16Mb_C2764064.html
  • #71 21361814
    insmod
    Level 22  
    >>21361443 Default platform name is rtl8710c, rtl8720c is just 8710 with bluetooth.
    I will use newer sdk, mainly because it contains both ameba1 and amebaz code.
    >>21361628 Static ip is not implemented in esp, tr6260 and rtl.
    Fixed pwm
    Realtek for some reason cut mqtt authorization out from lwip. Why? I don't know. Fixed that too.
    Don't know for ds18b20, my module didn't go past checking it's family on tr6260, i assume it will be the same on rtl.
  • #72 21361866
    p.kaczmarek2
    Moderator Smart Home
    insmod wrote:

    Realtek for some reason cut mqtt authorization out from lwip. Why? I don't know. Fixed that too.

    So that part which appends password, username, etc to the send buffer according to flags was missing from mqtt.c?
    I remember this. I had the same problem in BK7231T and BK7231N SDKs. See this commit made on Apr 8, 2022:
    https://github.com/openshwprojects/OpenBK7231...mmit/172f1012c3a03b73441abc24a9f8ddd11e2923f1

    Added after 44 [seconds]:

    https://github.com/openshwprojects/OpenBK7231...mmit/3501a153589219e463ce2a2b55805a4b4aa6be6c
    Helpful post? Buy me a coffee.
  • #74 21361919
    DeDaMrAz
    Level 19  
    insmod wrote:
    Fixed pwm
    Realtek for some reason cut mqtt authorization out from lwip. Why? I don't know. Fixed that too.


    Screenshot of MQTT interface showing device info, controls, diagnostics, and logbook.

    PWM + reboot is fixed, confirmed, I'll test more during the day. I need to flash another module and place in into the dev board for ease of access.
  • ADVERTISEMENT
  • #75 21362008
    p.kaczmarek2
    Moderator Smart Home
    Regarding this strange flash procedure of RTLs - maybe we could still somehow automate that?
    I've used one certain chip in the past, check out this story, but for now you will have to use Google Translate:
    https://www.elektroda.pl/rtvforum/topic3823834.html#19561184
    I still may have MCP2221 or MCP2221A somewhere...
    Or maybe even more classic USB to UART converter could work, how many lines do we need, three? 2 pins to held high and RESET?
    Helpful post? Buy me a coffee.
  • #76 21362507
    DeDaMrAz
    Level 19  
    @insmod

    Do you need something else tested specifically? PWM is 100% perfect, I scope tested it.

    What did you say what energy measurement IC you would like to test? Also log port change would be useful for other tests as well.

    @p.kaczmarek2

    I am creating 3D models for BL602 and WBR modules for flashing, I'll share them here this is the 1st prototype just to get measurements right

    Close-up of a prototype device with test pins connected to a PCB.
  • #77 21363104
    insmod
    Level 22  
    >>21362507 TuyaMCU, BL0937 and BL0942 (uart).
    i don't know if log can be redirected to other uart ports, i only know how to disable it.
    If any of those are working, then it is ready to merge.
  • #78 21363137
    p.kaczmarek2
    Moderator Smart Home
    BL0937 is using on pin change interrupt. It can be tested with a simple signal generator. Maybe we could also make more generic "Counter" GPIO that uses interrupt on change pin and separate it to HAL code, this would also make testing easier.

    @DeDaMrAz BL0942 is using UART, it can be easily tested by sending BL0942 packet like:
    
    BL0942 packet: 55 82 EB 00 78 4D 35 00 00 00 28 8C 00 00 00 00 00 00 00 00 00 00 37
    Voltage = 230.00, Current = 0.240, Power = 60.00
    
    Helpful post? Buy me a coffee.
  • #80 21363677
    p.kaczmarek2
    Moderator Smart Home
    Are RTLs joining back after router restart?
    Screenshot of OpenRTL device interface with configuration menu and ping response. Pop-up window asking to reboot the router. Screen showing ping command results with connection failures and network errors. Screen showing network error messages like General failure and Destination host unreachable.
    It didn't join after router reboot, and I'm waiting like 5 minutes already.
    Helpful post? Buy me a coffee.
  • #81 21363679
    DeDaMrAz
    Level 19  
    Same problem as above, looks like the module is not disconnecting at all, I'll post a log in a minute.


    Info:MAIN:Time 143, idle 0/s, free 93224, MQTT 0(9), bWifi 1, secondsWithNoPing 1, socks 2/21
    Info:MAIN:Time 144, idle 0/s, free 93392, MQTT 0(9), bWifi 1, secondsWithNoPing 1, socks 2/21
    Info:MAIN:Time 145, idle 0/s, free 93392, MQTT 0(9), bWifi 1, secondsWithNoPing 1, socks 2/21
    Info:MAIN:Time 146, idle 0/s, free 93392, MQTT 0(9), bWifi 1, secondsWithNoPing 1, socks 2/21
    Info:MAIN:Time 147, idle 0/s, free 93392, MQTT 0(9), bWifi 1, secondsWithNoPing 1, socks 2/21
    
    [Driver]: sta recv deauth reason code(3) sta:70:3a:cb:78:88:e0
    HAL_DisconnectFromWifiInfo:MAIN:Time 148, idle 0/s, free 97560, MQTT 0(9), bWifi 1, secondsWithNoPing 2, socks 2/21
    Info:MAIN:Time 149, idle 0/s, free 97832, MQTT 0(9), bWifi 1, secondsWithNoPing 3, socks 2/21
    Info:MAIN:Time 150, idle 0/s, free 97960, MQTT 0(9), bWifi 1, secondsWithNoPing 4, socks 2/21
    Info:MAIN:Time 151, idle 0/s, free 97960, MQTT 0(9), bWifi 1, secondsWithNoPing 5, socks 2/21
    Info:MAIN:Time 152, idle 0/s, free 97896, MQTT 0(9), bWifi 1, secondsWithNoPing 6, socks 2/21


    and when WiFi get back online

    Info:MAIN:Time 202, idle 0/s, free 96296, MQTT 0(12), bWifi 1, secondsWithNoPing 56, socks 2/21
    Info:MAIN:Time 203, idle 0/s, free 96296, MQTT 0(12), bWifi 1, secondsWithNoPing 57, socks 2/21
    Info:MAIN:Time 204, idle 0/s, free 96232, MQTT 0(12), bWifi 1, secondsWithNoPing 58, socks 2/21
    Info:MAIN:Time 205, idle 0/s, free 96232, MQTT 0(12), bWifi 1, secondsWithNoPing 59, socks 2/21
    Info:MAIN:Time 206, idle 0/s, free 96168, MQTT 0(12), bWifi 1, secondsWithNoPing 60, socks 2/21
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 207, idle 0/s, free 96168, MQTT 0(13), bWifi 1, secondsWithNoPing 61, socks 2/21
    [cmd_threa] _freertos_spinlock(->1001684c) failed, retry
    Info:MAIN:Time 208, idle 0/s, free 96104, MQTT 0(13), bWifi 1, secondsWithNoPing 62, socks 2/21
    Info:MAIN:Time 209, idle 0/s, free 96104, MQTT 0(13), bWifi 1, secondsWithNoPing 63, socks 2/21
    Info:MAIN:Time 210, idle 0/s, free 96040, MQTT 0(13), bWifi 1, secondsWithNoPing 64, socks 2/21
    Info:MAIN:Time 211, idle 0/s, free 96040, MQTT 0(13), bWifi 1, secondsWithNoPing 65, socks 2/21
  • #82 21363681
    p.kaczmarek2
    Moderator Smart Home
    UART receive works on:
    
    Built on Dec 23 2024 12:47:31 version 1468_merge_e0ca1307a1f0
    Online for 5 minutes and 31 seconds
    Device MAC: 7C:F6:66:22:C1:F4
    Short name: rtl87x0C6622C1F4, Chipset RTL87X0C
    

    Screenshot of OpenRTL87X0_6622C1F4 web interface showing energy data.
    Test code on PC:
    Code: text
    Log in, to see the code

    Yellow wire is PC TX to Realtek RX:
    Electronic module with soldered wires on a wooden table.

    Added after 2 [minutes]:

    Realtek sending to PC also works:

    Screenshot of RealTerm serial communication program.
    That 58AA is sent by BL0942 driver, as implemented here:

    Screenshot showing a code snippet in programming language related to UART for the BL0942 driver.

    Added after 1 [minutes]:

    @DeDaMrAz HAL_DisconnectFromWifiInfo didn't set WiFi to 0 ?
    Helpful post? Buy me a coffee.
  • #83 21363692
    DeDaMrAz
    Level 19  
    p.kaczmarek2 wrote:
    HAL_DisconnectFromWifiInfo didn't set WiFi to 0 ?


    Not that I've noticed, but had to disconnect everything as I am having severe issues with my WiFi, will continue tomorrow and over the weekend.
  • #84 21363693
    p.kaczmarek2
    Moderator Smart Home
    I also did very hacky BL0937 test just to see if interrupt on change is working - I've set CF/CF1 role to pin and spammed it with UART packets. I know it's not UART, but just to make some changes... and it reacts:
    Screenshot of OpenRTL87X0C system test displaying measurement data and system status.
    so the gpio interrupt must be firing, at least more or less correctly.
    Helpful post? Buy me a coffee.
  • #85 21363772
    insmod
    Level 22  
    Fixed disconnecting.
    Tried to implement adc. Looked at the sdk code - amebaz2 completely lacks adc support. First wifi chip i've seen without it.
  • #86 21364096
    divadiow
    Level 34  
    just playing with that WBR3 dump

    I see the Tuya config is available from 1D8000

    Screenshot of a hex data snippet.

    and when extracted and run through EF you get the keys. Annoyingly I did that before running the whole file through which has the same result 🙄.

    Code: Text
    Log in, to see the code


    With the link to BK7231T being because the module starts with a W https://github.com/openshwprojects/BK7231GUIF...2e661a58ddb0/BK7231Flasher/TuyaModules.cs#L20

    Screenshot of BK7231 Easy UART Flasher software displaying warnings at the bottom.

    on another note, may I propose this colour change
    Screenshot with an error message in the Tuya configuration extraction tool. Screenshot showing warning messages related to Tuya data decryption.
    https://github.com/openshwprojects/BK7231GUIFlashTool/pull/46
  • #87 21364135
    insmod
    Level 22  
    >>21364096
    I got this from a T102_v1.1 backup (bl0937 plug)
    {
       "Kp":"13298",
       "Kv":"571",
       "Ki":"24333",
       "Ke":"1560"
    }
    

    Tuya config extractor - magic is at 2011136 
    Saving debug Tuya decryption data to lastRawDecryptedStrings.bin
    Tuya keys extraction has found 4 keys

    And this from T3-3S
    Tuya config extractor - magic is at 3997696 
    WARNING - strange nextblock header 9BB094AC
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 9E88251C
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 703DA9F9
    WARNING - bad nextblock CRC
    WARNING - strange nextblock header 60276DA0
    WARNING - bad nextblock CRC
    Saving debug Tuya decryption data to lastRawDecryptedStrings.bin
    Failed to extract Tuya keys - no json start found
    
  • Helpful post
    #88 21364160
    p.kaczmarek2
    Moderator Smart Home
    If they have the same storage block, then we can also add the extraction to the Web App:
    Screenshot of a web application page for managing device memory, showing the Flash section with a table of options for reading, downloading, and writing configurations.
    https://github.com/OpenBekenIOT/webapp/blob/gh-pages/vue/flash.vue
    probably add conditional to change offset here:
    Code: Javascript
    Log in, to see the code

    use info from here:
    Code: Javascript
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • #89 21364270
    divadiow
    Level 34  
    another BL0937 but 'real' - as real as my dodgy module-less smart plug can be

    User interface screen of a device monitoring power data.

    Code: Text
    Log in, to see the code


    Electronic board with wires connected to a smart plug
  • #90 21364357
    p.kaczmarek2
    Moderator Smart Home
    I'm looking into adding download for it. For now, I've added custom download to the web App:
    Screenshot of a web application for managing device flash configuration.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the compatibility of RTL8720DN, RTL8710B, and RTL8710BX with OpenBeken firmware. Users share their experiences with various modules, including BW15 and WBR3, and discuss issues related to memory management, Wi-Fi connectivity, and flashing procedures. Several users report successful flashing and functionality tests, while others encounter problems with memory leaks and device reboots. The conversation also touches on the use of different tools for flashing, such as ltchiptool and rtltool, and the need for proper firmware versions to ensure compatibility. Additionally, there are mentions of specific features like MQTT support, GPIO control, and OTA updates.
Summary generated by the language model.
ADVERTISEMENT