Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

No response from device error

Open iAchyut opened this issue 9 years ago • 44 comments

Please fill the info fields, it helps to get you faster support ;)

if you have a stack dump decode it: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md

for better debug messages: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.md

----------------------------- Remove above -----------------------------

Basic Infos

Hardware

Hardware: ESP8266 module Core Version: Arduino 1.8.2 and Python 2.7 installed (Path added to environment)

Description

Hi I uploaded the OTA bootloader serially and then uploaded blink led program via OTA, it worked for the first time. Now I am trying to upload the same program again but Arduino IDE shows error.

Settings in IDE

Module: Generic ESP8266 Module Flash Size: 4MB CPU Frequency: 80Mhz Flash Mode: DIO Flash Frequency: 40Mhz Reset Method: ck

Sketch

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

const char* ssid = "ABC"; const char* password = "123456789";

void setup() { Serial.begin(115200); Serial.println("Booting"); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); while (WiFi.waitForConnectResult() != WL_CONNECTED) { Serial.println("Connection Failed! Rebooting..."); delay(5000); ESP.restart(); }

// Port defaults to 8266 // ArduinoOTA.setPort(8266);

// Hostname defaults to esp8266-[ChipID] // ArduinoOTA.setHostname("myesp8266");

// No authentication by default // ArduinoOTA.setPassword((const char *)"123");

ArduinoOTA.onStart( { Serial.println("Start"); }); 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(); Serial.println("Ready"); Serial.print("IPess: "); Serial.println(WiFi.localIP()); pinMode(2, OUTPUT); }

void loop() { ArduinoOTA.handle(); digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level) delay(250); // wait for 2 second digitalWrite(2, LOW); // turn the LED off by making the voltage LOW delay(250); }

Debug Messages

[19:02:36]:No Response from device

Although my ESP8266 is present in Tools>PORT option along with the local ip address. (My esp8266 is present in the network but still ArduinoIDE shows No response from Device error every time i upload the same program. ) This program worked for the very first time that too via OTA.

iAchyut avatar May 18 '17 04:05 iAchyut

Once you overwrite the OTA sketch with the Blink sketch, the board will no longer be able to receive OTA. In the sketch you upload you still need to initialize ArduinoOTA and call ArduinoOTA.handle() in the same way it is done in OTA examples.

igrr avatar May 18 '17 08:05 igrr

Sketch I uploaded above is my blink led sketch and it contains arduino Ota. Handle() and arduinoOTA. Moreover my esp8266 is still showing up in Port with local ip address that means my Ota is still working . Uploading same program again causes this error. No response from Device.

iAchyut avatar May 18 '17 09:05 iAchyut

Please upload the sketch again via serial, this time enabling debug options in Tools menu: Debug level: OTA + Updater Debug port: Serial

Then keep serial monitor (not the one from Arduino, use some other software) open while uploading same sketch again over OTA. Once you reproduce the "no response from the device" issue, copy the output from the serial terminal, and attach it here.

igrr avatar May 20 '17 13:05 igrr

@iAchyut any progress with this?

devyte avatar Sep 06 '17 06:09 devyte

I have same error.

Got this output from Putty:

puttyotaerror

odilonafonso avatar Sep 27 '17 21:09 odilonafonso

it is definitely not possible to use OTA on a regular basis.

odilonafonso avatar Oct 18 '17 11:10 odilonafonso

@iAchyut @odilonafonso after flashing over serial, did you physically reset the esp before doing OTA?

devyte avatar Oct 24 '17 05:10 devyte

Hi @iAchyut. Yes. I used OTA in my sketches earlier successfully. After implementing httpupdate, I stopped using OTA. Now I was trying to reuse OTA, as I made some changes to my application, but I can not re-record the firmware with OTA. Even the library examples do not work. Thanks for help.

odilonafonso avatar Oct 24 '17 19:10 odilonafonso

I am experiencing the same problem. My debug output is essentially the same as odilonafonso's. I installed the arduino IDE on a second laptop (and Python 2.7) and I find that I can successfully program OTA with the second machine, so it isn't a sketch problem, it isn't a board or board library problem, but there must somehow be something different in the installations on the two Win10 laptops. I've done a clean install of Python and the IDE on my problem machine, but it has not helped. Any suggestions would be appreciated.

bcmears avatar Nov 01 '17 07:11 bcmears

Following, Any ideas? First OTA worked great, now it shows up in the network list, the ESP is working fine, but I cannot OTA a second time. Have reset all the things. Is it to do with the chosen flash size when doing the OTA?

dtbaker avatar Nov 01 '17 11:11 dtbaker

I gave up. I'm using httpUpdate.

odilonafonso avatar Nov 04 '17 21:11 odilonafonso

  1. For ESP-01 need to set TOOLS>Flash Size>512 ( no SPIFFS)
  2. Take it out of BOOT mode else WDT reset occurs and 2nd run may not work

prasenjit-roy avatar Jan 17 '18 05:01 prasenjit-roy

My ArduinoOTA was working like a charm, until I incorporated it with WifiManager.h. The issue I have is "No Response from the device". I also got crash with Stack Dump, which another issue. capturearduinoota

So I removed the WifiManager.h and went back to the old ArduinoOTA that worked before. But unfortunately, I am having that same problem. Do you think it has something to do with flash memory being occupied by the WifiManager.h? I did some research and said that if you do serial firmware download you basically erase the whole sketch memory space. I am not sure if this is true. Do you think I have to erase the EEPROM? Can you point me to a resource discussing about how the memory is split by Arduino ESP8266? Thanks guys.

