Coder Social home page Coder Social logo

Comments (9)

nrwiersma avatar nrwiersma commented on August 24, 2024 1

Hi,

Can you check if this branch works for you. If so I will merge and make a patch release.

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024

Hi,

You are correct. It seems that the EEPROM is not being initialised, even though it should be after ::begin. It could be hardware that is failing here, have you tired on more than 1 ESP32?

from configmanager.

ReneHezser avatar ReneHezser commented on August 24, 2024

Hi,
a second one is behaving exactly the same.
Edit: The "simple" example does the same :-(

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024

Hi,

I would start debugging be running EEPROM:begin() and looking at the bool output, there are logs too. Then run EEPROM:length() and check you get the correct size back.

from configmanager.

ReneHezser avatar ReneHezser commented on August 24, 2024
  Serial.print("eeprom test");
  bool success = EEPROM.begin(0);
  Serial.print(success);
  success = EEPROM.begin(1);
  Serial.print(success);
  uint16_t l = EEPROM.length();
  Serial.print(l);

And the output is:

eeprom test010

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024

Ok,

So digging through the ESP32 EEPROM code, i see the issue. ESP32 has gone a a different way when implementing length than ESP8266. In ESP8266 length tells you the initialised size from begin. In ESP32 it has nothing to do with the size in begin.

I am not sure how to deal with this.

from configmanager.

ReneHezser avatar ReneHezser commented on August 24, 2024

When I commented out lines 379-382, it worked for me.

    // if (EEPROM.length() == 0) {
    //     DebugPrintln(F("WiFi Settings cannot be stored before ConfigManager::begin()"));
    //     return;
    // }

How about a variable that keeps track of the initialization through begin()?

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024

I think i will just disable the check on ESP32. In ESP8266 it is needed to check that EEPROM was actually initialised. Apparently we cannot do that on ESP32.

from configmanager.

ReneHezser avatar ReneHezser commented on August 24, 2024

Thank you. Strange the ESP32 does need special treatment. With this change it does work again.

from configmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.