logo elektroda
logo elektroda
X
logo elektroda

[BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

p.kaczmarek2 187227 1282
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #1261 21630205
    divadiow
    Level 36  
    >>21615185

    I see

    Code: Text
    Log in, to see the code


    are one row now in platforms.md. I have a yes for WPA3 on DN, presumably yes for CS too
  • ADVERTISEMENT
  • #1262 21630210
    insmod
    Level 29  
    >>21630205
    ECR6600 supports WPA3?
    Is it with current or with new?

    Does Ameba1/AmebaZ support it?

    LN882H will support WPA3 by default in next release.
  • #1263 21630212
    divadiow
    Level 36  
    I have ticks in spreadsheet from testing a couple of weeks ago,

    Wi-Fi module comparison chart showing WPA3 support

    I don't have any Ameba1 but I'm sure you posted that Ameba1 supports WPA3 if AmebaZ does. Have I imagined that? I can't find the post.




    I reverted Ameba1 to unknown for WPA3
  • #1264 21630316
    p.kaczmarek2
    Moderator Smart Home
    Great progress, btw, it seems BK7231U can be bought on Aliexpress now? AS a single chip... but still. I wonder would it fit to WB3S form?

    Also... is it just me or is WB3S documentation taken down from Tuya?
    Helpful post? Buy me a coffee.
  • #1265 21630334
    insmod
    Level 29  
    >>21630316
    I guess? They are pretty much identical. If you manage to flash unencrypted T bootloader to U via SPI, then you can basically use T firmware.
    Or maybe not. U on ali is QFN40, T is QFN32. You need BK7231(S/U)QN32A.

    All WB-series datasheets are removed.
  • ADVERTISEMENT
  • #1266 21630654
    p.kaczmarek2
    Moderator Smart Home
    There is also a little side project I started recently. I managed to run C# code on each commit and save results to html and publish them to GH pages:
    https://github.com/openshwprojects/FlashDumps
    The idea is to analyze the repository on each commit and create stats of bootloaders, firmwares, etc.
    Ultimately I will probably merge the RBL extraction with easy flasher and just call easy flasher, but current version is here:
    https://github.com/openshwprojects/FlashDumps/tree/main/Analyzer
    So far it just extracts RBLs from beken dumps.
    Here is where output will be saved, not finished, of course - at first i tried just grouping binary streams https://openshwprojects.github.io/FlashDumps/
    Helpful post? Buy me a coffee.
  • #1267 21632836
    p.kaczmarek2
    Moderator Smart Home
    @insmod is this ready to merge?
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1718
    I would like to merge it today, as I am going to move OTA code to HALs and I want to avoid futher merge issues.
    Helpful post? Buy me a coffee.
  • #1268 21632857
    insmod
    Level 29  
    >>21632836
    Not yet. But i'll get it ready today, as my RTL8710ECF board has finally arrived.
  • ADVERTISEMENT
  • #1269 21632863
    p.kaczmarek2
    Moderator Smart Home
    Ok I will wait with OTA clearup, I am planning to mova OTA platform-specific code to HAL and make ota_progress global
    Helpful post? Buy me a coffee.
  • #1270 21634383
    p.kaczmarek2
    Moderator Smart Home
    First version done. I would like to merge it and move to futher improvements.
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1762
    I basically just moved http_rest_post_flash to separate files, I also moved flash read there.

    Questions - @insmod, can you do a basic code review, check if I didn't break anything?
    Maybe we can also test later on some test devices with @divadiow.

    Futher plans:
    - probably will need to change http_rest_post_flash just to OTA function, as in most of the platforms it's used only for OTA, however, on Beken it's also used to write config/RF from web app Flash Section?
    - make "ota_progress" multiplatform
    - lock all driver ticks as soon as OTA starts
    Helpful post? Buy me a coffee.
  • #1271 21634390
    insmod
    Level 29  
    >>21634383
    Looks fine to me.
    Though i think realtek and ecr/tr ota should be split per platform.
    + add move http ota to hals.
    And flash read to hal_generic.
    Then write flash write and erase, and use them for lfs/easyflash.
  • #1272 21635041
    p.kaczmarek2
    Moderator Smart Home
    I've did ecr/tr split.

    @divadiow can you check if it's possible to OTA from this PR to release?
    Helpful post? Buy me a coffee.
  • #1273 21635058
    divadiow
    Level 36  
    ECR6600 - REST

    1.18.145 -> 1762_merge_76656c0aeee1 -> 1.18.154 ✅
  • #1274 21635547
    p.kaczmarek2
    Moderator Smart Home
    BK7238 - ok, RTL8720D - ok, please test futher if you can, i will soon merge it, and if I merge earlier, then just check on main
    Helpful post? Buy me a coffee.
  • #1275 21635556
    divadiow
    Level 36  
    oh yes. sure. I zoomed in on ECR and nothing else for some reason.
  • ADVERTISEMENT
  • #1276 21635567
    p.kaczmarek2
    Moderator Smart Home
    I am making now OTA_Progress guard check public. I will probably also disable driver ticks when OTA is in progress. However, the OTA_Progress is not implement for other OTAs already, so I have to add it as well.
    Helpful post? Buy me a coffee.
  • #1277 21635872
    divadiow
    Level 36  
    I hope to start this eve. Is latest build the one to use or shall I wait for more changes
  • #1278 21635898
    p.kaczmarek2
    Moderator Smart Home
    Latest commit is this:
    https://github.com/openshwprojects/OpenBK7231...mits/ffa9ab6f6140b2aaf16346d6f44de04f3feada73
    This should make OTA_GetProgress different than -1 on OTA start on every platform - at least for web app OTA. This should lock drivers and show this message (albeit without valid size info) on HTTP page:
    C code snippet checking OTA progress using OTA_GetProgress
    This should be good enough for the start, but at this stage, it won't track how many bytes were flashed... we would need to connect this counter per each platform, as we don't have universal "OTA_FLASH"-style API
    Helpful post? Buy me a coffee.
  • #1279 21636006
    divadiow
    Level 36  
    BL602
    1.18.140 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    Screenshot with system info: reboot reason, MQTT state, and OTA update progress

    W800
    1.18.145 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    OTA status in progress. Downloaded: 0 B, Flashed: 000000h

    BK7231U
    1749_merge_d7303c6b5b1d -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    Screen showing OTA status with 0 B downloaded and 033000h flashed




    this kind of test result ?

    Added after 27 [minutes]:

    W600

    patch-1_387f507681ec -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    OTA screen showing software download and flashing progress

    ESP32S3

    1.18.102 -> Aug 15 2025 14:55:52 version ESP32S3_Test (ESPs don't have build variable thing yet) -> 1.18.154 ✅

    Screenshot: OTA In Progress. Downloaded: 0 B Flashed: 000000h message displayed

    BK7231N (old SDK)

    1762_merge_9817f031a022_sensors -> 1.18.154 ✅

    OTA update screen showing: 0 B downloaded, 00E000h flashed

    BK7231N (ALT)

    1.18.154 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    OTA interface with message: Downloaded: 0 B Flashed: 004000h

    Added after 2 [minutes]:

    how granular - platform/variation etc?

    Added after 25 [minutes]:

    ESP8266

    1.18.154 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    no progress
    MQTT State: not configured text above a blue 'Config' button

    LN882H

    1.18.154 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    Screen showing OTA status: 0 B downloaded, 0 B flashed

    XF16/XR872

    1.18.140 -> 1762_merge_9817f031a022 ✅ -> 1.18.154 ❌

    says it's flashing but then doesn't reboot. after manual reset it comes back up as 1762_merge_9817f031a022
    OTA Status: in progress, no data downloaded or flashed yet

    Code: Text
    Log in, to see the code


    Added after 39 [minutes]:

    WAIT. XF16 OTA does work. I've been using the downloaded file from quick list which is UART flash file not OTA, Will find and do PR

    Screenshot of OTA interface for XR872 chipset with 1.18.154 file selected

    so..
    1.18.154 -> 1762_merge_9817f031a022 -> 1.18.154 ✅


  • #1280 21636077
    p.kaczmarek2
    Moderator Smart Home
    Oh, so we accidentally found Web App bug, nice! Thank you for testing
    Helpful post? Buy me a coffee.
  • #1282 21636131
    p.kaczmarek2
    Moderator Smart Home
    Yes, this needs to be done:
    Code change in vue/ota.vue: XR872 and XR806 cases added with specific prefixes and postfixes
    Variants are not covered at all there yet, it's open question how to handle them. Probably just put them on the same list and hope that users can read...
    Helpful post? Buy me a coffee.
  • #1283 21636163
    divadiow
    Level 36  



    ECR6600

    1.18.154 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    MQTT State not configured, OTA in progress, 0 B downloaded, 000000h flashed

    RTL87x0C

    1.18.140 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    MQTT state and OTA progress message with a Config button

    RTL8710B

    1.18.140 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    OTA progress interface showing 0 bytes downloaded and 0 flashed

    XR806

    1.18.140 -> 1762_merge_9817f031a022 -> 1.18.154 ✅

    MQTT state not configured, OTA update in progress, 0 B downloaded

    Added after 9 [minutes]:

    p.kaczmarek2 wrote:
    Yes, this needs to be done:

    added RTL-A/B/D/DA/E and ECR6600

    Added after 21 [minutes]:

    yay

    List of .img files for OpenRTL8710B versions 1.18.151 to 1.18.154

    just missed some late RTLs by a few seconds :)

    https://github.com/OpenBekenIOT/webapp/pull/214
📢 Listen (AI):

Topic summary

The discussion centers on the development and testing of an open-source firmware project for the BK7231T microcontroller, focusing on creating a cross-platform mini HTTP server, web-based pin configuration, MQTT integration, and Home Assistant compatibility. The project includes a Visual Studio project for Windows and firmware flashing tools like Beken Writer and a Python-based uartprogram. Users report challenges with flashing devices, including issues with firmware size limits (956KB), UART converter compatibility, and power supply stability during flashing. Solutions include using specific UART adapters (e.g., FT232R, CP2102), resetting devices via the CEN pin instead of power cycling, and trimming firmware binaries. The firmware supports devices with BK7231T and BK7231N chips, with ongoing work to add PWM dimmer support, BLE, TuyaMCU protocol integration, and OTA updates. Various smart devices such as WB2S/WB3S modules, smart plugs, LED bulbs, and switches from brands like MOES, Nedis, Hama, and Calex are tested. Users share detailed hardware teardowns, pinouts, and flashing procedures. MQTT topic naming issues related to MAC address usage were identified and fixed. The project emphasizes community collaboration, with suggestions for a Discord server to enhance real-time communication. Additional tools and SDK improvements, including CMake support and BLE integration, are under development to facilitate firmware building and device support expansion.
Summary generated by the language model.
ADVERTISEMENT