-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTA workaround for missing Arduino IDE OTA Network Port Name #85
Comments
Issue: Losing OTA network name/port/connection after a LAN upload in Arduino IDE or an "[ERROR]: No Answer" result during OTA upload. I'm a newbie and I've been pulling my hair on this one. I gathered solutions I could get my hands on to correct this issue - gathered them into a workable workaround. I hope this will help someone who is in the same predicament as I am. As an example I am uploading a simple sketch (of blinking / breathing LEDs) to show how to incorporate OTA upload functionality into a sketch. Please take note of the accompanying comments in the Arduino sketch to guide you in resolving some common issues. Thanks! `/*
*/ const char* mDNS_name = "myesp8266-ssid"; // we need to define our ssid explicitly // ============================================== #include <ESP8266WiFi.h> // may be shared with your sketch // ============================================== void setup() { // ============================================== Serial.begin(115200); while (WiFi.waitForConnectResult() != WL_CONNECTED) { // Port defaults to 8266 // Hostname defaults to esp8266-[ChipID] // No authentication by default // Password can be set with it's md5 value as well ArduinoOTA.onStart( {
}); /* We make sure mDNS service is setup, running, and accepting mDNS queries before ArduinoOTA.begin(); // ============================================== // ============================================== pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output // ============================================== } void loop() { // ============================================== MDNS.update(); // update our dynamic IP just in case our lease expired // ============================================== // ============================================== for(int j=0; j<6; j++){ digitalWrite(LED_BUILTIN_AUX, LOW); for(int j=0; j<6; j++){
} digitalWrite(LED_BUILTIN_AUX, LOW); // ============================================== |
No description provided.
The text was updated successfully, but these errors were encountered: