logo elektroda
logo elektroda
X
logo elektroda

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

insmod 9450 228
ADVERTISEMENT
  • #211 21651947
    p.kaczmarek2
    Moderator Smart Home
    Nice progress! Let me know if any PRs are ready to merge.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #212 21652113
    insmod
    Level 27  
    >>21651947
    I think all of mine can be merged, even 3.0.78.
    LN882H IR while enabled by default, there is still a lot of free space remains. Even if everything in OBK was to be enabled, there would still likely be about 50-100kb free of ota space.
    ESP-IDF is just update from v5.5 to v5.5.1. It only brings ESP32-C61 v1.0 support (currently only beta chips works, and with this update support for them was dropped).
    TXW is in acceptable enough state.

    And i mentioned some time earlier that this one should be merged: https://github.com/openshwprojects/OpenBK7231T_App/pull/1727
  • #213 21652884
    divadiow
    Level 35  
    insmod wrote:
    TXW is in acceptable enough state.

    thanks for fixing releaserc :) https://github.com/openshwprojects/OpenBK7231T_App/pull/1786

    insmod wrote:
    And i mentioned some time earlier that this one should be merged: https://github.com/openshwprojects/OpenBK7231T_App/pull/1727


    this didn't make it. were there any concerns still @p.kaczmarek2 @max4elektroda? is it because it's quite a big change?
  • #214 21652999
    max4elektroda
    Level 21  
    divadiow wrote:
    were there any concerns still @p.kaczmarek2 @max4elektroda? is it because it's quite a big change?


    I would think it's safe to merge - we "only" change "HAL_Delay_us()", used in DHT and DS1820 driver.
    The platforms affected from this change either still work with this PR, or (the ones not working before) do work with it.

    There is only one discussable point I think, which is the new possibility to test HAL_Delay_us() on pins, wich can be enabled with "ENABLE_DS1820_TEST_US".
    It's disabled now for all platforms, so it's no more than an option now..
  • ADVERTISEMENT
  • #215 21653240
    p.kaczmarek2
    Moderator Smart Home
    I remember that the initial version of this PR (or similar one) broke timings on DHT or something, but if that's not the case anymore, I am happy to merge it.
    Helpful post? Buy me a coffee.
  • #216 21655897
    max4elektroda
    Level 21  
    insmod wrote:
    it boots fully and creates connectable AP.
    Wifi scan sees 5ghz networks.

    My C5 also arrived. Had some problems how to connect for some tests but came up with the idea to fit it into my universal adapter.
    Needed some paper to fit (though it should be 18mm as WROVER module), so right row is isolated, but the left row connects o.k.


    ESP-12 module connected to breadboard with signal wires on blue surface

    To get infos or flash I used esptool with "--no-stub" (else got "A fatal error occurred: Unable to verify flash chip connection (No serial data received.)."

    $ esptool.py -p /dev/ttyACM0  --no-stub chip_id
    esptool.py v4.8.0
    Serial port /dev/ttyACM0
    Connecting...
    Detecting chip type... ESP32-C5
    Chip is ESP32-C5 (revision v1.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 48MHz
    MAC: XX:XX:XX:XX:XX
    BASE MAC: XX:XX:XX:XX:XX
    MAC_EXT: ff:fe
    Enabling default SPI flash mode...
    Warning: ESP32-C5 has no Chip ID. Reading MAC instead.
    MAC: XX:XX:XX:XX:XX
    BASE MAC: XX:XX:XX:XX:XX
    MAC_EXT: ff:fe
    Hard resetting via RTS pin...
    


    and to flash:

    esptool.py -p /dev/ttyACM0 --no-stub  -b 921600 write_flash 0 OpenESP32C5_1.18.171_4M.factory.bin 
    esptool.py v4.8.0
    Serial port /dev/ttyACM0
    Connecting...
    Detecting chip type... ESP32-C5
    Chip is ESP32-C5 (revision v1.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 48MHz
    MAC: XX:XX:XX:XX:XX
    BASE MAC: XX:XX:XX:XX:XX
    MAC_EXT: ff:fe
    ROM expects crystal freq: 48 MHz, detected 48 MHz
    Changing baud rate to 921600
    Changed.
    Enabling default SPI flash mode...
    Configuring flash size...
    WARNING: In case of failure, please set a specific --flash_size.
    Flash will be erased from 0x00000000 to 0x0012ffff...
    Erasing flash...
    Took 1.64s to erase flash block
    Wrote 1244160 bytes at 0x00000000 in 7.9 seconds (1267.3 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...


    AP is only in 2.4GHz Wifi, but in scan I see 5GHz APs (Channel 116)


    ESP32C5 interface showing detected Wi-Fi networks with channels and signal levels
  • #217 21655908
    divadiow
    Level 35  
    ha nice. mine arrived yesterday.
    I just sat down to see how it behaves in ESP adaptor. Did yours come with anything on it?

    WT0132C5-S6 development board with microcontroller and GPIO headers
  • #218 21655918
    max4elektroda
    Level 21  
    Connection in 5GHz Band works:


    List of known WLAN devices connected to the FRITZ!Box network

    Added after 1 [minutes]:

    divadiow wrote:
    Did yours come with anything on it?

    I didn't test, but there are 3 more ;-)

    Added after 45 [minutes]:

    There's an AT CMD based firmware, it won't react to my input on ACM tty (from USB - and sadly RX/TX are on the opposite side, I isolated to fixate the module)...

    Spoiler:
    W (1048) wifi:WDEV_RXCCK_DELAY:960
    W (1048) wifi:WDEV_RXOFDM_DELAY:256
    W (1048) wifi:WDEV_RX_11G_OFDM_DELAY:257
    W (1048) wifi:WDEV_TXCCK_DELAY:630
    W (1048) wifi:WDEV_TXOFDM_DELAY:94
    W (1058) wifi:ACK_TAB0 :0x 90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
    W (1068) wifi:CTS_TAB0 :0x 90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
    W (1068) wifi:WDEVBEAMFORMCONF:0x61d7120, HE_BF_RPT_RA_SET_OPT:1
    W (1078) wifi:WDEVVHTBEAMFORMCONF: 0x61d7120, WDEV_VHT_BEAMFORMEE_ENA: 1, WDEV_VHT_NG_SEL: 0
    W (1088) wifi:(agc)0x600a7128:0xd21f0c20, min.avgNF:0xce->0xd2(dB), RCalCount:0x1f0, min.RRssi:0xc20(-62.00)
    W (1098) wifi:MODEM_SYSCON_WIFI_BB_CFG_REG(0x600a9c18):0x10003802
    W (1098) wifi:(phy)rate:0x0( LP-1Mbps), pwr:20, txing:20
    W (1108) wifi:(phy)rate:0x1( LP-2Mbps), pwr:20, txing:20
    W (1108) wifi:(phy)rate:0x2(LP-5.5Mbps), pwr:20, txing:20
    W (1118) wifi:(phy)rate:0x3( LP-11Mbps), pwr:20, txing:20
    W (1118) wifi:(phy)rate:0x5( SP-2Mbps), pwr:20, txing:20
    W (1128) wifi:(phy)rate:0x6(SP-5.5Mbps), pwr:20, txing:20
    W (1128) wifi:(phy)rate:0x7( SP-11Mbps), pwr:20, txing:20
    W (1138) wifi:(phy)rate:0x8( 48Mbps), pwr:17, txing:17
    W (1138) wifi:(phy)rate:0x9( 24Mbps), pwr:19, txing:19
    W (1148) wifi:(phy)rate:0xa( 12Mbps), pwr:19, txing:19
    W (1148) wifi:(phy)rate:0xb( 6Mbps), pwr:19, txing:19
    W (1158) wifi:(phy)rate:0xc( 54Mbps), pwr:17, txing:17
    W (1158) wifi:(phy)rate:0xd( 36Mbps), pwr:19, txing:19
    W (1168) wifi:(phy)rate:0xe( 18Mbps), pwr:19, txing:19
    W (1168) wifi:(phy)rate:0xf( 9Mbps), pwr:19, txing:19
    W (1178) wifi:(phy)rate:0x10, mcs:0x0, pwr(bw20:19, bw40:18), txing:19, HE pwr(bw20:19), txing:19
    W (1188) wifi:(phy)rate:0x11, mcs:0x1, pwr(bw20:19, bw40:18), txing:19, HE pwr(bw20:19), txing:19
    W (1198) wifi:(phy)rate:0x12, mcs:0x2, pwr(bw20:18, bw40:17), txing:18, HE pwr(bw20:18), txing:18
    W (1208) wifi:(phy)rate:0x13, mcs:0x3, pwr(bw20:18, bw40:17), txing:18, HE pwr(bw20:18), txing:18
    W (1208) wifi:(phy)rate:0x14, mcs:0x4, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (1218) wifi:(phy)rate:0x15, mcs:0x5, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (1228) wifi:(phy)rate:0x16, mcs:0x6, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (1238) wifi:(phy)rate:0x17, mcs:0x7, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (1248) wifi:(phy)rate:0x18, mcs:0x8, pwr(bw20:19, bw40:16), txing:19, HE pwr(bw20:16), txing:16
    W (1258) wifi:(phy)rate:0x19, mcs:0x9, pwr(bw20:18, bw40:16), txing:18, HE pwr(bw20:15), txing:15
    W (1268) wifi:(hal)co_hosted_bss:0, max_indicator:0, bitmask:0xff, mBSSIDsEnable:0
    I (1268) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).

    I (1278) wifi:mode : sta (XX:XX:XX:XX:XX:XX)
    I (1278) wifi:enable tsf
    W (1288) wifi:(BB)enable busy check(0x18), disable idle check(0xaa)
    I (1288) esp32c5_wifi: ==========Wi-Fi STA started==========
    Scanning Wi-Fi networks...I (8058) esp32c5_wifi: ==========Wi-Fi scan completed==========
    5G AP: XXSSID1XX, RSSI: -94 dBm, BSSID: XX:XX:XX:XX:XX:XX
    5G AP: XXSSID2XX, RSSI: -94 dBm, BSSID: XX:XX:XX:XX:XX:XX
    5G AP: XXSSID3XX, RSSI: -94 dBm, BSSID: XX:XX:XX:XX:XX:XX
    WiFi tool ready. Send AT+HELP for command list
    I (8078) main_task: Returned from app_main()


    Added after 5 [minutes]:

    max4elektroda wrote:
    To get infos or flash I used esptool with "--no-stub" (else got "A fatal error occurred: Unable to verify flash chip connection (No serial data received.)."

    Updated esptool (v5.0.2) works fine with stub
  • #219 21655969
    divadiow
    Level 35  
    >>21655908

    to add my 2 cents.

    esptool 5.0.2. IO26, IO27 and IO28 low to get into UART download mode. U0TXD/U0RXD to flash

    Two development boards with pin headers and micro USB marked FOR ESP8266 and WT0132C5-S6

    Code: Text
    Log in, to see the code


    Wireless Tag TWT0132C5-S6-N8R4

    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code


    this module shipped with blank flash.

    esptool -b 2000000 write-flash 0 OpenESP32C5_1.18.171_4M.factory.bin
    OpenESPC5 first boot
    Spoiler:
    ESP-ROM:esp32c5-eco2-20250121
    Build:Jan 21 2025
    rst:0x1 (POWERON),boot:0x1f (SPI_FAST_FLASH_BOOT)
    SPI mode:DIO, clock div:1
    load:0x408556b0,len:0x1710
    load:0x4084bba0,len:0xd9c
    load:0x4084e5a0,len:0x3198
    entry 0x4084bbaa
    I (23) boot: ESP-IDF v5.5.1 2nd stage bootloader
    I (23) boot: compile time Sep 7 2025 08:11:39
    I (24) boot: chip revision: v1.0
    I (25) boot: efuse block revision: v0.2
    I (27) boot.esp32c5: SPI Speed : 80MHz
    I (31) boot.esp32c5: SPI Mode : DIO
    I (35) boot.esp32c5: SPI Flash Size : 4MB
    I (38) boot: Enabling RNG early entropy source...
    I (43) boot: Partition Table:
    I (45) boot: ## Label Usage Type ST Offset Length
    I (52) boot: 0 otadata OTA data 01 00 00009000 00002000
    I (58) boot: 1 nvs WiFi data 01 02 0000b000 00005000
    I (65) boot: 2 app0 OTA app 00 10 00010000 001d0000
    I (71) boot: 3 app1 OTA app 00 11 001e0000 001d0000
    I (78) boot: 4 lfs Unknown data 01 82 003b0000 00050000
    I (85) boot: End of partition table
    I (88) boot: No factory image, trying OTA 0
    I (92) esp_image: segment 0: paddr=00010020 vaddr=420d0020 size=342b8h (213688) map
    I (136) esp_image: segment 1: paddr=000442e0 vaddr=40800000 size=0bd38h ( 48440) load
    I (147) esp_image: segment 2: paddr=00050020 vaddr=42000020 size=cdf84h (843652) map
    I (292) esp_image: segment 3: paddr=0011dfac vaddr=4080bd38 size=0ca40h ( 51776) load
    I (303) esp_image: segment 4: paddr=0012a9f4 vaddr=40818780 size=04f8ch ( 20364) load
    I (308) esp_image: segment 5: paddr=0012f988 vaddr=50000000 size=000a4h ( 164) load
    I (314) boot: Loaded app from partition at offset 0x10000
    I (341) boot: Set actual ota_seq=1 in otadata[0]
    I (341) boot: Disabling RNG early entropy source...
    I (351) MSPI Timing: tuning success, best point is index 4
    I (351) MSPI Timing: Flash timing tuning index: 4
    I (352) cpu_start: Unicore app
    I (375) cpu_start: Pro cpu start user code
    I (376) cpu_start: cpu freq: 240000000 Hz
    I (376) app_init: Application information:
    I (376) app_init: Project name: OpenBeken
    I (380) app_init: App version: 1.18.171_4M
    I (384) app_init: Compile time: Sep 7 2025 08:12:21
    I (389) app_init: ELF file SHA256: 9c3ccd3d6...
    I (393) app_init: ESP-IDF: v5.5.1
    I (397) efuse_init: Min chip rev: v1.0
    I (401) efuse_init: Max chip rev: v1.99
    I (405) efuse_init: Chip rev: v1.0
    I (409) heap_init: Initializing. RAM available for dynamic allocation:
    I (415) heap_init: At 40828810 len 00033D90 (207 KiB): RAM
    I (420) heap_init: At 4085C5A0 len 00002F58 (11 KiB): RAM
    I (425) heap_init: At 500000A4 len 00003F44 (15 KiB): RTCRAM
    I (431) spi_flash: detected chip: gd
    I (434) spi_flash: flash io: dio
    W (437) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
    I (449) sleep_gpio: Configure to isolate all GPIO pins in sleep state
    I (455) sleep_gpio: Enable automatic switching of GPIO sleep configuration
    I (473) pm: Frequency switching config: CPU_MAX: 240, APB_MAX: 80, APB_MIN: 48, Light sleep: DISABLED
    I (474) coexist: coex firmware version: b0bcc39
    I (475) coexist: coexist rom version 78e5c6e42
    I (480) main_task: Started on CPU0
    I (480) main_task: Calling app_main()
    I (480) temperature_sensor: Range [-10°C ~ 80°C], error < 1°C
    OpenESP32C5, version 1.18.171_4M
    Entering initLog()...
    Commands registered!
    initLog() done!
    Info:MAIN:Main_Init_Before_Delay
    Warn:CFG:CFG_InitAndLoad: Config crc or ident mismatch. Default config will be loaded.
    Info:CFG:CFG_SetDefaultLEDCorrectionTabMain_Init_Before_Delay done
    Main_Init_Delay
    Main_Init_Delay done
    le: setting defaults
    Error:CMD:lfs is absent
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Error:HTTP:Created HTTP SV thread with (stack=2048)
    Info:MQTT:MQTT_RegisterCallback called for bT esp75811560/ subT esp75811560/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT esp/ subT esp/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/esp75811560/ subT cmnd/esp75811560/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/esp/ subT cmnd/esp/+
    Info:MQTT:MQTT_RegisterCallback called for bT esp75811560/ subT esp75811560/+/get
    Info:MQTT:MQTT_RegisterCallback called for bT homeassistant/ subT homeassistant/+
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Error:CMD:LFS_ReadFile: lfs is absent
    Info:CMD:CMD_StartScript: failed to get file autoexec.bat
    Info:BERRY:[berry init]
    Info:BERRY:[berry start]
    Info:BERRY:[berry end]
    Info:BERRY:[berry start]
    Info:BERRY:be_pcall fail, retcode 3
    Info:BERRY:top=3
    Info:BERRY:stack traceback:
    Info:BERRY:
    Info:BERRY:string
    Info:BERRY::1:
    Info:BERRY: in function `
    Info:BERRY:main
    Info:BERRY:`
    Info:BERRY:stack[1] = type='function' ()
    Info:BERRY:stack[2] = type='string' (import_error)
    Info:BERRY:stack[3] = type='string' (module 'autoexec' not found)
    Info:BERRY:[berry end]
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 0/s, free 195788, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 2, idle 0/s, free 195788, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 3, idle 0/s, free 195788, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 4, idle 0/s, free 195788, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    I (5620) pp: pp rom version: 78a72e9d5
    I (5620) net80211: net80211 rom version: 78a72e9d5
    Info:MAIN:Time 5, idle 0/s, free 195788, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    I (5630) wifi:wifi driver task: 408326cc, prio:23, stack:3072, core=0
    I (5630) wifi:wifi firmware version: 14da9b7
    I (5630) wifi:wifi certification version: v7.0
    I (5640) wifi:config NVS flash: disabled
    I (5640) wifi:config nano formatting: enabled
    I (5640) wifi:mac_version:HAL_MAC_ESP32AX_752MP_ECO2,ut_version:N, band mode:0x3
    I (5650) wifi:Init data frame dynamic rx buffer num: 32
    I (5660) wifi:Init static rx mgmt buffer num: 5
    I (5660) wifi:Init management short buffer num: 32
    I (5670) wifi:Init dynamic tx buffer num: 32
    I (5670) wifi:Init static tx FG buffer num: 2
    I (5670) wifi:Init static rx buffer size: 1700 (rxctrl:64, csi:512)
    I (5680) wifi:Init static rx buffer num: 10
    I (5680) wifi:Init dynamic rx buffer num: 32
    I (5690) wifi_init: rx ba win: 6
    I (5690) wifi_init: accept mbox: 6
    I (5690) wifi_init: tcpip mbox: 32
    I (5700) wifi_init: udp mbox: 6
    I (5700) wifi_init: tcp mbox: 6
    I (5700) wifi_init: tcp tx win: 5760
    I (5710) wifi_init: tcp rx win: 5760
    I (5710) wifi_init: tcp mss: 1440
    I (5710) wifi_init: WiFi IRAM OP enabled
    I (5720) wifi_init: WiFi RX IRAM OP enabled
    I (5720) wifi_init: WiFi SLP IRAM OP enabled
    I (5720) phy_init: phy_version 106,706cee23,Aug 27 2025,19:17:04
    W (5730) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
    W (6290) wifi:WDEV_RXCCK_DELAY:960
    W (6290) wifi:WDEV_RXOFDM_DELAY:259
    W (6290) wifi:WDEV_RX_11G_OFDM_DELAY:260
    W (6290) wifi:WDEV_TXCCK_DELAY:630
    W (6290) wifi:WDEV_TXOFDM_DELAY:94
    W (6300) wifi:ACK_TAB0 :0x 90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
    W (6300) wifi:CTS_TAB0 :0x 90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
    W (6310) wifi:WDEVBEAMFORMCONF:0x61d7120, HE_BF_RPT_RA_SET_OPT:1
    W (6320) wifi:WDEVVHTBEAMFORMCONF: 0x61d7120, WDEV_VHT_BEAMFORMEE_ENA: 1, WDEV_VHT_NG_SEL: 0
    W (6330) wifi:(agc)0x600a7128:0xd21f0c20, min.avgNF:0xce->0xd2(dB), RCalCount:0x1f0, min.RRssi:0xc20(-62.00)
    W (6340) wifi:MODEM_SYSCON_WIFI_BB_CFG_REG(0x600a9c18):0x10003802
    W (6340) wifi:(phy)rate:0x0( LP-1Mbps), pwr:20, txing:20
    W (6350) wifi:(phy)rate:0x1( LP-2Mbps), pwr:20, txing:20
    W (6350) wifi:(phy)rate:0x2(LP-5.5Mbps), pwr:20, txing:20
    W (6360) wifi:(phy)rate:0x3( LP-11Mbps), pwr:20, txing:20
    W (6360) wifi:(phy)rate:0x5( SP-2Mbps), pwr:20, txing:20
    W (6370) wifi:(phy)rate:0x6(SP-5.5Mbps), pwr:20, txing:20
    W (6370) wifi:(phy)rate:0x7( SP-11Mbps), pwr:20, txing:20
    W (6380) wifi:(phy)rate:0x8( 48Mbps), pwr:17, txing:17
    W (6380) wifi:(phy)rate:0x9( 24Mbps), pwr:19, txing:19
    W (6390) wifi:(phy)rate:0xa( 12Mbps), pwr:19, txing:19
    W (6390) wifi:(phy)rate:0xb( 6Mbps), pwr:19, txing:19
    W (6400) wifi:(phy)rate:0xc( 54Mbps), pwr:17, txing:17
    W (6400) wifi:(phy)rate:0xd( 36Mbps), pwr:19, txing:19
    W (6410) wifi:(phy)rate:0xe( 18Mbps), pwr:19, txing:19
    W (6410) wifi:(phy)rate:0xf( 9Mbps), pwr:19, txing:19
    W (6420) wifi:(phy)rate:0x10, mcs:0x0, pwr(bw20:19, bw40:18), txing:19, HE pwr(bw20:19), txing:19
    W (6430) wifi:(phy)rate:0x11, mcs:0x1, pwr(bw20:19, bw40:18), txing:19, HE pwr(bw20:19), txing:19
    W (6440) wifi:(phy)rate:0x12, mcs:0x2, pwr(bw20:18, bw40:17), txing:18, HE pwr(bw20:18), txing:18
    W (6440) wifi:(phy)rate:0x13, mcs:0x3, pwr(bw20:18, bw40:17), txing:18, HE pwr(bw20:18), txing:18
    W (6450) wifi:(phy)rate:0x14, mcs:0x4, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (6460) wifi:(phy)rate:0x15, mcs:0x5, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (6470) wifi:(phy)rate:0x16, mcs:0x6, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (6480) wifi:(phy)rate:0x17, mcs:0x7, pwr(bw20:17, bw40:16), txing:17, HE pwr(bw20:17), txing:17
    W (6490) wifi:(phy)rate:0x18, mcs:0x8, pwr(bw20:19, bw40:16), txing:19, HE pwr(bw20:16), txing:16
    W (6500) wifi:(phy)rate:0x19, mcs:0x9, pwr(bw20:18, bw40:16), txing:18, HE pwr(bw20:15), txing:15
    W (6500) wifi:(hal)co_hosted_bss:0, max_indicator:0, bitmask:0xff, mBSSIDsEnable:0
    I (6510) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).

    I (6520) wifi:mode : sta (3c:dc:75:81:15:60) + softAP (3c:dc:75:81:15:61)
    I (6520) wifi:enable tsf
    W (6530) wifi:(BB)enable busy check(0x18), disable idle check(0xaa)
    W (6530) wifi:11ax/11ac mode can not work under phy bw 40M, the sta 2G phymode changed to 11N
    W (6540) wifi:11ax/11ac mode can not work under phy bw 40M, the sta 5G phymode changed to 11N
    I (6550) wifi:Total power save buffer number: 16
    I (6550) wifi:Init max length of beacon: 752/752
    I (6560) wifi:Init max length of beacon: 752/752
    I (6560) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
    Info:MAIN:Time 6, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:MAIN:Time 7, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 8, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 9, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    +--------------- net device info ------------+
    |netif type : AP |
    W (11580) wifi:Haven't to connect to a suitable AP now!
    |netif rssi = 0 |
    |netif ip = 192.168.4.1 |
    Info:MAIN:Time 10, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    |netif mask = 255.255.255.0 |
    |netif gateway = 192.168.4.1 |
    |netif mac : [3c] |
    +--------------------------------------------+
    Info:MAIN:Time 11, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 12, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 13, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 14, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 15, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 16, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 17, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 18, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0
    Info:MAIN:Time 19, idle 0/s, free 152120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0


    ESP32C5 device web interface with system data and action buttons

    Added after 17 [minutes]:

    MQTT connects and I can toggle fake LED from HA without crash (unlike ESP8266)
  • ADVERTISEMENT
  • #220 21687669
    p.kaczmarek2
    Moderator Smart Home
    I've made a longer ESP32-S3 presentation with YT video:
    [YT] ESP32-S3-Relay-6CH six relays controller - schematic, flashing, Home Assistant
    Helpful post? Buy me a coffee.
  • #221 21689071
    p.kaczmarek2
    Moderator Smart Home
    @insmod two questions, maybe you know something more than me. ESP32 OBK. I am adding DMX UART send backend.
    1.
    Code: C / C++
    Log in, to see the code

    Why repeated calls to HAL_UART_Init cause here:
    
    
    assert failed: spinlock_acquire spinlock.h:142 (lock->count == 0)
    
    
    Backtrace: 0x4008b009:0x3ffcaff0 0x4008afd1:0x3ffcb010 0x40092b4d:0x3ffcb030 0x4008bd9e:0x3ffcb150 0x4008a8ce:0x3ffcb180 0x4008ac3e:0x3ffcb1c0 0x40116a68:0x3ffcb200 0x400d8685:0x3ffcb250
    
    
    

    NOTE: It does not happen if I comment out HAL_UART_Init

    2. Why this freezes?
    
    
    void HAL_UART_Flush(void)
    {
    	uart_flush(uartnum);
    }
    


    Context: PR 1794.

    NOTE: The best so far I got is this:
    Code: C / C++
    Log in, to see the code

    but it sometimes works, sometimes does not, due to commented out HAL_UART_Flush.
    Helpful post? Buy me a coffee.
  • #222 21689091
    insmod
    Level 27  
    >>21689071
    Crashes because uart is already initialized in DMX_Init?
    Don't know why flush freezes, and is it really needed? It is only for RX, not TX. For TX use uart_wait_tx_done. (https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/uart.html#_CPPv410uart_flush11uart_port_t)
  • ADVERTISEMENT
  • #223 21689104
    p.kaczmarek2
    Moderator Smart Home
    insmod wrote:
    >>21689071
    Crashes because uart is already initialized in DMX_Init?

    It crashes without this in DMX_Init as well. In general, any second call to that in this DMX_Push crashes. Similar approach works in PIO:
    
    
    
    void sendDMXFrame()
    {
      digitalWrite(RS485_EN_PIN, HIGH);
    
      Serial485.flush();
    
      // BREAK: pull TX low manually
      pinMode(RS485_TX_PIN, OUTPUT);
      digitalWrite(RS485_TX_PIN, LOW);
      delayMicroseconds(120); // ≥88µs
      digitalWrite(RS485_TX_PIN, HIGH);
      delayMicroseconds(12); // MAB ≥8µs
    
      // restore UART and send DMX data
      Serial485.begin(250000, SERIAL_8N2, RS485_RX_PIN, RS485_TX_PIN);
      Serial485.write(dmxBuffer, sizeof(dmxBuffer));
      Serial485.flush();
    }
    

    Probably I could investigate exactly what's done there under the hood, but still wanted to get faster approach.

    insmod wrote:
    >>21689071 For TX use uart_wait_tx_done. (https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/uart.html#_CPPv410uart_flush11uart_port_t)

    I will try

    Added after 1 [hours] 45 [minutes]:

    UPDATE: DMX works, more or less. I am still not sure why it seems that data seems to be applied with second call, but i will resolve it soon, hopefully. I will also finish LED backend split.

    Added after 36 [minutes]:

    I am trying hack from here:
    https://github.com/sparkfun/SparkFunDMX/blob/...e79a09a54274d4649784/src/SparkFunDMX.cpp#L116
    But it still shows data from previous Apply in the next Apply, it is very confusing when turning on and off the light.

    Here is a current state:
    Code: C / C++
    Log in, to see the code

    The code in WINDOWS block crashes ESP32 due to repeated UART init. The code in else works incorrectly (second call pushes data). Probably that's as far as I can go today.

    Added after 44 [seconds]:

    It would help a lot to scope the UART but I am not sure if I have time to set this up tonight.
    Helpful post? Buy me a coffee.
  • #224 21690309
    insmod
    Level 27  
    Since what you need is a break signal, what about uart_write_bytes_with_break? https://docs.espressif.com/projects/esp-idf/e...rite_bytes_with_break11uart_port_tPKv6size_ti

    And what do you think about caching toolchains in workflow to speed-up build process? In some cases it builds faster by more than 1 minute. Full build of everything is only 6m 36s (https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/17720392809)
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1793
    https://www.elektroda.com/rtvforum/topic4092465-300.html#21687572
  • #225 21690631
    p.kaczmarek2
    Moderator Smart Home
    I didn't know about uart_write_bytes_with_break, I may check it soon.

    I've accepted cache PR, good idea.

    For now, I'm still focusing on LEDs.

    What kind of UI do we need for RGBW strip? Should we allow RGB and W control at the same time? Or show RGBCW and try to emulate cool with RGB like on bulbs...
    Helpful post? Buy me a coffee.
  • #226 21690682
    max4elektroda
    Level 21  
    insmod wrote:
    And what do you think about caching toolchains in workflow to speed-up build process? In some cases it builds faster by more than 1 minute. Full build of everything is only 6m 36s (https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/17720392809)
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1793


    Can it be this somehow broke Windows simulator build in "my" repo @insmod ?!? It works o.k. (e.g. in PR#7169), but for the same "local" I get:

    Project "D:\a\OpenBK7231T_App\OpenBK7231T_App\openBeken_win32_mvsc2017.vcxproj" on node 1 (default targets).
    C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17763.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [D:\a\OpenBK7231T_App\OpenBK7231T_App\openBeken_win32_mvsc2017.vcxproj]
    Done Building Project "D:\a\OpenBK7231T_App\OpenBK7231T_App\openBeken_win32_mvsc2017.vcxproj" (default targets) -- FAILED.

    Any hint? Thanks!
  • #227 21690726
    insmod
    Level 27  
    >>21690682
    It's the same for me.
    Downgrade windows-latest to windows-2022 in workflow?
  • #228 21690741
    max4elektroda
    Level 21  
    insmod wrote:
    Downgrade windows-latest to windows-2022 in workflow?

    This seems to work, building Simulator worked with "windows-2022"

    diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml
    index bff6add79..8dafd1df5 100644
    --- a/.github/workflows/workflow.yaml
    +++ b/.github/workflows/workflow.yaml
    @@ -58,7 +58,7 @@ jobs:
       build2:
         name: Build Simulator
         needs: refs
    -    runs-on: windows-latest
    +    runs-on: windows-2022
     
         steps:
         - name: Checkout repository


    Added after 9 [minutes]:

    And 6:35 for complete build is impressive. Thanks!

    Calendar and stopwatch icons with text “12 minutes ago” and “6m 35s”

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.
Summary generated by the language model.
ADVERTISEMENT