logo elektroda
logo elektroda
X
logo elektroda

Configuring OpenBeken on ESP32 with 4MB Default Using sdkconfig.defaults.esp32

insmod 18393 245
ADVERTISEMENT
  • #151 21595819
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    UPDATE: I moved ESP8266 discussion to separate topic. OBK can now run on ESP8266.
    Running OpenBeken/OBK on ESP8266 devices
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #152 21604297
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    ESP OTA list is frozen at 1.18.121

    1.18.122 was the big w800 + berry merge
    Configuring OpenBeken on ESP32 with 4MB Default Using sdkconfig.defaults.esp32

    Also the ESP downloads in the table above the assets are dead
    Configuring OpenBeken on ESP32 with 4MB Default Using sdkconfig.defaults.esp32
  • #153 21604388
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    Which commits and changes were introduces there?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Helpful post
    #154 21604511
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21604388
    I separated builds to 2M and 4M variants
  • #156 21611124
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    i will give it a try
    Helpful post? Buy me a coffee.
  • #157 21611142
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    :)
    Configuring OpenBeken on ESP32 with 4MB Default Using sdkconfig.defaults.esp32

    Added after 1 [minutes]:

    bum. didn't add C5 and C61
  • #158 21611145
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    What kind of tool is that?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #159 21611147
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    just a little GPT thing 'I' made
    Code: Python
    Log in, to see the code


    Added after 5 [minutes]:

    actually, it's not fetching all assets. hmm

    Added after 5 [minutes]:

    Code: Python
    Log in, to see the code
  • #161 21629835
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    That's a great development. Let me know which your PRs are safe to merge.

    Well, T0H and T0L , or, more broadly speaking, WS2812 timings are derived from two things - from fake data output values and from SPI clock.
    Here is topic showing that: https://www.elektroda.com/rtvforum/topic4111570.html
    So, we would probably need a lookup table for different times if needed?
    Helpful post? Buy me a coffee.
  • #162 21629878
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    I'm away for now (for ~4 hours), will ping once i've retested esp.
    LN update can be merged.
    If OTA is working in ECR update pull (both rest and http), then it can be merged too.
  • #163 21629951
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    I can test things this afternoon if needed 🤓
  • ADVERTISEMENT
  • #165 21630048
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    Should this be a PR?https://github.com/openshwprojects/OpenTR6260/compare/master...NonPIayerCharacter%3AOpenTR6260%3Amaster
  • #166 21630051
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21630048
    .gitmodules points at my repo, but even if it wasn't, sdk/OpenTR6260 still points to last commit.
  • #167 21630053
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    Ah ok ok 😃

    Added after 1 [hours] 18 [minutes]:

    1743_merge_d3a54bd71550

    GUI and web app methods work as normal to and from this PR. HTTP server method does not work. It doesn't work on 1.18.145 either. Just this in log:

    Code: Text
    Log in, to see the code


    Screenshot showing: “Wifi RSSI: Good (-50dBm)” on a dark background
  • #168 21630161
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Now also on LN882H.
    I used SPI, not native WS2811. That way compatibility with OBK code was kept.
    I'm actually surprised that it worked. There is no way to set spi frequency precisely. Only through a divider.
    So while BK and ESP spi frequency is 3MHz, LN882H is 2.125Mhz (i think). Formula is (br + 1) * 5 * (1 / pclk), where br = 16 and pclk is 40M? br is 2^x, x >= 1 && x <= 8

    LN882H was tested on 12 WS2812B.
    Re-tested ESP again, can be merged.

    Added after 3 [hours] 12 [minutes]:

    ESP32-C2 works
  • #169 21630291
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    Cool cool.

    insmod wrote:
    used SPI, not native WS2811


    Curious about this. What's the difference and why not native WS2811?
  • #170 21630299
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21630291
    I tried it, but it wasn't working properly.
    Main reason, i believe - it expects raw pixel data. We supply it pre-translated for SPI.

    Added after 37 [minutes]:

    RIP indentations in obk_config.h
    @p.kaczmarek2 should i restore them in pull request?
  • #171 21630358
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    Oh? Did something broke? If so, please do. I merged some pending PRs and now I am about to try something with BK7238 IR
    Helpful post? Buy me a coffee.
  • #172 21630398
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Restored indentations, plus fixed ESP build
  • #173 21630621
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Well, i managed to get native WS2811 working on LN882H by disabling translation, but it stops working sometimes. Chip also gets rather hot.
    Probably done something wrong. Not a priority for me either.

    Need spiled for any other chip?

    commit 5a702ce796142bbde38aa30b4ffdc761811345ea
    Author: NonPIayerCharacter <18557343+NonPIayerCharacter@users.noreply.github.com>
    Date:   Sun Aug 10 09:55:43 2025 +0300
    
        index on bk7231t_alt_spiled: 0f9b07d6 Merge remote-tracking branch 'refs/remotes/origin/main' into bk7231t_alt_spiled
    
    diff --git a/src/driver/drv_sm16703P.c b/src/driver/drv_sm16703P.c
    index f000a40b33ca5b4a9240ef4248eb88a4004f173e..cd720cc37ceae3dea6ef5fe8a78165cf8f2165c4 100644
    --- a/src/driver/drv_sm16703P.c
    +++ b/src/driver/drv_sm16703P.c
    @@ -13,23 +13,13 @@
     #include "drv_local.h"
     #include "drv_spiLED.h"
     
    +#if PLATFORM_LN882H
    +#define SEND_RAW_DATA 1
    +#endif
    +
     // Number of pixels that can be addressed
     uint32_t pixel_count;
     
    -void SM16703P_GetPixel(uint32_t pixel, byte *dst) {
    -   int i;
    -   uint8_t *input;
    -
    -   if (spiLED.msg == 0)
    -      return;
    -   
    -   input = spiLED.buf + spiLED.ofs + (pixel * 3 * 4);
    -
    -   for (i = 0; i < 3; i++) {
    -      *dst++ = reverse_translate_byte(input + i * 4);
    -   }
    -}
    -
     enum ColorChannel {
        COLOR_CHANNEL_RED,
        COLOR_CHANNEL_GREEN,
    @@ -45,6 +35,30 @@ const enum ColorChannel default_color_channel_order[3] = {
     enum ColorChannel *color_channel_order = default_color_channel_order;
     int pixel_size = 3; // default is RGB -> 3 bytes per pixel
     
    +void SM16703P_GetPixel(uint32_t pixel, byte* dst)
    +{
    +   int i;
    +   uint8_t* input;
    +
    +   if(spiLED.msg == 0)
    +      return;
    +
    +#if SEND_RAW_DATA
    +   input = spiLED.buf + spiLED.ofs + (pixel * pixel_size);
    +#else
    +   input = spiLED.buf + spiLED.ofs + (pixel * 3 * 4);
    +#endif
    +
    +   for(i = 0; i < 3; i++)
    +   {
    +#if SEND_RAW_DATA
    +      * dst++ = input + i * pixel_count;
    +#else
    +      * dst++ = reverse_translate_byte(input + i * 4);
    +#endif
    +   }
    +}
    +
     bool SM16703P_VerifyPixel(uint32_t pixel, byte r, byte g, byte b) {
        byte real[3];
        SM16703P_GetPixel(pixel, real);
    @@ -86,7 +100,11 @@ void SM16703P_setPixel(int pixel, int r, int g, int b, int c, int w) {
                 ADDLOG_ERROR(LOG_FEATURE_CMD, "Unknown color channel %d at index %d", color_channel_order[i], i);
                 return;
           }
    +#if SEND_RAW_DATA
    +      spiLED.buf[spiLED.ofs + i + (pixel * pixel_size)] = pcolor;
    +#else
           translate_byte(pcolor, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
    +#endif
        }
     }
     void SM16703P_setMultiplePixel(uint32_t pixel, uint8_t *data, bool push) {
    @@ -135,10 +153,15 @@ void SM16703P_scaleAllPixels(int scale) {
     
        for (pixel = 0; pixel < pixel_count; pixel++) {
           for (ofs = 0; ofs < 3; ofs++) {
    +#if SEND_RAW_DATA
    +         data = spiLED.buf + (spiLED.ofs + ofs * 4 + (pixel * pixel_size));
    +         b = SCALE8_PIXEL(*data, scale);
    +#else
              data = spiLED.buf + (spiLED.ofs + ofs * 4 + (pixel * 3 * 4));
              b = reverse_translate_byte(data);
              b = SCALE8_PIXEL(b, scale);
              translate_byte(b, data);
    +#endif
           }
        }
     }
    diff --git a/src/driver/drv_spiLED.c b/src/driver/drv_spiLED.c
    index e88ea580d65f1e20fdc82dd92a312de3ee23bcbb..47e7cbcfee1ae2bb73a5292e153b4d1f1476ba4d 100644
    --- a/src/driver/drv_spiLED.c
    +++ b/src/driver/drv_spiLED.c
    @@ -29,6 +29,11 @@ void SPIDMA_Deinit(void) {
     }
     
     #endif
    +
    +#if PLATFORM_LN882H
    +#define SEND_RAW_DATA 1
    +#endif
    +
     static uint8_t data_translate[4] = { 0b10001000, 0b10001110, 0b11101000, 0b11101110 };
     
     
    @@ -88,7 +93,12 @@ void SPILED_InitDMA(int numBytes) {
        spiLED.padding = 64;
     
        // Prepare buffer
    +#if SEND_RAW_DATA
    +   uint32_t buffer_size = spiLED.ofs + (numBytes * 3);
    +   spiLED.padding = 0;
    +#else
        uint32_t buffer_size = spiLED.ofs + (numBytes * 4) + spiLED.padding; //Add `spiLED.ofs` bytes for "Reset"
    +#endif
     #if PLATFORM_ESPIDF
        spiLED.buf = heap_caps_malloc(sizeof(byte) * (buffer_size), MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA);
     #else
    diff --git a/src/driver/drv_spidma.c b/src/driver/drv_spidma.c
    index 934809917d7bb56b203dad0ac0b5fe127542815d..8583435d9bd42afe82ad2d9a3f9b9b694f98e69e 100644
    --- a/src/driver/drv_spidma.c
    +++ b/src/driver/drv_spidma.c
    @@ -607,7 +607,7 @@ void SPIDMA_Deinit(void)
     #include "drv_spidma.h"
     #include "../hal/ln882h/hal_pinmap_ln882h.h"
     #include "hal/hal_dma.h"
    -#include "hal/hal_spi.h"
    +#include "hal/hal_ws2811.h"
     
     extern int spidma_led_pin;
     static int current_pin = 6;
    @@ -617,50 +617,37 @@ void SPIDMA_Init(struct spi_message* msg)
        current_pin = spidma_led_pin > 0 ? spidma_led_pin : 6;
        lnPinMapping_t* pin = g_pins + current_pin;
     
    -   hal_gpio_pin_afio_select(pin->base, pin->pin, SPI0_MOSI);
    -   hal_gpio_pin_afio_en(pin->base, pin->pin, HAL_ENABLE);
    -   
    -   spi_init_type_def spi_init =
    -   {
    -      .spi_baud_rate_prescaler = SPI_BAUDRATEPRESCALER_16,
    -      .spi_mode = SPI_MODE_MASTER,
    -      .spi_data_size = SPI_DATASIZE_8B,
    -      .spi_first_bit = SPI_FIRST_BIT_MSB,
    -      .spi_cpol = SPI_CPOL_LOW,
    -      .spi_cpha = SPI_CPHA_1EDGE,
    -   };
    -   
    -   hal_spi_init(SPI0_BASE, &spi_init);
    -   hal_spi_en(SPI0_BASE, HAL_ENABLE);
    -   hal_spi_ssoe_en(SPI0_BASE, HAL_DISABLE);
    -   
    +   hal_gpio_pin_afio_select(pin->base, pin->pin, WS2811_OUT);
    +   sysc_cmp_ws2811_gate_en_setf(1);
    +   ws2811_br_setf(WS2811_BASE, 16);
    +   ws2811_ws_en_setf(WS2811_BASE, 1);
    +   ws2811_dma_en_setf(WS2811_BASE, 1);
    +   ws2811_int_en_setf(WS2811_BASE, 0);
    +
        dma_init_t_def dma_init =
        {
    -      .dma_mem_addr = (uint32_t)msg->send_buf,
    +      .dma_mem_addr = msg->send_buf,
           .dma_data_num = msg->send_len,
           .dma_dir = DMA_READ_FORM_MEM,
           .dma_mem_inc_en = DMA_MEM_INC_EN,
    -      .dma_p_addr = SPI0_DATA_REG,
    -      .dma_p_size = DMA_P_SIZE_8_BIT,
    -      .dma_mem_size = DMA_MEM_SIZE_8_BIT,
    +      .dma_p_addr = WS2811_DATA_REG,//SPI0_DATA_REG,
    +      //.dma_p_size = DMA_P_SIZE_8_BIT,
    +      //.dma_mem_size = DMA_MEM_SIZE_8_BIT,
        };
    -   
    -   hal_dma_init(DMA_CH_4, &dma_init);
    -   hal_dma_en(DMA_CH_4, HAL_DISABLE);
    -}
     
    +   hal_dma_init(DMA_CH_2, &dma_init);
    +   hal_dma_en(DMA_CH_2, HAL_DISABLE);
    +}
     void SPIDMA_StartTX(struct spi_message* msg)
     {
    -   hal_dma_set_mem_addr(DMA_CH_4, (uint32_t)msg->send_buf);
    -   hal_dma_set_data_num(DMA_CH_4, msg->send_len);
    -
    -   hal_spi_dma_en(SPI0_BASE, SPI_DMA_TX_EN, HAL_ENABLE);
    -   hal_dma_en(DMA_CH_4, HAL_ENABLE);
    -   
    -   while(hal_dma_get_data_num(DMA_CH_4) != 0);
    -   
    -   hal_dma_en(DMA_CH_4, HAL_DISABLE);
    -   hal_spi_dma_en(SPI0_BASE, SPI_DMA_TX_EN, HAL_DISABLE);
    +   hal_dma_set_mem_addr(DMA_CH_2, (uint32_t)msg->send_buf);
    +   hal_dma_set_data_num(DMA_CH_2, msg->send_len);
    +
    +   hal_dma_en(DMA_CH_2, HAL_ENABLE);
    +
    +   while(hal_dma_get_data_num(DMA_CH_2) != 0);
    +
    +   hal_dma_en(DMA_CH_2, HAL_DISABLE);
     }
     
     void SPIDMA_StopTX(void)
    


    The best native support is in new ameba chips.
    Just set T0H and other values, and there you go.
    https://github.com/Ameba-AIoT/ameba-rtos/blob...aw_ledc_ws2812/example_raw_ledc_ws2812.c#L206
  • #174 21630636
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    Nice, realtek? Well we need SPI LED entry for platforms.md
    Helpful post? Buy me a coffee.
  • #175 21630637
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    p.kaczmarek2 wrote:
    Well we need SPI LED entry for platforms.md

    and powersave I reckon

    Added after 1 [minutes]:

    if you're in the mood for adding variants to releases, BL602 1MB?
  • #176 21630916
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    And again... it seems fixing merge conflicts in Visual Code breaks indent? Very strange. I will discard this file and take it from main.
    Changes in obk_config.h file showing removed and added preprocessor defines
    Helpful post? Buy me a coffee.
  • #177 21630951
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21630916
    Ident is already broken in main.
    I re-idented everything in spi led pull request.
    It's merge ready.
    I won't do realtek spi led in that one, if i do - it will be in a separate pull req. Current problem is that DMA requires offsets and length to be aligned to 32 bits.
    I probably won't for some time, i'm waiting for BW15 dev board.

    I use VSCodium for merge conflict resolution, it works fine (at least for me).
    P.S. do you think we should adopt LED timings/frequency from https://github.com/esphome/esphome/blob/maste...e/components/beken_spi_led_strip/light.py#L45

    Added after 39 [minutes]:

    @p.kaczmarek2
    ENABLE_DRIVER_PINMUTEX define was removed when led was merged.
  • #178 21631068
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14406
    Help: 650
    Rate: 12345
    Merged, thank you.

    Maybe not "adopt from there", but just add option for custom timings, I have bought some strips with different formats than WS2812, but didn't have time to play around with them yet.

    Are other PRs ready to merge?
    Helpful post? Buy me a coffee.
  • Helpful post
    #179 21631118
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21631068
    This one: https://github.com/openshwprojects/OpenBK7231T_App/pull/1743
    I will adjust new realteks later (will add easyflash, instead of current vfs).

    Tried WPA3 on WRG1.
    It connects, but doesn't receive ip / disconnects. With static ip - it connects, but inaccessible. On first attempt - always disconnects.
    Perhaps it is a problem with my test ap, i don't know. (on BPI-R4 + BE14000)
  • #180 21631157
    divadiow
    Level 38  
    Posts: 4849
    Help: 421
    Rate: 854
    Hmm ok. I can redo any if you have doubts about recent result table update. AmebaZ for eg

Topic summary

✨ The discussion centers on configuring OpenBeken firmware for ESP32 devices with a default 4MB flash size using sdkconfig.defaults.esp32. Initial issues included missing sdkconfig.defaults.esp32 and bootloader offset misconfiguration, which were resolved to enable successful compilation and flashing. Various ESP32 variants were tested, including ESP32-C3, ESP32-C6, ESP32-CAM, ESP32-C2, ESP32-D0WDQ5-V3 (ESP-WROOM-32), and ESP32-S3, with reports on flash size detection, bootloader behavior, and peripheral support. Challenges encountered involved stack overflows on reboot, watchdog timer resets, and GPIO functionality inconsistencies, particularly on non-C/S ESP32 boards. Solutions included adjusting makefiles for 4MB flash, fixing bootloader offsets, increasing task stack sizes, and replacing software timers with hardware timers for improved timing accuracy. Peripheral drivers such as BMP280, AHT2x, DS1820, DHT11/22, PWM, UART, and NTP were tested with varying success; some required specific pin assignments or additional delays to prevent crashes. Deep sleep support was added without GPIO wakeup. The firmware uses the Espressif ESP-IDF SDK for ESP32 and plans for ESP8266 porting were discussed, noting SDK differences and RAM constraints. Continuous integration (CI) and online build availability were confirmed. Users shared flashing tools, partition table considerations, and debugging tips including esptool flash_id and efuse burning. The community actively tested and reported logs, crashes, and feature functionality, contributing to iterative fixes and enhancements.
Generated by the language model.

FAQ

TL;DR: 4MB stało się domyślną bazą dla OpenESP32, a autor poprawki napisał: "Now configured with 4MB by default". Ten FAQ jest dla osób uruchamiających OpenBeken na ESP32 i wyjaśnia, jak dobrać build, rozwiązać błędy partycji, bootloadera, OTA, UART i Wi‑Fi na C2, C3, S2, S3 oraz klasycznym ESP32. [#21220790]

Dlaczego to ważne: Błędny rozmiar flash, zły offset bootloadera albo niewłaściwy typ obrazu potrafią dać „invalid header”, bootloop albo bezpieczny tryb AP mimo sprawnego sprzętu.

Wariant Typowy flash z wątku Co działało najlepiej Najczęstszy problem
ESP32-C3 4MB Wi‑Fi, OTA, PWM, czujniki I2C SuperMini miewa problemy z Wi‑Fi i DHCP
Klasyczny ESP32 4MB, czasem wykrywany jako 2MB GPIO, OTA, Wi‑Fi po poprawnym flashu błędy tabeli partycji i safe mode po reboocie
ESP32-S2/S3 4MB lub 16MB DS1820, GPIO, AP/STA po poprawkach stack overflow, problemy z temperaturą wewnętrzną
ESP32-C2 4MB podstawowe funkcje, PWM mało RAM, czułość na taktowanie i baud
ESP8266 1MB, 4MB, 8MB po swapie eksperymenty po rozdzieleniu wątku zbyt mały flash dla dual-OTA przy 8Mbit

Najważniejszy wniosek: Na ESP32 najpierw dobierz właściwy obraz do realnego flashu i układu, a dopiero potem diagnozuj skrypty, UART lub Wi‑Fi. W wątku większość „magicznych” awarii okazała się skutkiem złego rozmiaru flash, złego offsetu bootloadera albo użycia factory.bin zamiast .img. [#21221363]

Quick Facts

  • Domyślna konfiguracja ESP32 została przestawiona na 4MB flash, bo brakowało sdkconfig.defaults.esp32; to była kluczowa poprawka startowa całego portu. [#21220790]
  • Na ESP32-C3 poprawny boot pokazał partycje app0 0x10000, app1 0x100000 i LFS 0x1EF000, przy wykrytym flashu 4MB oraz SPI 80MHz/DIO. [#21221080]
  • Jeden z modułów ESP32-C5 pobierał przy starcie AP około 1,4 W / 0,3 A przy 5 V, czyli w przybliżeniu 0,5 A przy 3,3 V; to tłumaczy brownouty przy słabym zasilaniu. [#21648381]
  • Dla problematycznych płytek ESP32-C3 SuperMini obniżenie mocy Wi‑Fi do 10 dBm, a nawet 6 dBm, poprawiało łączenie z DHCP. [#21450268]
  • W sterowniku BP5758D padały konkretne prądy robocze: domyślnie 14 mA, w ESPHome 10 mA, a w praktyce dla GU10 sprawdzało się nawet 8 mA na kanałach. [#21246766]

How do I configure OpenBeken on ESP32 to use 4MB flash by default with sdkconfig.defaults.esp32?

Dodaj brakujący plik sdkconfig.defaults.esp32 i ustaw w nim wariant 4MB jako domyślny dla ESP32. To właśnie ta zmiana odblokowała poprawny start portu i autor podsumował ją krótko: „Now configured with 4MB by default”. Jeśli tworzysz także obraz scalony, dopasuj --flash_size 4MB, bo samo SDK nie naprawi błędnego merge bin. [#21220790]

Why does OpenESP32 factory.bin fail to boot with partition table errors on some ESP32 boards that actually have 4MB flash?

Najczęściej dlatego, że obraz factory.bin został zmergowany z nagłówkiem 2MB, mimo że płytka ma fizycznie 4MB. W logu widać wtedy SPI Flash Size : 2MB, a zaraz potem błąd typu partition ... exceeds flash chip size 0x200000. W wątku poprawka polegała na zmianie polecenia esptool.py merge_bin z --flash_size 2MB na --flash_size 4MB, bez zmiany samej płyty. [#21221363]

What is the difference between OpenBeken factory.bin and non-factory .img builds on ESP32, and when should each one be flashed?

factory.bin to obraz scalony z bootloaderem, tabelą partycji i aplikacją, a .img to zwykle sam obraz aplikacji do istniejącego układu partycji. Gdy układ startuje od zera, po erase_flash, albo masz uszkodzone partycje, użyj factory.bin. Gdy bootloader i partycje już są poprawne, często bezpieczniej użyć .img; w wątku klasyczny ESP32 ruszył po przejściu z factory na non-factory. [#21221359]

How can I erase_flash and reflash OpenBeken correctly on ESP32, ESP32-C3, and ESP32-S2 boards when GPIOs or boot behavior seem broken?

Najbezpieczniej wykonaj pełne czyszczenie i dopiero potem ponowny flash. 1. Uruchom erase_flash, aby usunąć stare partycje, konfigurację i błędne autostarty. 2. Wgraj właściwy obraz dla układu i realnego flashu: factory.bin przy czystym starcie albo .img przy istniejących partycjach. 3. Na S2 wejdź w boot przez przyciski RST i 0, a potem sprawdź log i AP przed testem GPIO. Ten schemat przywrócił poprawne działanie LED-ów i factory.bin na kilku płytkach. [#21221622]

Why did the ESP32-C3 merge initially fail with invalid header errors, and how does the bootloader offset at 0x0 vs 0x1000 affect flashing?

Bo przy merge dla C3 bootloader trafił pod zły adres. Autor poprawki napisał wprost, że „bootloader must be at 0x0, instead of 0x1000”, a wcześniejszy układ dawał serię invalid header. Na ESP32-C3 boot ROM oczekiwał bootloadera od 0x0, więc obraz z offsetem 0x1000 wyglądał jak uszkodzony mimo poprawnego flashowania. [#21221037]

What causes OpenBeken script timing to run too slowly on ESP32, and how do QUICK_TMR_DURATION, vTaskDelay, and esp_timer_get_time relate to the fix?

Problem wynikał z błędnego liczenia g_deltaTimeMS i z niepoprawnego użycia opóźnienia FreeRTOS. Poprawa miała dwa elementy: dla ESP-IDF czas zaczęto brać z esp_timer_get_time()/1000, a w wątku timera zmieniono vTaskDelay(QUICK_TMR_DURATION) na vTaskDelay(QUICK_TMR_DURATION / portTICK_RATE_MS). To ograniczyło dryf, który wcześniej dawał wynik około MAIN:Time 150 przy kanale zwiększonym tylko do 121. [#21221114]

How do flash encryption flags and eFuse settings on an ESP32-C3 device affect whether OpenBeken can boot after flashing?

Włączone szyfrowanie flash może zablokować start zwykłego obrazu, nawet gdy sprzęt ma poprawne 4MB i sam flash zapisze się bez błędów. W wątku jeden ESP32-C3 miał Flash Encryption: Enabled i nie startował jak zwykła płytka deweloperska. Po zmianie eFuse tak, by raport pokazywał Flash Encryption: Disabled oraz SPI_BOOT_CRYPT_CNT: 0x3, urządzenie zaczęło bootować OpenBeken poprawnie. [#21221080]

What is LittleFS or LFS in OpenBeken, and why do ESP logs sometimes say 'lfs is absent' even when scripts appear to work later?

„LittleFS” jest lekkim systemem plików flash, który przechowuje skrypty, pliki startowe i inne dane trwałe, a jego kluczową cechą jest praca na wydzielonej partycji flash zamiast w RAM. Log lfs is absent oznacza zwykle brak zamontowanej partycji LFS lub jeszcze nieutworzony system plików. W wątku ten komunikat pojawiał się przy starcie, ale później testy pokazały, że skrypty i zapis zaczęły działać po dalszych poprawkach partycji i flashowania. [#21221088]

What is TCA9554, and why is that I2C expander needed to run OpenESP32 on boards like the Waveshare ESP32-S3-ETH-8DI-8RO?

„TCA9554” jest ekspanderem I2C, który dodaje 8 linii wejścia/wyjścia GPIO, a jego główną cechą jest sterowanie dodatkowymi sygnałami przez magistralę I2C zamiast bezpośrednio z MCU. Na płytce Waveshare ESP32-S3-ETH-8DI-8RO ten układ steruje sekcją przekaźników, więc bez jego obsługi OpenESP32 nie potrafi przełączać wyjść. Dlatego w wątku wskazano, że TCA9554 jest wymagany, aby ta płyta miała sensowną obsługę pod OpenESP32. [#21640201]

ESP32-C2 vs ESP32-C3 vs classic ESP32 vs ESP32-S3 for OpenBeken — which one is currently the better choice for stability, Wi-Fi, sensors, and OTA?

Najbezpieczniejszym wyborem z wątku jest ESP32-C3 albo poprawnie zasilony ESP32-S3. C3 miał działające Wi‑Fi, OTA, PWM i czujniki I2C, choć wersje SuperMini wymagały czasem obniżenia mocy TX. Klasyczny ESP32 działał, ale częściej wpadał w safe mode, miał problemy z restartem i błędami partycji. C2 działał, lecz był bardziej ograniczony RAM-em; autor napisał wprost, że „ESP32-C2 is already struggling”. [#21223468]

How can I diagnose ESP32 reboot loops, WDT safe mode, or stack overflow crashes in OpenBeken after restart, OTA, NTP start, or saving pins?

Najpierw patrz na dokładny powód resetu i nazwę zadania z logu. Jeśli widzisz TG0WDT_SYS_RESET lub TG1WDT_SYS_RESET, szukaj blokującego kodu, a nie problemu RTC WDT. Jeśli log mówi o stack overflow w sys_evt, quick albo IntTemp, zwiększ stack albo znajdź pętlę rekurencyjną. W wątku restart rozbijał się o nieskończoną pętlę: WIFI_STA_DISCONNECTED wywoływało HAL_DisconnectFromWifi, które generowało ten sam event ponownie. [#21224554]

What is the best way to test UART on OpenESP32 with TuyaMCU, and why can UART receive still behave inconsistently even when transmit works?

Najlepiej testować UART na prawdziwym urządzeniu z TuyaMCU i osobno sprawdzić TX oraz RX. Autor portu podał, że nadawanie działało, ale odbiór wymagał obejścia: po UART_AppendByteToReceiveRingBuffer dodał vTaskDelay(3), aby uniknąć crasha. To stabilizowało pracę, ale przy większym strumieniu danych nadal mogło przepełnić bufor, wywołać flush wejścia i reset kolejki. [#21222660]

How do I reduce Wi-Fi issues on ESP32-C3 SuperMini boards in OpenBeken, including slow DHCP or failed connections, with commands like powersave 1 10?

Obniż moc nadawania i nie zakładaj, że domyślne 20 dBm będzie stabilne. Dla ESP32-C3 SuperMini w wątku zalecono powersave 1 10, gdzie 10 oznacza 10 dBm, a w jednym przypadku urządzenie połączyło się dopiero przy 6 dBm. To pomogło przy wolnym DHCP, braku adresu IP i niestabilnych połączeniach, typowych właśnie dla SuperMini. [#21450298]

Can I upgrade an ESP8266 or ESP-01 flash chip from 1MB to 4MB or 8MB for OpenBeken, and what should I verify with esptool afterward?

Tak, taka podmiana została potwierdzona praktycznie. W wątku wymieniono flash w ESP-01 z 1MB na 4MB, a później także na 8MB w innym module, po czym esptool flash_id poprawnie raportował nowy rozmiar pamięci. Po wymianie zawsze sprawdź producenta układu, kod urządzenia i Detected flash size, bo to jedyny szybki sposób potwierdzenia, że lutowanie i konfiguracja SPI są poprawne. [#21238166]

How can I create a global float variable or pulse counter in OpenBeken on ESP32-C3 for water meters when each pulse represents 10 liters?

W pokazanym fragmencie wątku nie ma gotowej, potwierdzonej implementacji globalnego floata ani licznika impulsów dla 10 litrów na impuls. Jest tylko pytanie użytkownika o taki licznik po uruchomieniu logiki addChangeHandler, bez dalszej odpowiedzi z działającym rozwiązaniem. Jeśli chcesz pozostać zgodny z tym wątkiem, jedyną potwierdzoną ścieżką jest dalszy eksperyment ze skryptami lub Berry, ale bez gotowej recepty opisanej w podanych postach. [#21798097]
Generated by the language model.
ADVERTISEMENT