logo elektroda
logo elektroda
X
logo elektroda

OpenBeken W800 vs W806 Differences and OTA Update Methods

p.kaczmarek2 2085 65
ADVERTISEMENT
  • #1 21081517
    p.kaczmarek2
    Moderator Smart Home
    What's going with this PR @divadiow ? Is W806 different than W800/W801?

    Btw, to answer OTA question - W800 has HTTP server based OTA (old OTA style), the Web App OTA is missing.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #2 21081609
    divadiow
    Level 34  
    good morning!

    yes, I grabbed a Hi-Link HLK-W806-Kit-V1.0 board from Ali Express a week ago as it looked just like it's sister board the HLK-W800-Kit-1.0 and I wanted to see if OBK had any chance on it. I didn't really look at the spec when I bought it, but it doesn't have wifi/BT and it only has 1mb flash!

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    Without any research I tried flashing the W800 OBK but this unsuccessful, failing with this error

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    which led here http://ask.winnermicro.com/question/131.html

    But then this caught my eye http://ask.winnermicro.com/question/720.html which led to this http://ask.winnermicro.com/article/186.html where this was stated:

    Code: Text
    Log in, to see the code


    followed by the modifications to make to adjust SDK, which is where these initial changes were committed. https://github.com/openshwprojects/OpenBK7231...mits/53288ad592b05de359db926d30b770ef7a17e2d9

    There were some failures because of size. This I think was the size that built

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    but then it would fail with

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    which I can't find mention of yet. Assuming this related to size I then set about trying to exclude bits to reduce flash total bytes, but you can see from subsequent runs this has not been successful yet. I've been commenting-out bits in the SDK relating to the demo, BT etc, but nothing I've tried has reduced size.

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    OpenBeken W800 vs W806 Differences and OTA Update Methods

    Even with a working OBK the 1mb flash probably makes it very limiting driver-wise, but still, it would be another supported chip to add to the list. Suggestions welcome!
  • #3 21081620
    p.kaczmarek2
    Moderator Smart Home
    How do you know that NAK error means that flash is too big?

    What is the current flash size?

    I can add some #define for you to for example allow turning off features like Tasmota JSON emulation
    Helpful post? Buy me a coffee.
  • #4 21081639
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    How do you know that NAK error means that flash is too big?


    I don't. Just a stab in the dark. But maybe it's related to NACK and it's that the flasher didn't receive an acknowledgement after Packets: 57/957? I've tried different uart speeds.

    p.kaczmarek2 wrote:
    What is the current flash size?


    1mb!

    p.kaczmarek2 wrote:
    I can add some #define for you to for example allow turning off features like Tasmota JSON emulation


    well that would be cool, but I am also happy to just keep playing myself if you've no time/other priorities. W806 was just a little adventure with no stakes.
  • ADVERTISEMENT
  • #5 21081643
    p.kaczmarek2
    Moderator Smart Home
    I don't think it's exactly 1MB, what is the current size of build files?

    Can we get somehow some other binary for testing W806? I can try to help, I have linux vm, maybe we can build/compile something else together..

    I can try to add more size build reduction within 3 to 6 hours from now so you can test more.
    Helpful post? Buy me a coffee.
  • #6 21081649
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    I don't think it's exactly 1MB, what is the current size of build files?

    Screenshot showing two FLS files downloaded on a Windows computer.
    p.kaczmarek2 wrote:
    Can we get somehow some other binary for testing W806?

    I did wonder about that. Will try to find something. The board didn't seem to come with anything from factory. I can't yet post on the WM forums because I need more reputation points 🙄

    p.kaczmarek2 wrote:
    I can try to help, I have linux vm, maybe we can build/compile something else together..

    I can try to add more size build reduction within 3 to 6 hours from now so you can test more.


    well sure! that'd be awesome.

    Added after 1 [hours] 19 [minutes]:

    I'm trying to find evidence the W806 really does have wifi/bt cores. unsure yet

    Added after 2 [minutes]:

    I have a working LED blinky demo from https://github.com/tehniq3/w80x_duino?tab=readme-ov-file

    woop
  • #7 21081712
    p.kaczmarek2
    Moderator Smart Home
    How large is the working LED blink demo?
    Helpful post? Buy me a coffee.
  • #8 21081715
    divadiow
    Level 34  
    Screenshot showing a file named sketch_may14a.ino.fls saved in FLS format, dated May 14, 2024, at 08:04, with a size of 92 KB.

    tiny arduino sketch

    Added after 42 [seconds]:

    flashes successfully in upgrade tools too

    Screenshot of Upgrade Tools V1.5.8 with uploaded Arduino sketch.
  • #9 21081741
    p.kaczmarek2
    Moderator Smart Home
    900KB vs 90KB seems like a huge difference. Is OBK really adding that much? Or is your tiny sketch compiled without WiFi library itself?
    Helpful post? Buy me a coffee.
  • #10 21081749
    divadiow
    Level 34  
    I imagine it's the bare minimum using a real W806 SDK with no wifi lib? Not sure blinky is any help tbh

    these are all the files under AppData\Local\Temp\arduino\sketches\5FEE0DA0118E63E80FD53A32C4A29472 from the sketch compilation
  • #11 21081754
    p.kaczmarek2
    Moderator Smart Home
    I'd suggest trying to make a simple AP demo with that Arduino thing. I will be able to make OBK build smaller in about 2h.

    Added after 1 [hours] 51 [minutes]:

    I added ability to disable Tasmota API:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1236
    But it doesn't seem make much difference:
    W800 FLS (not OTA) - 966 824
    W800 FLS (not OTA) - 976 336

    I don't think it's OBK making that much of a difference, maybe we need to check there:
    https://github.com/openshwprojects/OpenW800

    Added after 1 [hours] 25 [minutes]:

    maybe disable that:
    Screenshot of program code in the main.c file of the OpenW800 project with a symbol search option.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #13 21082792
    p.kaczmarek2
    Moderator Smart Home
    So what is your current size of the build? Maybe can I help more?
    Helpful post? Buy me a coffee.
  • #14 21082802
    divadiow
    Level 34  
    still

    Screenshot showing file size and size on disk.

    i'm probably doing something wrong. I'm commenting out/undefining but that doesn't seem to be making a difference. I'm making the changes to my OpenW800 submodule then pushing to my fork then pushing to remote main. it's triggering the workflow with the open PR so I guess my changes are making it up to the right place...

    eg https://github.com/openshwprojects/OpenBK7231...mits/492f5436757622c5e304f465f9d41e616df82927
  • #15 21082823
    p.kaczmarek2
    Moderator Smart Home
    Is your fork switched to your W800 submodule?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #16 21082842
    divadiow
    Level 34  
    I believe so. that's what I spent the first half the evening fixing. I started again with everything since the night before.

    .gitmodules has

    Code: Text
    Log in, to see the code


    Summary of My Setup:

    Forks and Clones:

    I forked the repositories OpenBK7231T_App and OpenW800 from the original repositories.
    I cloned my forks to my local machine:
    OpenBK7231T_App: C:\Users\divad\Documents\GitHub\OpenBK7231T_App
    OpenW800: C:\Users\divad\Documents\GitHub\OpenW800
    Submodule Configuration:

    The OpenBK7231T_App repository includes the OpenW800 submodule.
    I verified that the submodule URL in my OpenBK7231T_App repository points to my fork of OpenW800.


    that commit showing the file changes I made in my submodule are making their way to the main app PR is evidence all is OK?
  • #17 21386515
    p.kaczmarek2
    Moderator Smart Home
    Hey, what's the state of W806 flash attempt? How much size reduction is needed? Maybe it will be possible once we merge:
    Testing OBK Config for Smaller Builds on OpenBK7231T - Feedback Needed
    With new features, it's possible to even disable MQTT in the build and it gives a very good flash size reduction.
    Helpful post? Buy me a coffee.
  • #18 21386566
    divadiow
    Level 34  
    sadly almost definitely not a thing trying to enable wifi on it. it's been put to bed. latest:

    Code: Text
    Log in, to see the code

    https://github.com/board707/w80x_arduino/issues/40#issuecomment-2561380709

    maybe it could be made to run with no wifi - but then you'd just get to watch the uart logs? or you'd have to somehow script all settings. Maybe OpenW806 Core Edition - without GUI ;)

    Added after 1 [minutes]:

    Maybe I'll try flash to see if anything is different with latest smaller build

    Added after 26 [minutes]:

    not seeing sizetest2 builds that much smaller for W800. 950kb smallest I've seen I think.
  • #19 21387419
    divadiow
    Level 34  
    Code: Text
    Log in, to see the code
  • #20 21387420
    max4elektroda
    Level 20  
    Now without (own) NTP and TLS it's much smaller, thanks to @p.kaczmarek2 :-)

    Added after 1 [minutes]:

    You have been first again, sorry it doesn't work...
  • #21 21387422
    divadiow
    Level 34  
    max4elektroda wrote:
    You have been first again

    to try on W806?

    yeh, kinda didn't think it would :) just had to scratch that itch
  • #22 21387426
    max4elektroda
    Level 20  
    divadiow wrote:
    to try on W806

    I meant in realizing that the reduced image now could be a start for W806.
    But sure also to try at all ;-)
  • #23 21525621
    insmod
    Level 24  
    @divadiow can you check if this version works?
    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/14562038220
    I tried to replace gcc with newlib one

    Added after 45 [minutes]:

    I found my W800 board, how to take a backup?
    It apparently came with tuya firmware, which is odd for a dev board.
    Boot log
    [01-01 18:12:15 TUYA Info][mqc_app.c:337] mqc app init ...
    -01 18:12:15 TUYA Info][uni_thread.c:205] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    18:12:15 TUYA Info][uni_thread.c:205] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
     TUYA Debug][mqc_app.c:148] mq_pro:5 cnt:1
    A Debug][mqc_app.c:148] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Err][log_seq.c:849] log status is empty
    01-01 18:12:15 TUYA Debug][svc_online_log.c:293] svc online log init success
    UYA Info][uni_thread.c:205] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    rr][tuya_ws_db.c:324] kvs_read fails gw_bi -1
    TUYA Debug][ws_db_gw.c:141] gw base read finish:-18
    12:15 TUYA Debug][tuya_bt_sdk.c:84] ty bt cmmod register finish 1
    [tuya_ble_api.c:345] ble sdk inited
    [01-01 18:12:15 TUYA Notice][tuya_os_adapt_bt.c:219] tuya_hal_bt_port_init
    
    a
    port inited
    YA Notice][tuya_ble_api.c:381] ble sdk re_inited
    15 TUYA Notice][tuya_bt_sdk.c:125] ty bt sdk init success finish
    0.00_PT:2.2_LAN:3.3_CAD:1.0.3_CD:1.0.0 >
    < BUILD AT:2021_07_28_00_28_32 BY maht FOR ty_iot_wf_bt_sdk_rtos AT w800 >
    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:1 ENABLE_LAN_LINKAGE_MASTER:0 ENABLE_LAN_DEV:1 ENABLE_LAN_DEV_MASTER:0 >
    
    0_light_5_rgbcw_v2 | [HW]: TW03_V2.0 | [SW]: V1.0.7 (Mar 24 2022 18:30:50) | [PID]: yqqc3anxrn4lgsyt
    ce][tuya_device.c:792] free_mem_size:86016
    APP: TLS_BLE_GAP_EVT_ADAPTER_ON
    Starting advertising
    GAP procedure initiated: advertise; _mode=2ddr_type=0 adv_filter_policy=0 adv_itvl_min=120 adv_itvl_max=120
    APP: TLS_BLE_GAP_EVT_ADV_STARTED
    
  • #24 21525673
    divadiow
    Level 34  
    Hi thank you. I can't test until tomorrow.

    Sadly I don't believe there's any XT804 known backup method. None I've been able to find anyway. Maybe there's some xmodem way, no idea :(
  • #25 21525675
    insmod
    Level 24  
    Then i will test it myself, i wanted to preserve the firmware before flashing, but since there is no known way...
  • #26 21525676
    p.kaczmarek2
    Moderator Smart Home
    i may have w800 if i manage to find it in this mess
    Helpful post? Buy me a coffee.
  • #27 21525679
    insmod
    Level 24  
    Flashed it.
    No log output, but it boots and connects to wifi.
    The free heap space is depressing, only 29k is available.
  • #28 21525681
    p.kaczmarek2
    Moderator Smart Home
    My board:
    Breadboard with a microcontroller and several sensors connected by wires.
    Before flash:
    Screenshot of the OpenW800 control panel showing temperature, humidity, and pressure sensor data.
    Startup command (I am saving it mostly for myself, so I don't get lost it if I brick board):
    
    waitFor WiFiState 4
    
    startDriver DS1820
    
    startDriver BMP280 PB9 PB8 9 10 11 236
    
    startDriver AHT2X PB12 PB13 11 12
    
    startDriver OpenWeatherMap
    owm_setup 40.7128 -74.0060 d6fae53c4278ffb3fe4c17c23fc6a7c6 
    setChannelType 6 Temperature_div10
    setChannelType 7 Humidity
    setChannelType 8 Pressure_div100
    owm_channels 6 7 8
    owm_request
    
    setChannel 30 0
    again:
    addChannel 30 1
    echo Hello $CH30
    delay_s 1
    goto again
    

    Doing OTA:
    OTA update panel for W800 chipset with uploaded update image file.
    Done, works?
    Screenshot of a web interface showing device system and network information, including IP address, firmware version, and status.
    Screenshot of an IoT device control panel showing temperature and humidity sensor readings and configuration options.
    Well, PR has "berry" in name but it has no berry I guess:
    Screenshot of the OpenW800 panel showing an error after entering the command berry 2+2 in the command line.

    Added after 1 [minutes]:

    Heap on your "berry":
    
    Info:MAIN:Time 248, idle 0/s, free 29280, MQTT 0(16), bWifi 1, secondsWithNoPing 183, socks 2/8 
    


    Added after 2 [minutes]:

    let's flash main release and compare. Doing OTA to 1.18.92...
    Screen with hardware and network details of W800 device, including IP address and firmware version.
    
    Info:MAIN:Time 49, idle 0/s, free 29280, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/8 
    

    Well actually, I see no difference in heap size..
    I can get it lower with HTTP refreshes:
    Screenshot of a system log window with the number 20760 circled in red.
    Helpful post? Buy me a coffee.
  • #29 21525687
    insmod
    Level 24  
    Does release OBK print anything on TX0?
  • #30 21525689
    p.kaczmarek2
    Moderator Smart Home
    Log output is present on main release:
    Window of RealTerm program showing serial communication logs and port control panels.
    Oops I managed to somehow break config and it's now in brand new AP state. Probably I reseted it (on main release) while it was saving flash and it has corrupted. But still...

    Back on berry:
    Screenshot showing W800 device info and an open RealTerm program window.
    I can confirm there is no log output on your "berry " build...
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the differences between the OpenBeken W800 and W806 models, particularly in terms of their specifications and OTA (Over-The-Air) update methods. The W800 features an HTTP server-based OTA, while the W806's capabilities are under scrutiny, with some users questioning its lack of Wi-Fi and Bluetooth. A user attempted to flash the W800 firmware onto a W806 board but encountered errors, leading to further investigation into the internal structures of both models. The conversation includes attempts to compile and test firmware for the W806, with discussions on flash sizes and the potential for reducing build sizes. The community is actively exploring the capabilities of the W806, including its possible Wi-Fi and Bluetooth functionalities, while sharing resources and troubleshooting strategies.
Summary generated by the language model.
ADVERTISEMENT