Coder Social home page Coder Social logo

Comments (6)

nrwiersma avatar nrwiersma commented on August 24, 2024 2

Yes, that confirms my suspicion that it is a space problem. The best plan is to abstract the storage of WiFi and config, allowing us to store them on the SPIFFS. I will try to start getting this going this week.

Sorry, this is not a use case I even considered when writing the library. Hope to have a fix for you soonish.

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024 1

My guess would have been that Simplified Chinese is Unicode, and i have not idea how that would look in UTF8. The ESP8266/32 only supports connecting Wifi with a char*, so there must be some conversion there that makes this possible.

The AP POST converts the SSID from json string to char* using ssid.c_str(). This may be the source of the issue. See L118 of ConfigManager.cpp.

That is at least a place to start looking.

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024 1

After reading very quickly on the subject, it seems 1 Simplified Chinese character gets encoded as 9 char characters, making your test 45 characters, outstripping the arbitrary 32 char limit I put on it (I was obviously not thinking about this use case when I set the limit). As a first test could you remove the last 2 characters, which should then work, if I am anywhere near right.

If this is the case, I have an idea that might solve this issue. A friend of mine pointed out that EEPROM is not necessarily the only place to put this, we also have the SPIFFS that we can store info in, perhaps in json. There would be a slight performance hit here (json conversion) but it would probably not be that bad. It would be possible to make an interface for this storage allowing us to swap the implementation out, and have the current EEPROM version, and the SPIFFS version which would be more flexible for this kind of use case.

from configmanager.

nrwiersma avatar nrwiersma commented on August 24, 2024

Hi,

Sorry for the delay getting back to you.

The SSID is saved as a char[32] but to be honest, I have no idea how Simplified Chinese will interact with a char. Can you perhaps inform me?

Thanks,
Nick

from configmanager.

lvturner avatar lvturner commented on August 24, 2024

Hey Nick,

No worries man, if I expected an instant response - I'd expect to be paying a support contract too :D

It's been a while since I've done any of this, I'll see if I can figure something out/read up on it and get back to you. I suspect the Chinese characters in UTF8 just aren't being coerced neatly to a char.

Best

Lee

from configmanager.

lvturner avatar lvturner commented on August 24, 2024

Seemed a bit better this time...

entry 0x40080310

Reading saved configuration
Waiting for WiFi to connect....................
Connection timed out
Starting Access Point

Note that for this test I actually set up my phone as a pair AP (as renaming my home wifi is quite disruptive so keen to avoid), so I'm not that surprised that the connection timed out.

Hope this helps!

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.