Updating OTA is amazing

did you power cycle after the first OTA? That can help.

Yes I did but I still get the same error.

Hmm. I don’t know. Put

ArduinoOTA.setHostname("myesp8266");

before ArduinoOTA.begin(); in the blynk sketch

This names your esp. Then check the network port to make sure you can actually see it under the new name.

Just to confirm the OTA works from the ArduinoOTA example and when you try to upload again it fails. Right?

Maybe add other bits from the Arduino OTA code to the blynk and see if it fixes it. Like WiFi.mode(WIFI_STA); Also

#include <WiFiUdp.h>
#include <ESP8266mDNS.h>

Here is a minimal template with blynk that I use to start all new projects.

#include <ArduinoOTA.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxx";
char ssid[] = "xxxxxxxx"; 
char pass[] = "xxxxxxxx"; 
void setup() {
  WiFi.mode(WIFI_STA);
  Blynk.begin(auth, ssid, pass);
  while (Blynk.connect() == false) {}
  //ArduinoOTA.setHostname("xxxxxxx"); // OPTIONAL
  ArduinoOTA.begin();
}
void loop() {
  Blynk.run();
  ArduinoOTA.handle();
}
3 Likes

Hi - I have OTA on Wemos D1 R2 (ESP8266) working nicely but how do I get access to Serial console ? Any help would be very much appreciated.

@mars do you mean when the WeMos is not connected to a computer or when you are doing the OTA (Termite) update and the WeMos is connected to a computer?

yes - I perform the OTA software update to the Wemos all fine - but then I want to see the Serial Console as I have a series Serial.println statements in the code. Normally I would open the serial monitor in Arduino IDE but that does not work any longer.

It wasn’t a yes or no question it was an either or question.

'1. With ESP connected to a computer?

or

'2. With ESP not connected to a computer?

1 or 2?

One easy way for 2 is to do a find and replace in the IDE changing Serial.print() to terminal.print() and add a Terminal widget to your project.

1 Like

I think I follow - but to be sure I will explain my exact setup. I have my WeMos connect via WiFi to my local Wifi. From my computer using Arduino IDE I do a complie & upload and it performs the process OTA. What I’m not sure about is how I view the outputs from my Serial.println remotely ? can I somehow remote Serial into the Wemos ?

Simple answer is you can’t. @tzapulica has done some work with sockets and I tested it some months ago.

From memory it involves hooking up a second ESP to the rx and tx pins.

1 Like

ok - thanks, thats answers it pretty clear.

Yes when uploading new sketches after Arduino OTA

I tried using your code but it didn`t work. In arduino Ide after compiling I get:

Authenticating…OK
20:49:49 [ERROR]: No response from device

Insteads of using Serial output… why not set up a terminal widget and output everything to that instead… then yo uare truely working remotly.

1 Like

@Jamin indeed, using terminal widget would work :slight_smile:

I also recall someone figured out how to re-router all native Serial comms to the terminal widget. Have a search :slight_smile:

Post number 134 (2 being the status when your ESP is not connected to a PC).

@Costas - thanks Costas I realize you also provided the same advice yesterday. Thank you all for your help on this topic, much appreciated.

so i got literally to the point of uploading this to one of my battery outside sensor nodes and realised it has ESP.sleep in it…

there’s no way this can work with a sleeping ESP is there? can i wake it up or are they ‘dead to the world’ until it finishes counting? or is there?