logo elektroda
logo elektroda
X
logo elektroda

Testing OBK Config for Smaller Builds on OpenBK7231T - Feedback Needed

p.kaczmarek2 3465 65
Best answers

Can I build and test the reduced-size OpenBK7231T firmware from PR 1500 on BK7231, and remove the Wi‑Fi/IP configuration pages from the web UI so those settings are done only by console commands?

Yes—the smaller-build PR was working in testing on BK7231-class devices, but it was still considered very WIP while people checked for missing defaults and OTA regressions [#21382147][#21384037] BK7231N/T, WBR3, W600/W800 and other test boards booted the current build, and OTA plus common features like MQTT, LFS, NTP, DS1820, DHT and HA discovery were reported working or being verified [#21384037][#21384187][#21386335][#21386485] The maintainer also trimmed the build further by making SendGET/SendPOST depend on ENABLE_HTTP_SEND and the classic RGBCW PWM LED driver depend on ENABLE_LED_BASIC [#21381742] The open question was whether all Wi‑Fi/IP-related pages can be removed safely, because that depends on having equivalent console commands for those settings [#21381284][#21381294]
Generated by the language model.
ADVERTISEMENT
  • #1 21381261
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    I'm adding extra defines to obk_config.h so we can get a reduced size build. New changes include:
    - ability to turn off some of HTML pages, like flags, etc, as they are possible to set via console command
    - ability to turn off LED driver (the classic RGBCW PWM one)
    - ability to turn off the BL0942/BL0937 shared code
    - ability to turn off some drivers that were included by default in the past
    Currently, a reduced size build resides in:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1500

    OpenBK7231N_1500_merge_f2af436bf134.rbl is 405 200 bytes, while last public release, 1.18.12, is 500 800 bytes

    Can anyone try to run https://github.com/openshwprojects/OpenBK7231T_App/pull/1500 on BK7231 via wires and give me some feedback, is it working at all, etc?
    Also, do we have all required commands in order to remove WiFi, IP, etc, config pages from HTML? Everything would have to be done via text commands.

    @divadiow @insmod @DeDaMrAz @max4elektroda

    Added after 2 [minutes]:

    PS: On my side on BK721N:
    OBK_DevBoard_CB3S user interface with configuration menu.

    Added after 1 [minutes]:

    Defines:
    Screenshot of a code editor showing a fragment of the openBeken_win32_msvc2017 file.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #2 21381284
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Can't run, but seeing this and remembering that there are commands for setting up wifi via cmd gave me an idea about opl1000.
    But, something needs to be done about uart command line then, because right now if i remember correctly it is beken only.

    Good idea overall.
    SHT3X should be enabled by default, as there is a tuya battery sensor utilizing it.
  • #3 21381294
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    The drivers enabled by default on public releases are up to discussion, because there were some things that were enabled without a good reason due to my fault/oversight. For example, ShiftRegister or MCP9808 did not have their own ENABLE_DRIVER_SHIFTREGISTER-like defines and instead they were just enabled for Windows, Beken, etc...

    We will just need some testing once everything is done, just to make sure that I didn't forget anything important, @divadiow , do you have both RGBCW devices and power devices (BL0942 etc)?

    Another thing that I may try to implement soon is a 100% alternative web panel that is just basically a "command line" window in HTML. It would certainly be even more lightweight that what we have now, even stripped...

    Build size reduction may be also somewhat useful for my another idea, which is a LUA scripting integration.
    Helpful post? Buy me a coffee.
  • #4 21381295
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    cool beans. I need to do @max4elektroda's clock/ntp bits first. I've been distracted by Realtek. Is this one step closer to point-and-click easy user custom builds?

    Added after 2 [minutes]:

    p.kaczmarek2 wrote:
    @divadiow , do you have both RGBCW devices and power devices (BL0942 etc)


    most likely. I have many bulbs and 2 BL0942 devices though one is TuyaMCU. Not sure I have BL0942SPI though.
  • ADVERTISEMENT
  • #5 21381298
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    Maybe not point and click, but we could consider integrating like 3 or 4 predefined "build driver sets" for Github. I don't know how long they would build, but maybe doing build twice is not as bad as long w don't have to fetch whole repository again and don't delete intermediate linker files? I am speaking about Github Actions/Workflow, of course.

    Some things are very strongly exclusive, like, for example LED driver (RGBCW PWM and SM2135, etc, etc) won't be needed along with power metering mechanism (BL0942, BL0937), so, in theory, we could have a "LED" build and "metering" build
    Helpful post? Buy me a coffee.
  • #6 21381738
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    I really like the idea! Sadly I can't do much testing atm, will be back this weekend.
  • #7 21381742
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    I've pushed futher changes, now SendGET and SendPOST commands are determined by ENABLE_HTTP_SEND define. I don't even know if we even tested them on other platforms.

    Ah, and it's now possible to compile without classic RGBCW PWM LED driver - ENABLE_LED_BASIC

    Added after 4 [minutes]:

    EDIT: By the way, this is strange: I always assumed that if something is not referenced, it will be removed by linker, but instead, on Windows, I get "unreferenced function XYZ" even while it's not called? I hope it's just Windows fault, not anything else... I need to investigate more.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #8 21382147
    DeDaMrAz
    Level 22  
    Posts: 594
    Help: 34
    Rate: 122
    Working from PR 1500

    IoT controller software interface screen with configuration options.

    OTA from file select works


    Web page with OTA update form for CB3S_TEST.

    Caution to users who would like to try - very WIP!!
  • #9 21382317
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    BK7231N RBL latest public release: 500KB
    BK7231N RBL with current state of stripping down (removed even HA discovery, basic functionality and MQTT left): 388KB
    BK7231N RBL with empty main in HAL: 280KB (so totally without OBK)

    I wonder what is taking so much space in "empty" binary, WiFi, OTA, etc?

    Added after 40 [minutes]:

    This may be taking space:
    https://github.com/openshwprojects/OpenBK7231...1t/bk7231t_os/beken378/driver/common/dd.c#L82
    Helpful post? Buy me a coffee.
  • #10 21382838
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    BK7231N RBL - now removed MQTT - with current state of stripping down (removed even HA discovery, basic functionalityt): 376KB

    Added after 33 [minutes]:

    I forgot about IR. I disabled IR and BK7231N RBL is down to 335KB.

    Added after 1 [minutes]:

    Btw, very strange. I added this to drv_ir.cpp:
    Code: C / C++
    Log in, to see the code

    Why in BL602 build do I get:
    
    In file included from /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/drv_ir.cpp:2:
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:20:5: warning: "PLATFORM_XR809" is not defined, evaluates to 0 [-Wundef]
     #if PLATFORM_XR809
         ^~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:25:7: warning: "PLATFORM_W600" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_W600
           ^~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:36:7: warning: "PLATFORM_W800" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_W800
           ^~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:45:7: warning: "WINDOWS" is not defined, evaluates to 0 [-Wundef]
     #elif WINDOWS
           ^~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:98:7: warning: "PLATFORM_BL602" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_BL602
           ^~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:124:7: warning: "PLATFORM_BEKEN" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_BEKEN
           ^~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:130:7: warning: "PLATFORM_LN882H" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_LN882H
           ^~~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:150:7: warning: "PLATFORM_ESPIDF" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_ESPIDF
           ^~~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:176:7: warning: "PLATFORM_TR6260" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_TR6260
           ^~~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:190:7: warning: "PLATFORM_RTL87X0C" is not defined, evaluates to 0 [-Wundef]
     #elif PLATFORM_RTL87X0C
           ^~~~~~~~~~~~~~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:215:2: error: #error "Platform not defined"
     #error "Platform not defined"
      ^~~~~
    /home/runner/work/OpenBK7231T_App/OpenBK7231T_App/sdk/OpenBL602/customer_app/bl602_sharedApp/bl602_sharedApp/shared/src/driver/../obk_config.h:220:5: warning: "ENABLE_DRIVER_BL0937" is not defined, evaluates to 0 [-Wundef]
    

    Global platform PLATFORM_BL602 define is not defined in BL602 in cpp files?
    Helpful post? Buy me a coffee.
  • #11 21384037
    DeDaMrAz
    Level 22  
    Posts: 594
    Help: 34
    Rate: 122
    Latest build from 8th January is working on WBR3 module

    A screenshot of the OpenRTL87X0C test interface showing system information.

    It is working on N module with DHT test

    Screenshot of DHT_test interface with DHT11 sensor data.

    DHT sensor is working but it will need more attention at some point as well.

    T module is working as well

    Configuration screen of the testOBK_T interface with various configuration options.

    Note, all of these are test boards with very limited or none of drivers running or devices attached. I did try to run some of the drivers (without problems) but without external devices I can't provide more relevant data at this point.
  • #12 21384088
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    W600 DHT works:
    OpenW600 user interface with temperature and humidity data
    Drivers in W600 (DHT is not listed as driver, sorry):
    
    Available drivers:
    - NTP
    - BL0937
    - DGR
    

    Test in WBR3:
    Screenshot of the OpenRTL87X0C interface with DHT11 sensor data.
    
    Available drivers:
    - TuyaMCU
    - tmSensor
    - NTP
    - I2C
    - BL0942
    - BL0937
    - CSE7766
    - DGR
    - Wemo
    - SM2135
    - BP5758D
    - BP1658CJ
    - SM2235
    - BMPI2C
    - CHT83XX
    - AHT2X
    - DS1820
    

    Test on CB3S:
    Screenshot of a control panel with an LED temperature slider and connection information.
    Drivers:
    
    Available drivers:
    - TuyaMCU
    - tmSensor
    - PixelAnim
    - NTP
    - HTTPButtons
    - I2C
    - BL0942
    - BL0942SPI
    - BL0937
    - CSE7766
    - SM16703P
    - SM15155E
    - IR
    - DDP
    - SSDP
    - DGR
    - Wemo
    - Hue
    - PWMToggler
    - DoorSensor
    - SM2135
    - BP5758D
    - BP1658CJ
    - SM2235
    - BMP280
    - CHT83XX
    - KP18058
    - ADCSmoother
    - DS1820
    - Battery
    - Bridge
    


    Who can test futher and tell me if it still works as main release? HASS Discovery? Anything else? LittleFS? I don't want to break release.
    Helpful post? Buy me a coffee.
  • #13 21384099
    DeDaMrAz
    Level 22  
    Posts: 594
    Help: 34
    Rate: 122
    HA Discovery and LFS on RTL87X0C works.


    User interface of RTL87X0C device management system displaying diagnostic information and logbook.

    I only got powersave 1 in lfs but it is working on every startup and lfs is there after the reboot.
  • #14 21384150
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    This is potentially a lot to test...

    OTA on CB3S from 1.18.13 to sizetest2_2b234efa753e. DS1820 already configured. still works. so does SSDP


    Screenshot of OpenBK7231N user interface with temperature information, MQTT connection status, and configuration buttons.

    MQTT connected OK (I manually returned to home - are we to wait for some confirmation of something?)
    OpenBK7231N interface displaying version and device connection information.

    Screenshot of the OpenBK7231N interface with Home Assistant and MQTT configuration options. User interface of a device control panel displaying firmware information and logs. Screenshot of a text editor with the /autoexec.bat file open containing a script.
  • #15 21384155
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    LN882H DHT works:
    Screenshot of the OpenLN882H interface with temperature and humidity data.
    Drivers:
    
    Available drivers:
    - NTP
    - BL0937
    - DGR
    - Wemo
    - Hue
    - SM2135
    - BP5758D
    - BP1658CJ
    - SM2235
    - DS1820
    


    Added after 38 [seconds]:

    divadiow wrote:

    MQTT connected OK (I manually returned to home - are we to wait for some confirmation of something?)

    Well, how it behaves in public release?
    Helpful post? Buy me a coffee.
  • #16 21384164
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    p.kaczmarek2 wrote:
    Well, how it behaves in public release?

    not used it for a long time tbh. will check
  • ADVERTISEMENT
  • #17 21384176
    DeDaMrAz
    Level 22  
    Posts: 594
    Help: 34
    Rate: 122
    p.kaczmarek2 wrote:
    Well, how it behaves in public release?


    Behaves the same, I didn't see any problem with it.
  • #18 21384178
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    more a general comment on it reading like we're to expect something to happen when it does connect. off-topic. back to testing
  • #19 21384179
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    Let's do something more exciting, I will test this build on my room lights. If I break them, I will have to sit in the dark.
    User interface for a lighting control system based on the BK7231T chip with two adjustment sliders.
    Autoexec copy:
    
    startDriver PWMToggler
    toggler_channel0 0
    toggler_name0 Window
    
    toggler_channel1 1
    toggler_name1 Wardrobe
    
    alias on backlog toggler_enable0 1; toggler_enable1 1;
    alias up backlog on; toggler_set0 +10; toggler_set1 +10;
    alias down backlog on; toggler_set0 -10; toggler_set1 -10;
    
    addEventHandler OnClick 0 up 
    addEventHandler OnClick 1 down
    

    Template:
    Code: JSON
    Log in, to see the code

    Testing my lights in 3, 2, 1...

    Ok, I lost my autoexec.bat, but rest is still working. We really need to add warning for that autoexec.bat or shrink default LFS size AGAIN.

    The lights are still working.
    Helpful post? Buy me a coffee.
  • #20 21384187
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    LN OTA from 1.17.765 to sizetest2_2b234efa753e
    BL0937 and DS1820, LFS, NTP, MQTT = ok

    Screenshot of OpenLN882H interface displaying temperature and energy data. Screenshot of a device interface displaying device info, sensors, and event log.

    Added after 21 [minutes]:

    what to test next...? what do you want to see? everything...?
  • #21 21384228
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    Maybe just go over manually the drivers list, get them via:
    
    startDriver anyNonExistingName
    

    and just double-check if everything we need in public is included... and we will merge this PR.
    Helpful post? Buy me a coffee.
  • #22 21384266
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    OK. I know you've posted some anyway, but here's mine

    LN882H
    Code: Text
    Log in, to see the code


    BK7231N
    Code: Text
    Log in, to see the code


    BK7231T
    Code: Text
    Log in, to see the code


    ESP32C2
    Code: Text
    Log in, to see the code


    ESP32S3
    Code: Text
    Log in, to see the code


    W600
    Code: Text
    Log in, to see the code


    W800
    Code: Text
    Log in, to see the code


    ESP32C6
    Code: Text
    Log in, to see the code


    BL602
    Code: Text
    Log in, to see the code


    ESP32
    Code: Text
    Log in, to see the code
  • #23 21384274
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    And OTA back to Release still works on all?

    If OTA works, then I will most likely merge this PR...

    Then we will have to sort out merge conflicts with @insmod PR, or maybe, @insmod can you tomorrow update your PR from main? There are no changes in code except the added #ifdef in some places.
    Helpful post? Buy me a coffee.
  • #24 21384392
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    TR6260
    Code: Text
    Log in, to see the code


    XR809 (same result for GA)
    Code: Text
    Log in, to see the code


    Added after 5 [minutes]:

    p.kaczmarek2 wrote:
    And OTA back to Release still works on all?

    todo
  • #25 21384891
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    I've enabled DS18B20 on W600, most likely for the first time ever. I had to fix one small type error:
    User interface on the OpenW600 configuration page with temperature and humidity information.
    This makefiles in App change by Max (if I remember correctly) is very useful.
    W600 microcontroller on a breadboard with a connected DS18B20 sensor.
    W600 microcontroller connected to a DS18B20 temperature sensor on a breadboard.
    Close-up of a PCB with a W600-BA00 chip and an LED diode.
    Close-up of a DS18B20 chip on a breadboard with colored wires.
    Helpful post? Buy me a coffee.
  • #26 21385028
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    p.kaczmarek2 wrote:
    Global platform PLATFORM_BL602 define is not defined in BL602 in cpp files?

    The define is only set in "CFLAGS" in https://github.com/openshwprojects/OpenBL602/blob/master/make_scripts_riscv/project.mk#L363

    Screenshot showing a fragment of a makefile used in the OpenBL602 project. In line 363, CFLAGS is set to -DPLATFORM_BL6021.

    and since this is a .cpp file, I would expect it should be also in CXXFLAGS or in CPPFLAGS like

    CXXFLAGS += -DPLATFORM_BL602=1


    Sorry, can't do a PR atm...

    Added after 19 [minutes]:

    Just made
    https://github.com/openshwprojects/OpenBL602/pull/6
  • #27 21385068
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    Ok merged, thank you, but I will update SDKs a bit later. Still, I think I will merge this #define PR today.
    Helpful post? Buy me a coffee.
  • #28 21385102
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    p.kaczmarek2 wrote:
    I've enabled DS18B20 on W600, most likely for the first time ever. I had to fix one small type error:

    It won't break anything, but make the function not working if device is up for some time (hence xTaskGetTickCount() is big). Maybe we should use "portTickType" here?


    Code snippet in an editor with a comment about changing the variable type.

    Added after 4 [minutes]:

    ... since its used in "src/driver/drv_bl_shared.c" code, it should be present in all/most SDKs.

    Added after 6 [minutes]:

    And/Or I can move this whole code section into a #define for debugging, since it's only used if the timing is not working and should not be needed if usleep works o.k. on the platform.
  • #29 21385177
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14393
    Help: 650
    Rate: 12314
    I will merge that PR and I'll let you do adjustments.

    First, I have another problem.

    Did W801 require anything else besides power off/on after flashing?

    The W801 board I received can be flashed, but is silent over UART and creates no APP:
    Screenshot of CMD console showing a device flashing process for W801.
    Terminal window showing the flashing process of the W801 device.
    W801 microcontroller board placed on a wooden table.
    PCB with W801 microcontroller, showing pin labels.
    PCB board with pin layout and labels on a wooden background.
    It's 100% silent over UART:
    Screenshot of RealTerm serial capture program showing no data on a black background.
    Tested with:
    - OpenW800_1.17.215.fls
    - OpenW800_1.18.14.fls
    The same happens. And it is my first time flashing this W801, I remember other W80X worked for me well.

    Do anyone also have W80X and can check whether those releases work there? Do they print over UART?
    Helpful post? Buy me a coffee.
  • #30 21385192
    divadiow
    Level 38  
    Posts: 4835
    Help: 420
    Rate: 852
    mine have always printed over UART/USB-C - same as flashing. will flash now

Topic summary

✨ Dyskusja dotyczy wprowadzenia mniejszych kompilacji w projekcie OpenBK7231T, w tym dodania nowych definicji do pliku obk_config.h, co pozwala na redukcję rozmiaru budowy. Użytkownicy omawiają możliwość wyłączenia niektórych stron HTML, sterowników LED oraz kodu wspólnego dla BL0942/BL0937. Testy wykazały, że nowa kompilacja osiąga rozmiar 388KB w porównaniu do 500KB w ostatnim publicznym wydaniu. Uczestnicy dyskusji dzielą się doświadczeniami z testowaniem różnych urządzeń, takich jak DHT, BL0942, oraz omawiają problemy związane z OTA i nowymi komendami startowymi. Wskazano również na potrzebę dalszych testów i integracji z innymi platformami.
Generated by the language model.

FAQ

TL;DR: The reduced OpenBK7231T_App test build cut BK7231N firmware from 500 KB to 388 KB, and one tester confirmed it "boots ok" on multiple boards. This FAQ helps OpenBK7231T users validate smaller builds, preserve OTA safety, and check which drivers still work before merging custom or stripped firmware. [#21382317]

Why it matters: Smaller firmware images make room for more platforms, safer OTA updates, and clearer driver-set choices without losing core OpenBK functionality.

Build or option Reported size / result Best fit
Public BK7231N release 500 KB Full default feature set
Stripped BK7231N build 388 KB Minimal core, MQTT kept earlier; HA removed in one test state
Earlier reduced RBL from PR #1500 405,200 bytes Early small-build validation
Empty HAL main 280 KB Baseline SDK overhead only
W800 after SDK feature cuts ~0.55 MB OTA-friendly W800 target

Key insight: The thread shows the size work was viable because testers repeatedly confirmed boot, OTA, MQTT, LFS, and several drivers across BK7231N, BK7231T, W600, W800, LN882H, RTL87X0C, and others. The real risk was not basic boot, but edge cases around startup-command JSON, makefiles, and platform-specific SDK defaults.

Quick Facts

  • PR #1500 produced a reduced OpenBK7231N_1500_merge_f2af436bf134.rbl at 405,200 bytes, versus 500,800 bytes for public release 1.18.12. [#21381261]
  • The BK7231N stripped build later dropped to 388 KB, then 376 KB after MQTT removal, and 335 KB after IR was disabled. [#21382838]
  • On W800, default SDK features pushed the image to about 1 MB; disabling TLS and related HTTP-client options cut it to about 0.55 MB. [#21387301]
  • OTA and runtime checks succeeded on real hardware: CB3S OTA from 1.18.13 worked, and LN OTA from 1.17.765 also kept BL0937, DS1820, LFS, NTP, and MQTT working. [#21384187]
  • W600 software I2C and BMP280 were tested with explicit pins, including a working example using 25 24 9 10 11 236 after correcting bad-pin wiring. [#21386485]

How do I test the reduced-size OpenBK7231T_App build from PR #1500 on BK7231 over UART wires, and what should I verify first after flashing?

Flash the PR #1500 image over UART wires, then verify boot, web access, and at least one core driver. 1. Write the test build to BK7231 and power-cycle the board. 2. Confirm it boots, creates the app or panel, and accepts OTA or console access. 3. Check a known feature such as DHT, MQTT, or driver listing before testing edge cases. Early testers reported OTA from file-select working and later confirmed boot on WBR3, BK7231N, and BK7231T test boards. [#21384037]

Why does a stripped OpenBK7231N build still take around 280 KB even with an almost empty main, and which SDK parts like WiFi or OTA are likely responsible?

Because the platform SDK still brings substantial baseline code even when OpenBK logic is nearly absent. The thread reports 280 KB for a BK7231N binary with an empty HAL main, versus 388 KB for a stripped OpenBK build and 500 KB for the latest public release. The discussion explicitly points to likely space users such as WiFi, OTA, and low-level SDK code in driver/common/dd.c, which remain linked below the application layer. [#21382317]

What commands are still required in OpenBK7231T if the WiFi, IP, and other configuration HTML pages are removed and everything must be configured from the console?

You still need console commands that fully replace web-page setup for networking and runtime control. The thread confirms WiFi can already be configured by command, and it discusses removing HTML pages only if all required text commands remain available. At minimum, the console must cover WiFi setup, IP-related configuration, driver startup, and OTA-safe recovery workflows, because the proposed lightweight panel may become a command-line-only HTML window. [#21381294]

What is LittleFS (LFS) in OpenBK7231T, and why can files like autoexec.bat disappear after OTA or partition-size changes?

"LittleFS (LFS) is a lightweight flash filesystem that stores persistent files, startup scripts, and small user data across reboots, but its contents depend on partition layout and reserved flash size." Files like autoexec.bat can disappear after OTA or size-layout changes because the filesystem area may shrink, move, or be recreated. One test on room lights kept core control working but lost autoexec.bat, prompting a warning to add a user warning or shrink default LFS size again. [#21384179]

What is HA or HASS Discovery in OpenBK7231T, and how do I check whether it still works after using a smaller firmware build?

"HA or HASS Discovery is a Home Assistant integration feature that auto-announces device entities over MQTT, letting Home Assistant detect sensors and controls without manual entity creation." After flashing a smaller build, verify it by enabling MQTT, watching Home Assistant or broker messages, and checking that discovery still appears after reboot. Testers explicitly confirmed that HA Discovery and LFS still worked on RTL87X0C in the reduced-build testing cycle. [#21384099]

LED build vs metering build in OpenBK7231T: which driver set makes more sense for RGBCW devices compared with BL0942 or BL0937 power-monitoring devices?

An LED-focused build makes more sense for RGBCW lights, while a metering-focused build fits BL0942 or BL0937 power devices. The thread states these driver groups are strongly exclusive in practice, because classic LED drivers such as RGBCW PWM or SM2135 are usually not needed alongside energy-metering stacks like BL0942 and BL0937. That is why a proposed split included separate "LED" and "metering" predefined build sets for GitHub workflows. [#21381298]

How can I list the drivers included in a specific OpenBK7231T firmware build using the startDriver anyNonExistingName trick?

Run startDriver anyNonExistingName in the console to force OpenBK to print the available driver list for that firmware. The maintainer asked testers to use exactly that trick to manually verify which public drivers remained compiled in before merging the size-reduction PR. Testers then posted platform-specific driver lists for LN882H, BK7231N, BK7231T, ESP32 variants, W600, W800, BL602, and TR6260. [#21384228]

Why does BL602 fail to compile drv_ir.cpp with 'Platform not defined' when PLATFORM_BL602 is only set in CFLAGS, and how should that define be passed for C++ files?

It fails because drv_ir.cpp is a C++ file, but PLATFORM_BL602 was only defined in CFLAGS, not in the flags used for C++ compilation. The thread identifies the fix clearly: pass the define through CXXFLAGS or CPPFLAGS, for example CXXFLAGS += -DPLATFORM_BL602=1. That change matches the observed error path, where obk_config.h reached #error "Platform not defined" inside a .cpp compile. [#21385028]

What causes Realterm to hold a W801 board in reset when opening the serial port, and which DTR or RTS setting fixes the no-UART-output problem?

Realterm can assert the modem-control line in a way that pulls the W801 reset pin low when the port opens. The maintainer measured RESET dropping from 3.3 V to 0 V on port open, which explained the silent UART. The fix was changing the relevant Realterm handshake control so opening the port no longer held reset active; once adjusted, the board printed normally and the problem disappeared. [#21385223]

How do I troubleshoot OTA and web GUI failures on older OpenBK7231T builds when the new multiline startup command contains unescaped newline characters in JSON?

Clear the multiline startup command first, then retry OTA. Older builds do not escape newline characters as \n in the JSON returned by the chip-info API, so the web app fails to parse platform info and cannot offer the OTA file selector correctly. The maintainer described this as a known bug and gave the direct workaround: remove the startup command text, then perform OTA. [#21399371]

Why does downgrading from a PR build with a long multiline startup command to an older W800 release lead to a boot crash, and how can safe mode recover it?

The older W800 release cannot safely handle the long multiline startup data written by the PR build, so it may crash during boot. The thread shows a reproducible failure after OTA to release, including Too many args, skipped all after 32nd and a CPU Exception 3. Recovery is simple: boot into safe mode, remove the stored startup command, and reboot. That clears the incompatible text and restores normal startup. [#21387492]

How do I enable and test DHT or DS18B20 on W800 and W600 when the makefile is missing driver source files or platform-specific options?

Add the missing driver sources or platform flags to the platform makefile, rebuild, then test with a real sensor. On W800, DHT initially failed with undefined references until drv_dht.c and drv_dht_internal.c were added to CSRCS; after that, DHT worked. On W600, DS18B20 was enabled for the first time during this work, though a small type issue still needed follow-up to avoid long-uptime timing problems. [#21385914]

What is OpenWeatherMap support in OpenBK7231T, and how do I configure owm_setup, channel types, and owm_request from the console?

OpenWeatherMap support is a driver workflow that fetches weather data over HTTP and maps it into OpenBK channels. Configure it by starting OpenWeatherMap, running owm_setup <lat> <long> <APIkey>, assigning channel types such as Temperature_div10, Humidity, and Pressure_div100, then binding them with owm_channels and calling owm_request. A posted working example used coordinates 40.7128 -74.0060 and channels 6, 7, and 8, and the maintainer confirmed, "All works." [#21386446]

Why was the W800 firmware image so large with TLS and HTTP client features enabled by default, and which SDK options helped shrink it from about 1 MB to roughly 0.55 MB?

The W800 image was large because the SDK enabled HTTP client, HTTPS, SSL, and crypto-related features by default. The maintainer highlighted TLS_CONFIG_HTTP_CLIENT, TLS_CONFIG_HTTP_CLIENT_SECURE, and related options as size drivers, then reduced the image from about 1 MB to about 0.55 MB by disabling unnecessary SDK features. That cut made OTA practical again and explained why W800 binaries were oversized even before many OpenBK drivers were added. [#21387301]

How do pin-name parsers like HAL_PIN_Find and Tokenizer_GetPin work in OpenBK7231T on W600 or W800, and how can I use names like PB8 and PB9 when starting drivers such as BMP280?

They let the console accept human-readable pin names and convert them to internal OBK pin indexes. The maintainer added HAL_PIN_Find and Tokenizer_GetPin for W600 and W800, then demonstrated driver startup with symbolic pins instead of numeric indexes. A working example was backlog stopDriver BMP280 ; startDriver BMP280 PB9 PB8 9 10 11 236, which successfully started BMP280 using PB9 and PB8 as I2C-style pin arguments. [#21387790]
Generated by the language model.
ADVERTISEMENT