logo elektroda
logo elektroda
X
logo elektroda

Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

divadiow 1764 50
ADVERTISEMENT
  • #31 21597924
    max4elektroda
    Level 21  
    DeDaMrAz wrote:
    Again to ping @max4elektroda whose idea on that topic I liked (not tested by me).

    I heard your ping, @DeDaMrAz, but will not be able to answer the ping before next week. First my notebook died and this weekend I will not be able to afford much time.
  • ADVERTISEMENT
  • #32 21599164
    divadiow
    Level 35  
    Tasmota info
    Code: Text
    Log in, to see the code


    2mb OBK after esptool.exe erase_flash. This is on ESP-02S in BSD48 UK plug referenced earlier.
    Code: Text
    Log in, to see the code


    is this because the flash is DOUT and not QIO?
  • ADVERTISEMENT
  • #33 21599187
    insmod
    Level 27  
    >>21599164 Try to play with esptool --flash-mode argument
  • #34 21599222
    divadiow
    Level 35  
    insmod wrote:
    Try to play with esptool --flash-mode argument


    ah I see, cool. switching device for a sec

    Code: Text
    Log in, to see the code


    1mb mini module from GU10 bulb - https://discourse.superhouse.tv/t/flashing-an-esp-8285-on-a-wiz-bulb/741/4

    Code: Text
    Log in, to see the code


    first boot + client join AP. says QIO but boots.
    Code: Text
    Log in, to see the code


    I see 03 here in post-flash dump = DOUT
    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

    Added after 7 [minutes]:

    1mb still. LFS OK. These two drivers start.

    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices
    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

    Added after 8 [minutes]:

    memory with no drivers started
    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • #35 21599242
    DeDaMrAz
    Level 20  
    divadiow wrote:
    memory with no drivers started


    So more or less same as 8266, right? Am I seeing this right you are running OBK on 8285??
  • #36 21599254
    divadiow
    Level 35  
    >>21599242

    same thing aren't they but 8285 has internal flash and 8266 supports external flash
    DeDaMrAz wrote:
    Am I seeing this right you are running OBK on 8285??

    yes
  • #37 21599257
    p.kaczmarek2
    Moderator Smart Home
    Both ESP8266 and ESP8285 have the same amount of RAM. The difference is the flash chip - ESP8285 has built-in 1MB and ESP8266 has external connected via SPI.
    Helpful post? Buy me a coffee.
  • #38 21599272
    divadiow
    Level 35  
    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code


    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

    Added after 9 [hours] 20 [minutes]:

    https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/16106020194

    used ESP-Flasher.exe - ie not esptool cmd

    Code: Text
    Log in, to see the code


    Added after 11 [hours] 58 [minutes]:

    I don't think BL0937 is working. Tried on ESP-02S real device and NodeMCU with Arduino PWM sketch thing https://www.elektroda.com/rtvforum/topic4109046.html

    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices
  • Helpful post
    #39 21601376
    p.kaczmarek2
    Moderator Smart Home
    I am adding "upload as GZIP" button along with simple gzip header handling in the firmware code. Browser will decode file on the fly.
    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

    Added after 2 [minutes]:

    Here is comparison with and without compression:

    Flashing OpenBeken/OBK firmware to ESP8266/ESP8285 devices

    Added after 3 [hours] 53 [minutes]:

    LFS GZIP Topic: https://www.elektroda.com/rtvforum/topic4129516.html
    Helpful post? Buy me a coffee.
  • #40 21614400
    divadiow
    Level 35  
    no WPA3 success on OpenESP8266
    Code: Text
    Log in, to see the code
  • #41 21631565
    divadiow
    Level 35  
    hmm. fresh clone
    Error dialog: clone failed because a submodule points to a missing commit.

    Code: Text
    Log in, to see the code


    Added after 21 [minutes]:

    just cloned without submodules
    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • #42 21638769
    divadiow
    Level 35  
    OTA interface for ESP8266 with buttons and update file selection


    insmod wrote:
    + breaking change for esp8266, added 3 missing pins (io9, io10 and io16).


    before
    GPIO configuration interface with all values set to 0

    after
    Configuration table with dropdown settings for IO0–IO16 pins



    free mem 1.18.156
    Code: Text
    Log in, to see the code


    Added after 3 [minutes]:

    wasn't able to OTA from 1.18.154 to 1.18.156. Wipe and UART 1.18.156 -> 1.18.155 =

    web app REST

    Code: Text
    Log in, to see the code
  • #43 21654350
    divadiow
    Level 35  
    just playing with Sonoff Basic R2 breaker. 1mb ESP8285. 1.18.168

    toggling relay from HA, OBK GUI and physical button with MQTT enabled produces this crash:

    Code: Text
    Log in, to see the code
  • #44 21691103
    p.kaczmarek2
    Moderator Smart Home
    We've got such report:
    Quote:

    tilator
    opened 6 hours ago · edited by tilator
    Describe the bug
    When I have DHT11 connected and configured to GPIO14, it reports it on the home page as connected to pin 10.

    Firmware:

    1.18.163
    ESP8266 (Sonoff Basic)
    And not any values are given.

    I did also try to config it other pins and it seems to report every one 4 smaller than what it is configured to.

    Same HW did work just fine using Tasmota. I just would like to change it to OpenESP.
    Helpful post? Buy me a coffee.
  • #45 21691124
    insmod
    Level 27  
    OpenESP8266 is pretty unstable, i wouldn't recommend using it.
    DHT probably reports pin index, not pin name.
  • #47 21691144
    Tilator
    Level 11  
    >>21691103

    I tested it a bit more.

    While DHT11 is configured to pin 1-5, it's reported correctly on home page.

    When configured to pin 9-10, it's reported to be connected to pin 6-7.

    If I configure it to pins 14-16, it's reported to pin 10-12.
  • #48 21691147
    divadiow
    Level 35  
    isn't it just because there are 4 pins not available above IO5

    Screenshot showing IO pin settings, with IO9 and IO10 marked in red.
  • #49 21691155
    Tilator
    Level 11  
    divadiow wrote:
    isn't it just because there are 4 pins not available above IO5


    That's how I find it too. It reports config page list index on home page and only pins 0-5 correspond the index.

    I did also try to connect the sensor with pin 14 using console command "setPinRole 14 DHT11", but it was not possible. Max pin value seems to be 13.
  • #50 21691202
    insmod
    Level 27  
    >>21691155
    setPinRole sets role at pin index.
    So, pin with index №12 is IO16 on ESP8266.
    Pin with index 6 is IO9.
    All of this is because IO6-IO8 are flash pins and can't be used, and were therefore excluded from pin list.
  • #51 21691217
    Tilator
    Level 11  
    >>21691202

    setPinRole 11 DHT11 does put it to IO15 on config page.

Topic summary

The discussion centers on flashing a 2MB OpenBeken/OBK firmware onto a 4MB ESP8266 board. Initial boot logs confirm successful recognition of the 4MB flash size with a detailed partition table including OTA data, WiFi NVS, two OTA app partitions, and an LFS partition. Users report smooth flashing and stable WiFi connectivity without resets after manual reboot. GPIO2 functionality is confirmed. Subsequent updates include added PWM and UART support, with UART implemented via a task-based polling method to avoid crashes seen with interrupt-driven approaches. PWM operates inverted but functional, with PWM_n also working as expected. OTA updates remain non-functional despite passing image checks. Adjustments to QuickTick timer handling and stack size were necessary to prevent crashes. Disabling PWM on GPIO0 resolved bootloop issues. Overall, the firmware demonstrates improved hardware compatibility and peripheral support on the 4MB ESP8266 platform.
Summary generated by the language model.
ADVERTISEMENT