-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
Platform
- Hardware: ESP-12
- Core Version: 2_5_0_BETA2
- Development Env: Arduino IDE (v1.8.8)
- Operating System: Windows
Settings in IDE
- Module: Generic ESP8266
- Flash Mode: DIO
- Flash Size: 1MB
- lwip Variant: v2 Lower Memory
- Reset Method: ck
- Flash Frequency: 40Mhz
- CPU Frequency: 80Mhz
- Upload Using: OTA
- Upload Speed: NA
Problem Description
I have multiple esp modules with OTA configured, all network ports are appearing fine on the bonjour browser. However, on the IDE on startup, all network ports appear but soon except one or two, all others disappear. These is no pattern to the ones which remains, it appears to be random.
Seems to be an IDE / mDNS issue rather than code / sketch related.
MCVE Sketch
//------------------------------------------------------------------------------
#include <ESP8266WiFiMulti.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
ESP8266WiFiMulti WiFiMulti;
WiFiClient espClient;
void setup()
{
Serial.begin(115200);
delay(1000);
WiFiMulti.addAP("SG-GF","xxx");
Serial.println();
Serial.print("Connecting to Wifi: ");
Serial.println(WiFi.SSID());
while(WiFiMulti.run() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
if(WiFiMulti.run() == WL_CONNECTED) {
Serial.println("");
Serial.print("WiFi connected. ");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
ArduinoOTA.setHostname("myesp8266Roaming2");
ArduinoOTA.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH) {
type = "sketch";
} else { // U_SPIFFS
type = "filesystem";
}
Serial.println("Start updating " + type);
});
ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) {
Serial.println("Auth Failed");
} else if (error == OTA_BEGIN_ERROR) {
Serial.println("Begin Failed");
} else if (error == OTA_CONNECT_ERROR) {
Serial.println("Connect Failed");
} else if (error == OTA_RECEIVE_ERROR) {
Serial.println("Receive Failed");
} else if (error == OTA_END_ERROR) {
Serial.println("End Failed");
}
});
ArduinoOTA.begin();
}
void loop()
{
if (WiFiMulti.run() != WL_CONNECTED)
{
Serial.print("Reconnecting to WiFi ");
}
ArduinoOTA.handle();
}
Debug Messages
Serial output on startup ---------------------
[MDNSResponder] _parseQuery: Possible race-condition for host domain detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for service domain myesp8266Roaming.arduino.tcp detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for host domain detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for service domain myesp8266Roaming.arduino.tcp detected while probing.