ESP8266 doesn't save Wifi settings

My ESP8266 (Wifi Manager) doesn’t save the Wifi settings.

When I power it up I can configure it with the wifi manager and it works. But after pulling the cord and plugging it in again, I have to configure it again.

Two modules loaded: RF and ONOFF


I only tried pin D1 yet and I use SRX882 and STX882.

Hello,

couyld you indicate the version used?

The latest dev version, pulled about a week ago.

I will try to reproduce with my nodemcu

I tried the current master version now. v0.9.1

Unfortunately the same thing. Works after configuration. Must be set up again after a reboot.

I have just tested it with a nodemcu v2 and a esp32 geekcreit and the parameters are well saved, the two boards reconnect automaticaly after a disconnection and a wait of 10s.

Are you using platformio so as to upload?

I use the arduino ide

Could you try with this version of wifimanager

If not working I advise to go with platformio

Ok, so I went straight to platformio.

It is able to compile but I cannot upload it.

In the arduino ide I had to choose /dev/cu.wchusbserial-1410

So I added this to the the platformio env section

[env:nodemcuv2]
framework = ${common.framework}
platform = espressif8266
upload_port = /dev/cu.wchusbserial-1410

Even with this change I get an error:

  File "/Users/*user*/.platformio/penv/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.wchusbserial-1410: [Errno 2] No such file or directory: '/dev/cu.wchusbserial-1410'

What am I doing wrong. I pressed the flash button at the nodemcu.

EDIT: I still don’t know whats wrong with that port connection, because it works with arduino ide. But I now flashed it with Platformio and my FTDI adapter.

EDIT2: Ok so after flashing it with the FTDI adapter and Platformio the gateway immediatly turned online again after restarting it.
If you know what’s the issue here, I would be glad if you tell me.

Some new experiences:

Non of the pins D1, D2 or D3 work for me with the NodeMcu board.

If I flash with platformio and FTDI and D1 for receive, than the Wifi settings again don’t persist.
D2, D3: Wifi settings persist, but now RF signals.

The Rf module works, because I get RF signals with my ESP32.

Maybe set the upload port like this for example :
upload_port = COM[5]

If you don’t indicate the upload port platformio should choose the one with a board or propose you a choice if several boards are connected.
I will enrich the examples of platformio.ini.

Did you changed the pins in config_RF.h accordingly ?
Be carrefull D3 doesn’t equal to 3

I use a mac (no com ports) and wchusb… is the right Port because I was able to upload with Arduino ide.

Yes, I did and for example I used GPIO0 for D3.

I made a modification on the development branch that should help with the issue about wifimanager not saving the credentials.
It was due to error on formating the esp file system.

Hmm seems to correct only for esp32…

So the issue persists for the esp8266, right?

I will publish a correction for esp8266 also.

It could be also that you selected a wrong flash size when uploading.

Some info about this:


I used 4m (no spiffs).

However I have a new issue. With the newest dev version I can’t compile for the nodemcu any more. Still works for esp32.

/Users/user/Downloads/OpenMQTTGateway-development/main/main.ino: In function 'void setup_wifimanager(bool)':
/Users/user/Downloads/OpenMQTTGateway-development/main/main.ino:663:26: error: no matching function for call to 'fs::FS::begin(bool)'
     if (SPIFFS.begin(true))

BTW: I noticed that there are different versions of the nodemcu out there. I have one with a CH340 chip. Seems like the one with a cp2102 chip would be better. Which one do you have?

Yes the build is broken for esp8266. Just remove the true inside the parenthesis to make it build. But you will see the same behaviour than before.
I think you need to set an spiffs to have the wifi parameters storage.