Arduino uno programming over OTA with ESP8266

Arduino- nodemcu

RX-TX
TX-RX ?

ore what you mean ?

Itsch:
Arduino- nodemcu

RX-TX
TX-RX ?

ore what you mean ?

yes. the esp sends the hex file over bootloader same way as avrdude

ok but then i must change this in the sketch ?

Itsch:
ok but then i must change this in the sketch ?

for flashing not. but for WiFiLink library yes. so change it in sketch and upload it OTA :slight_smile:

hmm ota upload does not work the same problem "Error flashing the sketch"
or must i upload a ArduinoOTA library? or for what is this?

Itsch:
hmm ota upload does not work the same problem "Error flashing the sketch"
or must i upload a ArduinoOTA library? or for what is this?

no. it has nothing to with ArduinoOTA library.

does the WiFILink library work now over the hardware Serial? try the WebServer example but change the port to 8080. port 80 would stop the WebPanel and OTA web server in firmware

i change
SoftwareSerial Serial1(6, 7); // RX, TX
to
SoftwareSerial Serial1(TX, RX); // RX, TX ?

Itsch:
i change
SoftwareSerial Serial1(6, 7); // RX, TX
to
SoftwareSerial Serial1(TX, RX); // RX, TX ?

no, please

remove SoftwareSerial and change Serial1 to Serial

Serial(6, 7) ore without (6, 7) ?

#include <WiFiLink.h>

WiFiServer server(8080); // will stop the Web Panel web server at port 80

void setup() {
  Serial.begin(115200); // speed must match with BAUDRATE_COMMUNICATION setting in firmware config.h
  WiFi.init(&Serial);
  delay(3000); //wait while WiFiLink firmware connects to WiFi with Web Panel settings

  while (WiFi.status() != WL_CONNECTED) {
    delay(10);
  }

  server.begin();
}


void loop() {
  WiFiClient client = server.available();
  if (client) {
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("
");
          }
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);

    // close the connection:
    client.stop();
  }
}

it have a Problem by upload

Itsch:
it have a Problem by upload

that is the fun of using RX/TX. disconnect the esp8266 before USB upload

ok let's work upload but nothing print to the monitor, or i must change the baud in the sketch to 9600 ?

Itsch:
ok let's work upload but nothing print to the monitor, or i must change the baud in the sketch to 9600 ?

you can't use Serial Monitor. Serial is used by WiFiLink and OTA

Ok but what can i do with this sketch to fix my Ota upload Problem ?

Itsch:
Ok but what can i do with this sketch to fix my Ota upload Problem ?

did you upload the WebServer sketch? doesn't is show a page in browser for "http://:8080/" ?

no it have no connection

Itsch:
no it have no connection

I had 115200 baud in the sketch. maybe you have 9600 baud set in firmware?

ou yes it is original 9600 ? but when i change in your sketch the baud to 9600 its the same Problem

Itsch:
ou yes it is original 9600 ? but when i change in your sketch the baud to 9600 its the same Problem

the web panel works, WiFiLink firmware is connected to a WiFi network, but if you use the IP of the WebPanel with port 8080 it returns "no connection"?