Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

ISSUE :- error: espcomm_open failed in NODEMCU 8266 V0.9 in arduino 1.8.1

Open brijeshyati opened this issue 9 years ago • 36 comments

Dear Team ,

I am beginner in arduino (version 1.8.1 , ESP 8266 NODEMCU DEVKIT V0.9 ). currently i am facing issues . need you guy help in it for first couple of program ( just basis one ) blinking of LED etc,it is working fine ( ESP 8266 ). I am able to see blinking of LED bulb at ESP8266 . But suddenly it stopped and after that whenever trying to compile any program. getting below error warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed

I fed up with this errorst .

Regards, Brijesh Kumar

brijeshyati avatar Mar 05 '17 09:03 brijeshyati

https://github.com/esp8266/Arduino/blob/4897e0006b5b0123a2fa31f67b14a3fff65ce561/doc/faq/a01-espcomm_sync-failed.md

bebo-dot-dev avatar Mar 06 '17 10:03 bebo-dot-dev

Hi, I had exactly same issue. The problem was resolved by folllowing these steps

  1. Connect Vin of the board to 6V ( you can use 4 AA batteries or you can use 9V battery)
  2. Connect the GND pin which is next to Vin Pin to ground (-ve on breadboard)
  3. Connect D3 pin of the board to GND which will force your ESP8266 to flash mode.
  4. On Arduino Ide application use 'ESP generic board'. Node mcu 12e board selection will not work.
  5. Make sure the flash mode option is set to DIO under tools. This is the defaul option.
  6. Try compiling and uploading the example program BLINK.
  7. The blue LED will start flashing during the upload and I am pretty sure the upload will be successful.

Pls reply if this doesn't work.

harshadgd avatar Jun 23 '17 02:06 harshadgd

I had this problem and wasted two days trying to fix. I happened to have bought two of them and sure enough the other one works fine. I think this simply may be a hardware defect. Thanks to Amazon prime, will simply return for another.

Eric2XU avatar Jul 02 '17 16:07 Eric2XU

@brijeshyati the message is indicative of not being able to open the serial port. Either you have (had?) an installation problem of your flashing system or serial port drivers, the serial port id changed (i.e.: you unplugged/replugged the module), or your module is dead (I saw such a case just today myself). In any of the above, this is not the right place to ask for usage assistance. Please refer to the docs, or ask at esp8266.com or stackoverflow for help. I can vouch that the flashing system behaves correctly in the latest git today, at least under windows and linux. Closing this.

devyte avatar Sep 09 '17 03:09 devyte

If you get error message like this: Archiving built core (caching) in: C:\Users\skeshri\AppData\Local\Temp\arduino_cache_820988\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,UploadSpeed_115200,FlashSize_4M3M_b4034d01e7e0e33ff4df941b74132332.a Sketch uses 222205 bytes (21%) of program storage space. Maximum is 1044464 bytes. Global variables use 31572 bytes (38%) of dynamic memory, leaving 50348 bytes for local variables. Maximum is 81920 bytes. Uploading 226352 bytes from C:\Users\skeshri\AppData\Local\Temp\arduino_build_170968/Blink.ino.bin to flash at 0x00000000 error: failed sending 1072 bytes error: failed sending 0xC0 warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed error: failed sending 0xC0 error: failed sending 8 bytes error: failed sending 4 bytes error: failed sending 0xC0 warning: espcomm_send_command: didn't receive command response error: espcomm_upload_mem failed error: espcomm_upload_mem failed

Then your port is not supplying enough current to boot your program for this you change the USB port.

shivamkeshri avatar Dec 04 '17 14:12 shivamkeshri

Hello friends..... need help.... I can't upload program node mcu lolin v3 compile no problem but upload time show error message..... advance thanks friends.... error message is- Arduino: 1.8.6 Hourly Build 2018/01/03 03:33 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 9600, 4M (3M SPIFFS)" Archiving built core (caching) in: C:\Users \MICROS~1\AppData\Local\Temp\arduino_ cache_943422\core\core_esp8266 esp8266_nodemcuv2_CpuFrequenc y_80,UploadSpeed_9600,FlashSiz e_4M3M_9cfa2c1632441f3f34830c9 cc835a77d.a Sketch uses 222209 bytes (21%) of program storage space. Maximum is 1044464 bytes. Global variables use 31576 bytes (38%) of dynamic memory, leaving 50344 bytes for local variables. Maximum is 81920 bytes. Uploading 226352 bytes from C:\Users\MICROS ~1\AppData\Local\Temp\arduino build_596374/Blink.ino.bin to flash at 0x00000000 error: failed sending 1072 bytes .error: failed sending 1044 bytes .error: failed sending 1040 bytes .error: failed sending 1040 bytes .error: failed sending 1070 bytes .error: failed sending 1083 bytes .error: failed sending 1069 bytes .error: failed sending 1080 bytes warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOW NLOAD_DATA) failed warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04 error: espcomm_upload_mem failed error: espcomm_upload_mem failed This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

