Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #79350

    neilh20
    Participant

    I’m new to OSP/ESP8266 v3 and really enjoying digging into it, WOW some really great idea. Of course I’m tinkering and looking to possibly extend it slightly.
    One area of concern is on upgrade (OTA) seems it looses its config, including networking.
    I’ve not dug through the OTA yet to see all of its limitations, and the process.
    If it could have its network/pwd + OTC key persistent – seems to me that everything else could be restored after an upgrade. Maybe I’m too hopeful!
    Looking at the EEPROM on v3 hw, I’m wondering what the thinking is for the 256 bytes – and if the plan is to be able to use it through OTA?
    many thanks for any insights.

    #79351

    Ray
    Keymaster

    OTA update itself doesn’t reset WiFi and configurations, what does is the firmware change across major revisions, such as from 2.1.9 to 2.2.0. If you are updating the firmware within the same revision (i.e only the minor revision changes), then it doesn’t reset WiFi and configurations. For example, updating from 2.2.0(1) to 2.2.0(3) will preserve all settings. The main reason updating across major revisions wipes out flash is that usually these major revisions involve major flash memory changes or partition table changes (for example, the file system on earlier firmwares used SPIFFS, now it’s LittleFS), as a result, a flash memory wipe-out is necessary and cannot be avoided.

    For that reason, we try to keep new firmware updates within the same major revision, until it becomes necessary to change the flash layout again.

    There is no EEPROM on ESP8266 — all files and data are stored in flash memory. The module (ESP-12F) has 4MB flash, among which 1MB is used for the firmware, 1MB is for OTA update buffer, and 2MB are left for data.

    #79358

    neilh20
    Participant

    Ok fantastic. Thanks very much. I have been running my v3 ESP8266/DC very successfully. Great features:)

    The reason I was mentioning an EEPROM as it looks to be a new hw resource v3, and was just interested in any thoughts about it.
    The schematic I found on github – https://github.com/OpenSprinkler/OpenSprinkler-Hardware/blob/master/OS/3.0/Master/os33_master.png
    has a device 24C02 and there is a reference to detecting it in the code a
    OpenSprinker.cpp:
    // revision 2 and 3
    if(detect_i2c(EEPROM_I2CADDR)) { // revision 3 has a I2C EEPROM
    hw_rev = 3;
    } else {
    hw_rev = 2;
    }

    #79359

    Ray
    Keymaster

    Ah, ok yes, version 3.3 top board does have a 24C02 EEPROM, but it’s only used in order for the firmware to distinguish between versions 3.2 and 3.3, it’s not used to store any data. What’s going on is that 3.3 and 3.2 are otherwise the same except the pin ordering for the wired Ethernet jack are different (3.3 is for W5500 module and 3.2 is for ENC28J60 module). Without any ‘signature’ the firmware will not be able to tell these two apart. So I added a very cheap I2C EEPROM as a way for the firmware to detect which version it is. There are no other spare GPIO or analog pins for this purpose. So an I2C chip would be the easiest.

    #79391

    neilh20
    Participant

    Ok many thanks for the explanation, nice easy way of differentiating – 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.