Github Devices Community Docs Blog

ESP8266 doesn't save Wifi settings

I think I found the issue but did not try yet.

I fount out that I have a board which has a VU pin. If you have this some sources say you can’t use the Vin pin for 5V.
I hope this doesn’t only solve the RF issue but also the issue mentioned above.

ok it could be due to that.

Regarding the wifi settings savings, I’ve just commited a new change in development branch.
Could you erase your flash, upload, set your parameters by wifi manager and see if your parameters persists upon reboot please?

will do and in the meantime I switched to the VU pin. It’s able to reconnect now, but no RF on pin D3, will go back to D1 as the docs advise.

new error:

/Users/user/Downloads/OpenMQTTGateway-development/main/main.ino: In function 'void setup_wifimanager(bool)':
/Users/user/Downloads/OpenMQTTGateway-development/main/main.ino:708:35: error: 'WifiManager_TimeOut' was not declared in this scope
     wifiManager.setConnectTimeout(WifiManager_TimeOut);

Ok, so because newest dev did not build and I have that new VU pin situation I thought I have master another try.

nodemcu - usb cable (so no ftdi) - arduino ide - master 0.9.1 4m (1m spiffs)

It did not work (save wifi settings) with 0 spiffs, so that made the difference. Also RF works now on D1.

Of course I’m always here to try a new dev version and also would like to know why the spiffs settings makes the difference.

I ve added the missing timeout parameter.

Was able to compile again and it works.

So this is how I am currently able to flash my devices:

  • nodemcu - usb cable - arduino ide - master 0.9.1 4m (1m spiffs) (did not test new dev yet, probably will stick to master for the nodemcu)

  • esp32 - FTDI - platformio - dev 0.9.2 from today

EDIT:
Do I need to set the Board in Platformio or does it automatically set the right device with the .ini file?
I can choose the right port below, but it detects the esp32 as a Adafruit Feather device.
Do I need to add the ESP32 manually in platformio too (like in arduino ide, thought this is automatically done in platformio).

You need to set your board in platformio.ini file .

Nice!

I already did, if this is the right line in the code:

default_envs = esp32dev

or

default_envs = nodemcuv2

The ESP32 (0.9.2beta) goes offline after some time. Have to restart it to reconnect. Is this a known bug?

Those lines enables to choose the good environment. But not the good boards. You should see below a line with board name. The list of noards is available on platformio menu.

Not on v0.9.2. Could you open a separate subject for that.
Mines are running for weeks without restart.

Let me try it one more time, just to be sure it wasn’t me. If it fails again I will open another topic on that.

try with the last development version please

1 Like

Done. Let’s see if it’s still online tomorrow.

Looks good.

BTW is there a way to reset the device to its defaults (deleting WiFi settings to sell it)? Maybe via an mqtt command?
Or an attached button?

Unfortunately the ESP32 went offline again.

I will add a home assistant sensor on that lwt value, to have better data about how long it online.

And also I will give the ESP8266 with master running on it another try, just to make sure this one really days online in my network

Edit: ESP8266 master 0.9.1 stays online for hours.

So this is how the lwt signal looks.

Stays online for a while. Than goes on and off for some time. Ending in offline.

10

for the esp8266 or the esp32?
Please open another thread about that

Ok, thanks. Done: