Chat freely about anything...

User avatar
By AdrianClark
#1879 Hi,

I've developed some custom firmware for a project I'm working on which automatically connects to a defined wireless network and communicates with other machines as both a client and a server. So far it's working really well and does everything I need it to, but for one problem.

Once the chipset has connected to the network one time, after a power cycle it is never able to reconnect, or even do things like list access points. In fact, in order to get it working at all, I need to reflash the firmware with firmware which resets the complete flash memory (not just the 0x00000 and 0x40000 blocks). Because of this, I'm lead to believe that one of the commands (wifi_station_connect) sets a flag in the flash memory which needs to be cleared in order for those other commands again. I guess this is probably done internally by wifi_station_disconnect, but if the power is lost before that command is called, trying to issue the command fails.

Has anyone else experienced this/have any idea how to clear this flag? The only thing missing from the system I've developed is it's unable to reconnect in the event of lost power.

Cheers
User avatar
By igrr
#1884 I definitely had cases when the module lost power while connecting, and still didn't notice issues like you are describing. It might be a firmware issue. Can you share your code or at least some example that reproduces the problem? How often does that issue happen? Can you dump the settings region of the flash after the module comes into such condition?
User avatar
By AdrianClark
#2254 Sorry about the delay in replying, been very busy at work.

I managed to get another chance to look at it today. Since my last post I upgrade the power supply I was using, and I also upgraded the SDK I was building off to v0.9.2.2 (or whatever the one espressif made public), and rewrote my code from scratch based on the AT example in there, and it seems the problem has gone away. Not sure what exactly it was which fixed it (although probably not the power supply), but at least it's working now.