Below is some information about flash space availability. image

gibo77 avatar Feb 15 '18 15:02 gibo77

UPDATE: I found the problem!

My laptop that I use to run the Arduino IDE is connected to 5GHz Wifi that is why ArduinoOTA will return "No Response". I knew about this 5GHz Wifi issue before with ESP8266, but that was for Http. Now that I tried the OTA I forgot about it. I did all kind of stunts to figure out the problem. I did SPIFFS format and EEPROM clear 512bytes memory. But this snag had put me to be close to expert on Arduino ESP8266 memory management SPIFFS, PROGMEM and EEPROM.

gibo77 avatar Feb 16 '18 00:02 gibo77

Glad to hear you got yours working. Still no joy for me. I forced the wifi to connect at 2.4GHz and I still get "No Response" from my esp8266. I even tried connecting my laptop through a 2.4GHz dongle. Still won't program. I can program using an old laptop that doesn't have 5 GHz, and it works fine. I think you've gotten me closer to a solution but I don't have it yet.

On Thu, Feb 15, 2018 at 6:39 PM, gibo77 [email protected] wrote:

UPDATE: I found the problem!

My laptop that I use to run the Arduino IDE is connected to 5GHz Wifi that is why ArduinoOTA will return "No Response". I knew about this 5GHz Wifi issue before with ESP8266, but that was for Http. Now that I tried the OTA I forgot about it. I did all kind of stunts to figure out the problem. I did SPIFFS format and EEPROM clear 512bytes memory. But this snag had put me to be close to expert on Arduino ESP8266 memory management SPIFFS, PROGMEM and EEPROM.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/esp8266/Arduino/issues/3256#issuecomment-366110345, or mute the thread https://github.com/notifications/unsubscribe-auth/APwaZI8IUkuCBaGNoTZLcY1Liqi8yIl2ks5tVM5LgaJpZM4NeumE .

bcmears avatar Feb 16 '18 05:02 bcmears

Hi, I'm quite new with this OTA thing.. But i'm facing the same issues and is not about 5GHz, my esp is connected to 2.4 (different SSID) and i'm using a Desktop with physical connection to network.. First thing I've tried is to disable firewall. and still the same error. After that i was looking for the message and noticed that it seems that the programmer (I use Atom with platformio) send a message to 0.0.0.0 (it means a broadcast message) so I try, disable every network adapter I have, except of course, the one for Ethernet and it work just fine... After successful I enable the firewall again and voilá, everything is working.

P.S. - The adapter that i disable is the VirtualBox Host Adapter...

I hope this help other, mainly the people that still doesn't have it working yet.

andrepalma avatar Feb 17 '18 00:02 andrepalma

For ESP-01 I had used 512 ( 64K SPIFFS) and it worked. File size needs to be less than half of available Flash. Connect to serial port and you can see the fail reason if any.

prasenjit-roy avatar Feb 17 '18 14:02 prasenjit-roy

Yap, that is another thing we have to keep in mind, if the IC we are using have 1MB of memory our program cannot exceed 512KB. This is because it needs to kept the all new software while is still have the old software.

andrepalma avatar Feb 17 '18 20:02 andrepalma

Do you have another esp8266 to try? I usually have two for comparison. 

Sent from Yahoo Mail for iPhone

On Friday, February 16, 2018, 12:17 AM, bcmears [email protected] wrote:

Glad to hear you got yours working. Still no joy for me. I forced the wifi to connect at 2.4GHz and I still get "No Response" from my esp8266. I even tried connecting my laptop through a 2.4GHz dongle. Still won't program. I can program using an old laptop that doesn't have 5 GHz, and it works fine. I think you've gotten me closer to a solution but I don't have it yet.

On Thu, Feb 15, 2018 at 6:39 PM, gibo77 [email protected] wrote:

UPDATE: I found the problem!

My laptop that I use to run the Arduino IDE is connected to 5GHz Wifi that is why ArduinoOTA will return "No Response". I knew about this 5GHz Wifi issue before with ESP8266, but that was for Http. Now that I tried the OTA I forgot about it. I did all kind of stunts to figure out the problem. I did SPIFFS format and EEPROM clear 512bytes memory. But this snag had put me to be close to expert on Arduino ESP8266 memory management SPIFFS, PROGMEM and EEPROM.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/esp8266/Arduino/issues/3256#issuecomment-366110345, or mute the thread https://github.com/notifications/unsubscribe-auth/APwaZI8IUkuCBaGNoTZLcY1Liqi8yIl2ks5tVM5LgaJpZM4NeumE .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gibo77 avatar Feb 19 '18 04:02 gibo77

Yup. That is the rule now. When you change firmware the old one should still be in there, until the new one completely loads and run before wiping the old firmware. In the olden days they dont have this and if there is a power failure or comm error what you have is AN EXPENSIVE PAPER WEIGHT. 

Sent from Yahoo Mail for iPhone

On Saturday, February 17, 2018, 3:58 PM, andrepalma [email protected] wrote:

Yap, that is another thing we have to keep in mind, if the IC we are using have 1MB of memory our program cannot exceed 512KB. This is because it needs to kept the all new software while is still have the old software.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gibo77 avatar Feb 19 '18 04:02 gibo77