arif8051 avatar Feb 09 '18 14:02 arif8051

Set serial speed at least to 115200 (and next time do some search on the internet and/or post this kind of questions to the forum....)

Pablo2048 avatar Feb 09 '18 15:02 Pablo2048

brother lolin v3 reated buad speed is 9600.....

I search lot of time, read many articles and watch lot of tutorial but error message show.......

arif8051 avatar Feb 09 '18 16:02 arif8051

OMG, brother, its only printed on PCB and is valid for Lua interpreter, not for Arduino (I'm pretty sure that I already mentioned this somewhere in the forum...)

Pablo2048 avatar Feb 09 '18 16:02 Pablo2048

https://github.com/esp8266/Arduino/blob/master/doc/faq/a01-espcomm_sync-failed.rst

lrmoreno007 avatar Feb 09 '18 16:02 lrmoreno007

so what can I do for upload program....... please help brother.....

arif8051 avatar Feb 09 '18 16:02 arif8051

Do what I wrote - set correct speed. If this fails, play with reset mode...

Pablo2048 avatar Feb 09 '18 16:02 Pablo2048

And you have Arduino: 1.8.6 Hourly Build, test with Arduino 1.8.5 which is the actual stable version.

lrmoreno007 avatar Feb 09 '18 16:02 lrmoreno007

Thanks to all brother..... Done uploading....

arif8051 avatar Feb 10 '18 09:02 arif8051

Had the same problem on one sketch and the other was working fine Couldn't find the difference between the setting of the two sketches copied the code from the problematic sketch to the other one and it worked fine

Tifa80 avatar Feb 25 '18 00:02 Tifa80

Hi I had the same failure this weekend ( same issue during code load out of Eclipse Sloeber ) I read the hint from above from harshadgd ....but to be honest i did not try...It is now my 10 th NodeMCU which i use here...And the FIRST time with this issue. This issue was just shown from 1 MCU from a set of 6 which i ordered.

concerning code: Cannot imagine that this "code-related"..we use this code 6 MCU´s all the time..all same...the issue was only with this 1 MCU.

Today i got the answer from my dealer! They have from time to time such issues..And for sure he will send me a NEW MCU. So if this device is unter warrianty i would recommend to send it back..

regards K

iCounterBOX avatar Mar 12 '18 10:03 iCounterBOX

Hi, I have the same issue of errors and failure to upload, nothing seemed to fix it, I was using Arduino IDE, I had the occasional success, but mostly failures, I spent many hours with no success of fixing it. My connection to the ESP-12 was via USB, I also had a serial RX/TX lead connected to my Pi using Minicom to see if I could help debug the problem. Normally I just get garbage on the Minicom screen when I boot the ESP. I also tried sending 'AT' commands via this serial connection, but noticed no command ever worked. I had an idea that the TX line from the Pi to the RX on the ESP-12 might be an issue, so I removed it. BINGO it all started working, I can now upload with no problems, It would appear there is some sort of conflict if you have USB -> Pi and serial to TX/RX that prevents it from working. I hope this may help others, basically don't connect anything to the RX (GPIO 3) on the ESP-12 when uploading.

baileyt3 avatar Mar 28 '18 16:03 baileyt3

This definitely works:

posed by harshadgd commented on Jun 22 2017
Hi, I had exactly same issue. The problem was resolved by following these steps Connect Vin of the board to 6V ( you can use 2 AA batteries or you can use 9V battery) Connect the GND pin which is next to Vin Pin to ground (-ve on breadboard) Connect D3 pin of the board to GND which will force your ESP8266 to flash mode. On Arduino Ide application use 'ESP generic board'. Node mcu 12e board selection will not work. Make sure the flash mode option is set to DIO under tools. This is the defaul option. Try compiling and uploading the example program BLINK. The blue LED will start flashing during the upload and I am pretty sure the upload will be successful.

pmerlinojr avatar Mar 29 '18 17:03 pmerlinojr

just unplug 3V3 pin before uploading, it will work.

heynomansheikh avatar May 29 '18 20:05 heynomansheikh

I have Lolin NodeMCU V3, I followed, these instructions and to upload use NodeMCU firmware programmer, you have to hold down the flash button and then press the reset button. That's the only way I go the NodeMCU Firmware programmer to work.

From there I was able to upload a sketch by doing the same flash/reset buttons sequence.

shinuza avatar May 31 '18 22:05 shinuza