logo elektroda
logo elektroda
X
logo elektroda

RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?

divadiow 12765 337
ADVERTISEMENT
  • #331 21608464
    DeDaMrAz
    Level 20  
    @divadiow

    I've noticed NTP sync is pending on your device and I've seen it somewhere else doing the same, does it eventually sync or not? If not workaround I found was to add a 5-10 second delay before NTP driver start.

    @p.kaczmarek2 and @insmod

    Just a ping on NTP driver not starting on some devices, sorry not sure which but I'll check.

    It is on W600 with FW 1.18.131 will test after OTA to new version

    RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?

    OTA on 1.18.135 done, without delay on startDriver NTP

    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg


    but after about 60 seconds it gets the NTP

    Info:NTP:Seconds since Jan 1 1900 = 3961663620
    Info:NTP:Unix time  : 1752674820
    Info:NTP:Local Time: 2025-07-16 14:07:00
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #333 21609866
    divadiow
    Level 34  
    [postid:965d656204][/postid:965d656204]
    amebair_ec35fc691074
    PA7 receive - not pushing any remote buttons. log is by itself
    Code: Text
    Log in, to see the code


    NEC signals received OK on BK-N

    RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?
  • ADVERTISEMENT
  • #334 21611926
    insmod
    Level 25  
    Opened pull req EF for flasher
    https://github.com/openshwprojects/BK7231GUIFlashTool/pull/59
    Not working. Reading ends up with CRC error. Writing - CRC error on device.
    Main problem is CFG offsets - pinsState_t should be 2 times the size on RTL8720D (64 pins instead of 32).
    Move to unsafe cfg, like i've done earlier in EF demo?

    Added Floaders (AmebaD, AmebaD_New, AmebaDplus, AmebaLite, AmebaZ, AmebaZ2) in base64 format.
    Default AmebaD floader works. New one from ameba-rtos doesn't work. It gets flash id successfully, but doesn't read anything (command api changed?)
  • #335 21612039
    p.kaczmarek2
    Moderator Smart Home
    Nice, but quick question - does it break compatibility?

    I am hoping to find enough time to add LN882H flashing tomorrow or later upcoming week, so I want to have your changes merged, but I don't want them to break existing config of OBK at the moment.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #336 21612047
    insmod
    Level 25  
    [postid:d469f422f4][/postid:d469f422f4]
    It shouldn't. I changed almost nothing in what was already there.
    Only OBKFlashLayout.getConfigLocation started returning sector count as an out variable.
    Everything else was either in RTLFlasher or behind RTL8720DN check.

    I'm not sure if writing config in tandem with firmware would work, since erase is not done for config specifically.

    Different? amebad flashloader sources: https://github.com/particle-iot/realtek_ambd_...ject_lp/asdk/flashloader/rtl_flash_download.c
    Potential newer chips tool? https://github.com/Ameba-AIoT/ameba-rtos/blob..._tools/scripts/flash/base/download_handler.py

    Added after 4 [hours] 1 [minutes]:

    BW20 stock boot log
    
     .----------------.  .----------------.  .----------------.  .----------------.   .----------------.  .----------------.  .----------------. 
    | .--------------. || .--------------. || .--------------. || .--------------. | | .--------------. || .--------------. || .--------------. |
    | |      __      | || |     _____    | || |     _____    | || |     ____     | | | |    _______   | || |  ________    | || |  ___  ____   | |
    | |     /  \     | || |    |_   _|   | || |    |_   _|   | || |   .'    `.   | | | |   /  ___  |  | || | |_   ___ `.  | || | |_  ||_  _|  | |
    | |    / /\ \    | || |      | |     | || |      | |     | || |  /  .--.  \  | | | |  |  (__ \_|  | || |   | |   `. \ | || |   | |_/ /    | |
    | |   / ____ \   | || |      | |     | || |      | |     | || |  | |    | |  | | | |   '.___`-.   | || |   | |    | | | || |   |  __'.    | |
    | | _/ /    \ \_ | || |     _| |_    | || |     _| |_    | || |  \  `--'  /  | | | |  |`\____) |  | || |  _| |___.' / | || |  _| |  \ \_  | |
    | ||____|  |____|| || |    |_____|   | || |    |_____|   | || |   `.____.'   | | | |  |_______.'  | || | |________.'  | || | |____||____| | |
    | |              | || |              | || |              | || |              | | | |              | || |              | || |              | |
    | '--------------' || '--------------' || '--------------' || '--------------' | | '--------------' || '--------------' || '--------------' |
     '----------------'  '----------------'  '----------------'  '----------------'   '----------------'  '----------------'  '----------------' 
    
    I | [0] [aiio_main] (main.c:48 aiio_main) Combo AT!
    I | [1] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:303k
    I | [3] [aiio_main] (aiio_nvs.c:26 aiio_nvs_init) File System Init success
    [SERIAL-I] uart idx: 1
    I | [102] [aiio_main] (aiio_wifi.c:78 aiio_wifi_init) aiio_wifi_init
    interface 0 is initialized
    interface 1 is initialized
    [WLAN-A] Init WIFI
    [WLAN-A] Band=2.4G&5G
    [WLAN-A] consume heap 19912 Bytes
    [WLAN-I] _init_thread(58), Available heap 286976
    I | [143] [aiio_main] (aiio_wifi.c:92 aiio_wifi_init) wifi init ok
    I | [143] [aiio_main] (aiio_at_wifi_api.c:1224 cb_wifi_event) <<<<<<<<<  WIFI INIT OK <<<<<<<<<<
    E | [144] [aiio_main] (aiio_wifi.c:1010 aiio_wifi_set_country_code) WAIT_TOD func wait to define
    
    ################################################
    
    arch:RTL8711D,NULL
    company:Ai-Thinker|B&T
    Acuqire BT PMU LOCK 
    Bluetooth init BT_ADDR in cfgbuf [94:c9:60:f4:73:9c]
    hci_phy_efuse[PEFUSE(0x741)] = 0x88
    Set baudrate to 3000000 success!
    Signature check success: Merge patch v2
    FW Version: 20240820135258
    FW Length: 12084
    Start upper stack
    Release BT PMU LOCK 
    BD_ADDR: 94:C9:60:F4:73:9C(public)
    aiio_ble_init success
    ble_mac:94c960f4739c
    wifi_mac:94c960f47399
    sdk_version:release_bl_iot_sdk_1.6.40
    firmware_version:release/V4.18_P1.0.9
    compile_time:Nov  4 2024 15:59:05
    
    ready
    
    ################################################
    W | [425] [aiio_main] (aiio_at_wifi_api.c:1211 aiio_wifi_auto_connect_onboot) [aiio_wifi_auto_connect_onboot()-1211]wifi auto connect off
    
    [WLAN-A] IPS in
    I | [5001] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:272k
    I | [10001] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:272k
    I | [15001] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:272k
    I | [20001] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:272k
    I | [25001] [aiio_heap_check] (aiio_heap_check.c:23 aiio_heap_check) rtos free heap size:272k
    


    Backup, taken with crudely modified tool and tool itself are attached.
    python3 flash.py -p COM16 -d devices/Profiles/AmebaDplus_FreeRTOS_NOR.rdev -i . -b 1500000 -or bw20.bin

    It can probably be used for RTL8720E, just with a different profile (AmebaLite_FreeRTOS_NOR.rdev)
  • #337 21612234
    divadiow
    Level 34  
    Cool. Just in time. BW20-12F-Kit should arrive tomorrow
  • #338 21612236
    insmod
    Level 25  
    Restoring this backup to OBK flashed BW20-kit worked.

Topic summary

The discussion centers on the compatibility and support of Realtek RTL8720DN, RTL8710B, and RTL8710BX chips with the OpenBeken firmware and SDK. The RTL8720CF-based modules (e.g., BW15, WBR3) are confirmed to be supported by the AmebaZ2 family SDK and OpenBeken ports, with functional WiFi, GPIO, flash configuration, OTA, UART, and basic peripherals. However, RTL8710BX and RTL8710B (AmebaZ family) present challenges such as WiFi initialization freezes, memory management issues, and incomplete SDK support, including lack of static IP and WiFi scanning. OTA updates are functional but have occasional reboot issues, especially on RTL8710B. PWM support is mostly stable after fixes, while MQTT required patching due to missing authorization code in the Realtek LWIP stack. Power-saving modes and sensor drivers (DHT11, DS18B20) have been tested with varying success across platforms. Flashing RTL modules requires specific UART converters (e.g., CH340G) and careful wiring; some modules need manual pin pulls and special flashing tools like AmebaZ2 PGTool. TuyaMCU and energy metering ICs (BL0937, BL0942) support is under active development and testing, with UART and GPIO interrupt methods used. Memory partitioning for configuration, LittleFS, and Tuya config extraction is being optimized to avoid overwriting user data. Static IP implementation required workarounds due to sscanf inconsistencies on RTL and related platforms. A UART-to-TCP bridge driver has been developed for some modules. Overall, RTL8720CF modules have good OpenBeken support, RTL8710B is progressing but unstable, and RTL8710BX remains problematic. The community is actively testing, fixing, and improving support for these Realtek chips within OpenBeken and related tools.
Summary generated by the language model.
ADVERTISEMENT