To check that I manually restartet my mqtt broker.
This isn’t the issue here, because the omg goes back/stays online after the restart.
It looks like if it loses the wifi connection somehow (eg router restart) it isn’t able to connect to wifi again.
This is repeatable, restarting my router means that the omg goes offline and stays offline.
I pulled the latest dev version and was able to flash directly in vsc over the usb port (did it with FTDI before).
Unfortunately I still have the same issue. If the wifi routers restarts or fails the ESP32 OMG isn’t able to reconnect (again no problem with the ESP8266 running current master). I flashed:
Flashed the same env as you and also removed my attached modules (RF and a LED).
Erased the flash before, just to make sure it’s a clean flash.
So now it’s a “naked” ESP32 with
default_envs = esp32dev-ble
and still after a reboot of my router the ESP32 goes and stays offline.
EDIT: it went online again after a minute.
EDIT2: unfortunately only for a few seconds and than went offline again.
EDIT3: I testet fresh ESP32 board, with the same result. So the first one isn’t defective.
Yep, I saw that. I will try a router restart instead of a wifi restart, if I don’t reproduce the difference could be due to the board or the router network. But as @PetricaM gets also bad result I’m excluding for the moment the network.
Yeap, I already tried it but the behavior is too erratic.
Sometimes ESP32 reconnects, sometimes it doesn’t.
When it doesn’t reconnect I can see (in some of the cases) that the router has fast (2-3 per second) associate and disassociate events in the log. Some other times there’s dead radio silence from the board.
No, it keeps the WiFi data, so it doesn’t build that OMG AP again.
But it (the esp32) connects again after restarting it (power off/on). So same behavior like @PetricaM mentioned. His solution was to add a powerplug which restart the OMG device if the LWT Signal goes offline. Which of course is a nice workaround, but I would prefer a device that is able to reconnect on its own.