BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Updating OTA is amazing

#128

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

0 Likes

#129

Yes I did but I still get the same error.

0 Likes

#130

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?

0 Likes

#131

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>
0 Likes

#132

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

#133

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.

0 Likes

OTA on wemos D1 mini
#134

@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?

0 Likes

#135

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.

0 Likes

#136

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

#137

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 ?

0 Likes

#138

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

#139

ok - thanks, thats answers it pretty clear.

0 Likes

#140

Yes when uploading new sketches after Arduino OTA

0 Likes

#141

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

0 Likes

#142

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

#143

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

0 Likes

#144

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

0 Likes

#145

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

0 Likes

#146

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

0 Likes

#147

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?

0 Likes