ESP8266 (Lolin Nodemcu) not reconnect to FritzBox WiFi anymore but it worked for years [SOLVED]

Hi everyone,

I’ve run into a really weird problem with my ESP8266 NodeMCU setup and wanted to see if anyone else has experienced something similar.

I have five NodeMCU boards that I use for sensors and stuff, all programmed with Arduino. They’ve been working great for about seven years (some of them, anyway), but around three weeks ago, they started disconnecting from Wi-Fi and won’t reconnect on their own. It’s only the NodeMCUs having this issue; my Shelly and Sonoff devices are fine.

If I power cycle the NodeMCUs, they reconnect, but only once. If the connection drops again, they’re stuck.

I’ve been pulling my hair out trying to figure it out! The serial monitor only gives me “rc=-2 connection error,” which isn’t very helpful. I couldn’t find anything online about this.

Turns out, the solution was to set my router’s Wi-Fi channel to a fixed number (I used channel 1) instead of leaving it on auto.

I’m guessing that adding a new device at the far end of my Wi-Fi range, with a weak signal, is making my Fritzbox router switch channels frequently. The ESP8266 boards seem to be having trouble keeping up and get stuck in a reconnection loop.

Has anyone seen anything like this?

Anycase I want to share the experience for further references.

Thanks!