logo elektroda
logo elektroda
X
logo elektroda

RTL8720DN, RTL8710B, RTL8710BX Compatibility with OpenBeken?

divadiow 11211 278
ADVERTISEMENT
  • #241 21449650
    divadiow
    Level 34  
    Screenshot showing network device information.
    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • #242 21449662
    insmod
    Level 24  
    >>21449650 Default one then. I have the same one on WRG1 module with damaged system partition, and on ameba1 it is read from flash, not efuse.
  • #243 21449666
    divadiow
    Level 34  
    yep, sure. makes sense. I see whisperings of such on various boards googling that mac. I see mac is OK in previous screenshots from other testing on WBRG1, so not an actual problem.

    Added after 4 [minutes]:

    I can pull PA12/13/14 high and low to control onboard BRG SMD LED. I think on this variant it's:
    Code: Text
    Log in, to see the code


    Added after 42 [minutes]:

    SHT30 i2c detected
    Code: Text
    Log in, to see the code

    CHT8310
    Code: Text
    Log in, to see the code

    Screenshot of OpenRTL8720D interface displaying temperature, humidity, and network configuration information.

    Added after 9 [minutes]:

    Information about DHT22 sensor with temperature 24.90°C and humidity 50.0%.

    Information from DHT11 sensor: temperature 24.6°C, humidity 56%.
  • #244 21449836
    insmod
    Level 24  
    Just tested uart with uarttcp driver and hardware flow control.
    It works even without reflashing ZS3L, but it is still recommended - its firmware is quite old: EZSP v7 6.5.5.0 build 432
  • #245 21449954
    p.kaczmarek2
    Moderator Smart Home
    Can you provide more information on how you interface ZS3L? Is it done via HA? So you can interface Zigbee devices?

    Btw, my DHT22s arrived:
    Four DHT22 sensors with cables on a wooden surface
    Helpful post? Buy me a coffee.
  • #246 21449962
    insmod
    Level 24  
    >>21449954 Copied from github: Bridge is enabled via command: "startdriver uarttcp 115200 512 2 1", where 115200 - baud rate (you can build 230400/460800 firmware and change it), 512 - buffer, 2 is configured TX led channel and 1 is hw flow control (0 disabled, 1 enabled).

    Now, standard port for bridge is 8888.
    For tests, i use zigbee2mqtt. Since default firmware is old, ezsp instead of ember should be used
    serial:
      adapter: ember
      baudrate: 115200
      port: tcp://192.168.1.13:8888
    

    Instead of zigbee2mqtt, zha could be used. And it is what i use for my wrg1+tyzs3 gateway.
    Plus i already updated zs3l to 7.4.3 firmware, all while using the bridge.
    universal-silabs-flasher --device socket://192.168.1.13:8888 flash --firmware G01-pro-ncp-uart-hw.gbl

    And while i had interrupted flashing process and got error after flashing it again (universal_silabs_flasher.gecko_bootloader.NoFirmwareError: No firmware exists on the device), it still updated fine.
  • ADVERTISEMENT
  • #247 21450005
    p.kaczmarek2
    Moderator Smart Home
    So you're saying that this ZS3L is supported by Zigbee2MQTT out of the box? I didn't know that. So RTL just works as TCP to UART converter, and if I were to remove RTL entirely, and connect ZS3L to USB to UART converter, it would still work? Interesting.
    https://www.zigbee2mqtt.io/guide/adapters/emberznet.html
    Helpful post? Buy me a coffee.
  • Helpful post
    #248 21450042
    insmod
    Level 24  
    >>21450005 If RTL is removed, you would need an adapter with RTS/CTS, so that is at least 6 wires (or 4 if powered via usb). And on most common ch340 adapters they aren't available. So you would still need to somehow (swd? another adapter?) flash it to firmware with software flow control.

    Added after 2 [hours] 55 [minutes]:

    Latest ZS3L firmware is here: https://github.com/NonPIayerCharacter/silabs-firmware-builder/actions/runs/13463024739
    Zigbee version is 8.0.2.0 build 397
    OpenThread firmware is also available (but who would use it?).
    Updated bootloader is also here (original version is 1.9.2, updated is 2.5.2), but since i don't know if original bootloader uses hw flow control - i didn't test it (updated is without flow control).
  • Helpful post
    #249 21452574
    insmod
    Level 24  
    New version, i believe i will soon open a pull request.
    Several new features: wifi scanning (all realtek), mac address change (AmebaD only), connecting to WPA3 networks.
    Mac is written in easyflash, not in efuse. To reset it to original easyflash 'partition' has to be wiped.
    Need to test scanning on Z/Z2, because instead of AP mode it now starts in STA_AP mode. When i started implementing scan, ap showed up and i connected to it, but i couldn't get ip, and uart log showed dhcp assigning every ~10 seconds. And while i fixed it on D, i don't know if it's not broken on Z/Z2 (but it shouldn't).

    @divadiow my bw16 is with proper mac address, begins with 94:C9:60 (Zhongshan B&T technology.co.,ltd). Is BW16E somehow special, or oem only?

    Another sad thing is WBRG1 doesn't have a 5G antenna. I can see 5G networks on BW16, but not on WBRG1.
    And it seems i can't perform OTA on my BW16. Flash is so slow, that i get ERR_CONNECTION_RESET before it is erased (~20 sec).
  • #250 21452594
    divadiow
    Level 34  
    Great work! Impressive stuff. I'll have a play as soon as I can. So much to test/investigate 🤓

    As for the BW16E difference, I don't think I've found any official reference to what's different :/

    Also, is your BW16 slow because of the flash chip you chose to replace on there maybe? What does your BW16 look like btw, I think I've only seen BW16E for sale, but I haven't really looked in earnest.
  • ADVERTISEMENT
  • #251 21452616
    insmod
    Level 24  
    >>21452594
    My BW16 looks like this:
    B&T BW16 WiFi module with certification markings and specifications.
    It can be easily discerned from 16E, since 16 antenna is 'colored'.
    Probably because of slower flash, and i don't remember what chip i used exactly. Only that it was Winbond W25Q32 and bootloader report confirms it (Flash ID:ef, 40, 16)
  • #252 21452640
    divadiow
    Level 34  
    hmm. maybe BW16E is just SparkleIoT's take on the BW16, they do seem to like using names similar to other modules - XH-CB2S, XH-WB3S etc etc

    Added after 1 [minutes]:

    Code: Text
    Log in, to see the code

    https://www.reddit.com/r/Hacking_Tutorials/co...1hgndal/5ghz_wifi_deauther_device_noob_guide/
    I wonder if this is true. Can't say I've noticed anything...

    Added after 59 [minutes]:

    are the DN builds catering for 4Mb chips as default? As in, could all the drivers potentially be enabled without concern for space?

    Added after 4 [minutes]:



    also, probably the longest I've kept a smart plug powered for
    Screenshot showing device information built on January 17, 2025, including MAC address and chipset.
  • #253 21452754
    insmod
    Level 24  
    >>21452640
    4mb default, but it can be easily reconfigured to 2mb/8mb. Probably all drivers can be enabled, and there would still be a lot of free space left.

    And i got several reboots on mine, on rtl8710a gateway too. It is probably related to wifi disconnect/reconnect. I tried to fix it, but only several days passed, that's not enough.

    Added after 8 [minutes]:

    Checked scan on rtl8710a, works as expected.
    There is some error in code, as some ap are printed without ssid. Or perhaps those are hidden networks?
    SSID: , Channel: 2, Signal -58

    I don't see connected network on rtl8710a, but can see it on rtl8720d. Why?
    edit: sometimes i can see it, but at least half the time it is missing from the list.

    Added after 5 [minutes]:

    @p.kaczmarek2 Is there a way to mark a channel as internal? Meaning it wouldn't show on main page or HA discovery.
    I would like to hide the zigbee led, since it isn't meant to be manually controlled.
  • #254 21452827
    p.kaczmarek2
    Moderator Smart Home
    There are two commands for that:
    Table of channel settings with highlighted Channel words.
    I'll try to check latest on RTL soon
    Helpful post? Buy me a coffee.
  • #256 21452893
    p.kaczmarek2
    Moderator Smart Home
    
    Built on Feb 23 2025 13:45:12 version _amebad_66090d778957
    Online for 1 minutes and 46 seconds
    Device MAC: 38:A5:C9:45:FB:C6
    Short name: rtl8720dC945FBC6, Chipset RTL8720D
    

    Screenshot of a network interface showing a list of available Wi-Fi networks with options to scan and convert Wi-Fi.
    NTP driver ok, can you enable SSDP? It requires this IGMP flag in Lwip, do you know which?
    https://github.com/openshwprojects/OpenBK7231...mmit/b0f232db5f17b3ac558580767a677f2a2ee6d488

    Added after 10 [minutes]:

    I have this module - RTL8710AF:
    Electronic module held in hand against a breadboard with components in the background.
    Helpful post? Buy me a coffee.
  • #257 21452931
    insmod
    Level 24  
    >>21452827 Thanks for reminding me, i forgot about those.
    >>21452893 IGMP is enabled by default on all realteks as far as i remember, by LWIP_IGMP flag. https://github.com/Ameba-AIoT/ameba-rtos-d/bl...2.0.2/port/realtek/freertos/ethernetif.c#L134
    RTL8710AF is no good, no xip means everything is loaded into ram. And there is only 512kb. I initially tried to compile for it - something overflowed by about 200kb. So only RTL8195 and RTL8711AM is supported.

    Added after 6 [minutes]:

    Updated
  • #258 21452945
    p.kaczmarek2
    Moderator Smart Home
    By the way, regarding those "private" stuff, I've been recently doing little help for one user with PIR sensor device that is controlled by PWM, and I introduced a PWM_scriptOnly pin. This is just a PWM but without default channel/gui interactions.

    Now I am thinking, maybe I could also just add a, I don't know, "Rel_scriptOnly" or "Output_scriptOnly" pin? That would do basically the same as Rel with private flags set...

    insmod wrote:
    , no xip means everything is loaded into ram

    Strange, I'm sure I asked you about it before, but I couldn't find anything under RTL8710AF, maybe we didn't use that name or I searched incorrectly, my fault.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #259 21452955
    insmod
    Level 24  
    >>21452945 Maybe not a scriptonly, but something like an additional checkbox in cfg_pins?
    And do something like that when something inverted is needed?

    PA00 | (Role select) | (channel) | (checkbox for inverted) | (checkbox for hidden)

    SSDP works for me on D.
  • #260 21453144
    p.kaczmarek2
    Moderator Smart Home
    That is not a bad idea, but we already have _n roles so it's a bit late to introduce another option to do it. Still, maybe I could reuse the concept and script the SetChannelVisible and SetChannelPrivate into checkboxes on the Web App, it would come with a very little flash memory usage, just for API.

    https://github.com/NonPIayerCharacter/OpenBK7...mmit/27e99030656a5b4a1db78bbdf0c809f4ec68ac18
    I see, SSDP could be even enabled by default, but I'm always worried about bricking stuff. I still remember this report saying that PowerSave made device unable to boot, but we've never managed to replicate it in any way... it was on Beken long time ago.

    By the way, who put the OBK_OTA_EXTENSION in obk_config.h? It should be in common.h. obk_config.h is supposed to be user-adjustable settings only.
    Helpful post? Buy me a coffee.
  • #263 21458143
    insmod
    Level 24  
    >>21457886 This flag sets up pins from 0 to 29 as input, so probably there are some pins that shouldn't be configured (like qspi on ln882h). On Z2 it works because there are probably checks in sdk to forbid this sort of behaviour.
    And i remembered that there are some pins that can be configured as output, but not as input (don't remember if it is on B or A).
    It probably would have crashed on LN before recent patch to forbid using qspi pins.

    @p.kaczmarek2
    Another flag needs fixing, instead of hardcoded 29 pins it should use PLATFORM_GPIO_MAX.

    Added after 4 [hours] 43 [minutes]:

    Pull request is now open.
    Additional changes:
    OTA now erases next sector before writing, this solved problem of too long erase that stopped ota from working on my BW16.
    Added pwm for D, available pins are here: https://github.com/Ameba-AIoT/ameba-rtos-d/bl...on/mbed/targets/hal/rtl8721d/pwmout_api.c#L46
    Added 50ms delay before Main_Init on all realteks to ensure wifi is configured.

    p.s. BW16, when connecting to my server with MT7925 card in 5ghz AP mode, crashes driver so 'hard', that i cannot sigkill hostapd and properly reboot, forcing me to cut power.
  • #264 21458671
    divadiow
    Level 34  
    cool. should PA14 be in the list though?

    divadiow wrote:
    I can pull PA12/13/14 high and low to control onboard BRG SMD LED. I think on this variant it's:
    Code: Text Expand Select all Copy to clipboardLED_R PA13
    LED_B PA12
    LED_G PA14


    wrong (for NiceMCU_8720_V1),
    red P12
    green P13
    blue P14

    set all 3 to AlwaysHigh and they're all off. Pull each low in turn in GPIO dr and they light as per above colours to pin. PWM obviously not an option in main GUI for PA14. Testing on BW16E

    Added after 1 [minutes]:

    but I get that PWM is not ticked in the function table for PA14, so not sure what this means
    Excerpt from a table showing GPIO ports with pins, SPI functions, and LED colors.

    Added after 6 [minutes]:

    it's not a PWM LED? lol. just low/high
  • #266 21459140
    divadiow
    Level 34  
    BW16E. FW1 (1550_merge_c48db1d6b583) -> FW2 (1550_merge_676c300d9223) ✅

    Code: Text
    Log in, to see the code


    FW2 (1550_merge_676c300d9223) -> FW1 (1550_merge_c48db1d6b583) ✅
    Code: Text
    Log in, to see the code
  • #267 21459456
    p.kaczmarek2
    Moderator Smart Home
    Right in time, I think I will merge it right away. I've checked the code and looks good. I want to have it on the main tree so I can also run my per platform self tests on this platform.
    Helpful post? Buy me a coffee.
  • #268 21459567
    divadiow
    Level 34  
    probably a rubbish test and maybe you've already tried BL0937 properly to satisfaction, but here's BL0937 using Arduino/ESP/PWM sketch on ESP32-WROOM-32 to simulate CF, CF1 and SEL
    Screenshot of the OpenRTL8720D interface with energy and status data.
  • #269 21460867
    p.kaczmarek2
    Moderator Smart Home
    This is a good idea for testing BL0937 without a physical BL0937 device.

    By the way, couldn't we move interrupt on change counter to HAL and introduce new pin role - Counter? I was something similar in Tasmota.
    Helpful post? Buy me a coffee.
  • #270 21469343
    divadiow
    Level 34  
    for no reason I added a 2mb Ai-Thinker B&T BW14 RTL8710BX module to an order of things from China
    Small green printed circuit board with electronic markings.

    Code: Text
    Log in, to see the code


    Ai-Thinker_B&T_BW14_v2.4.3(v4.0c).bin in flashdumps.

    Screenshot of Ameba 1-N MP ImageTool v2.5.27 software during configuration and USB serial port selection. Screenshot of the OpenRTL8710B_60055044 software interface displaying system information.

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