Chat freely about anything...

User avatar
By S13_Mills
#47498 Hi Everyone,

I have been playing with the Olimex ESP8266-DEV boards for a while (using Arduino IDE) and had no issues with them. I recently purchased some ESP12-Q modules from a local seller (smaller footprint to fit into a project), I flashed them using the NodeMCU 1.0 board settings (1M SPIFFS) in the Arduino IDE, and at first they appeared to work fine using the same code.

However, after between 5 and 10 minutes they would disconnect from the WiFi, and were not able to reconnect until the ESP was reset. This was problematic, because the project includes a button for a user to press which needs to respond instantly.

After digging around and putting in various Serial.println()s to figure out what was going on, I discovered that the WiFi was in STA+AP mode. My application does not require an AP, so I changed it to STA only, and the problem appears to be solved! They have been connected for >12 hours without issue.

For those having the same problem and digging around, before you connect to your WiFi, change the mode to WIFI_STA:

Code: Select allWiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);


I found the Arduino IDE (http://arduino.esp8266.com/versions/1.6.5-990-gc8a63ce/doc/reference.html) reference very useful for getting the commands to diagnose as well.

Hope this is helpful to someone!