Using 1.6.5 Arduino IDE with stable esp8266 distribution on mac osx. In the beginning (and still to this point) I always get the error:
warning: espcomm_sync failed
error: espcomm_open failed
when trying to upload any sketch.
I feel like i tried the most things i could find on google regarding this error.
But while trying to figure this out I got somewhat confusing information. Some sources say GPI00 needs to be connected to GND, some say it needs to be a PullUp. Some sources say ch_pd needs to be at 3.3v, some say it needs to be at DTR with a PullUp Resistor and some sources leave it completely disconnected and dont mention it anywhere. Can somebody who got a ESP-01 to work give me some clarification on this?
I'm really confused but I noticed some things that seem odd and maybe you can help me figure this out:
Can you help me in any way clarify my confusion?
Do you have pull ups for CH_PD and REST?
Did you connect the RTS out from your UART USB converter chip to REST or CH_PD?
If no RTS out available you have to pull down the REST or the CH_PD to ground manually just before you want to upload the sketch.
Flashing is only available if GPIO0 and REST (or CH_PD works too) are pulled to ground just before uploading the image.
Pleas connect all pins from your ESP-01 module except GPIO2 like the example.
the example is working I have six ESP-12 working with this.
when GPIO0 is low (0V) the ESP goes to boot mode on next reset
if it is high (3.3V) the ESP will boot your sketch.
don't connect the GPIOs directly to VCC or GND always use a resistor for all between 2k to 20k will work, most used for this is 10k.
for the ESP-01 the GPIO15 is connected correct on the board itself.
(its the pin left to GPIO2 on the SOC)

@pgollor In the example the CH_PD and GPIO0 are pulled up, aren't they?
But you write GPIO0 (or CH_PD) need to be connected to ground? In the example there is no GND connection to the GPIO0
Do I overlook something here?
For normal mode GPIO0 have to pulled up. This is the reason for the pull up resistor.
To go into the bootloader after reboot the GPIO0 have once pulled down...
Please read the available documentation and close this issue. Your issue is not a software problem.
Check out http://www.forward.com.au/pfod/CheapWifiShield/ESP2866_01_WiFi_Shield/index.html
for a complete circuit and programming instructions and programming serial cable,
Hi guys! I was having the same problem:
warning: espcomm_sync failed
error: espcomm_open failed
For me, that was solved with an external 3.3v. My FT232 USB hasn't enough power to provide to ESP8266.
I found a solution.
this is becouse using Arduino 1.6.5 doesn't seems to work with esptool.
the solution can be found here http://hpclab.blogspot.mx/2015/06/esp8266-arduino-ide-on-mac-os-x.html
This is because esptool-ck doesn't work with PL2303 based converters on OS X.
@igrr , please is there a way to fix this issue?
Hello!!
Even I am having same problem.
"warning: espcomm_sync failed
error: espcomm_open failed"
I have installed all the required libraries required for ESp8266. I am working on windows OS also using arduino_IDE version 1.6.7
Make sure you disconnect everything from GPIO0 and only leave the GND connection in place.
Had the same issue. Added 10k resistor between GPIO0 and GND. Arduino 1.6.5 mac El Capitan.
Add more power. When the Wifi powers up it crashes everything if you don't have enough power; you can add +5V power to the Vbat along with whatever power is coming from the FTDI cable you are trying to program it with.
I spent hours to find the ISSUE!!!
REMOVE LED on GPIO2 and it works!!!!
or better, DO NOT USE low cost LED as I did!!
I am also facing this error and have tried all the above listed troubleshoots but still nothing happens and i amusing cp2102 programmer. I am felling so low as i this is my first IOT project and i am failed. PLzz someone help me out with this ..
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
I am having this exact same issue on Mac and Arduino 1.6.9, very frustrating. Please help!
I was having the same issue.
Solution:
Select the correct COM-Port in the Arduino IDE under Tools -> Port:
I have solved the issue with Ubuntu running Arduino IDE 1.6.8 as sudo user eg. sudo ./arduino
i am also facing same problem. I am using Arduino 1.6.9. i have connected GPIO0 and ch_PD to 3.3v and GPIO15 to GND. Plz help me with this.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

Hi @hjpatel91,
I have just completed troubleshooting guide for this issue.
Could you follow it step by step and provide result of each step?
Krzysztof
I fixed this problem by removing the LED on GPIO_2, using an external power supply for the ESP and power cycling before every upload. Also, GPIO_0 is set to GND
Hi,
I was having the same error when I tried uploading the code:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
My problem got solved when I applied external 3.3V supply (not from the USB port) and changed the baud rate to 57600bps
Aman
Problem - using arduino IDE 1.6.11
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
My ESP - ESP12F
Connection
VCC ----- VCC (3.3 Volt using 12 volt adaptor with voltage regulator LM 2596, to 3.3 volt)
CH_PD (i don't havr CH_PD on ESP12F but i have EN instead) ----- VCC (3.3 Volt)
GND ----- GND (any ground, the adaptor or FTDI232 GND)
GPIO15 ----- GND
GPIO0 ----- GND
RX (on esp) ----- TX (FTDI232)
TX (on ESP) ----- RX (FTDI232)
What solving my problem is :
source of learning this technique is HERE
my first post on git hub, sorry for my bad english, thanks
Turns out my FT232R FTDI pinout was GND, CTS, VCC, TXD, RXD, DTR and I was usin DTR, CTS for reset, that is wrong. I had to add RTS to my FTDI and use DTR, RTS
@kylemusco Thanks for that, did the trick for me.
Hi guys just today after spending hours like crazy i finally solved the problem.
To use this library with Sketch IDE you need following things installed properly.
1.sketch IDE
2.This above Library
3.Device driver which was missing in my case which you can find here https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Feel free to ask or post any other error if you are getting.
Hi guys just today after spending hours like crazy i finally solved the problem.
To use this library with Sketch IDE you need following things installed properly.
1.sketch IDE
2.This above Library
3.Device driver which was missing in my case which you can find here https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Feel free to ask or post any other error if you are getting.
Hi Krunal-Desai. I am having trouble getting my sonoff in flash mode. I have tried everything. When I plug it in via ft232rl I see com port 4 but when I flash I get espcomm mem failed. Do you think if I replace the driver with the one you mentioned this will fix my problem? Did you see a com port in arduino ide before you installed the new driver?
Kind regards
Steven
Hi Steven.
Well I do not have any idea about your board so not sure this will fix your problem for sure. Answer to your second question is no.
Before i install these driver I was able see only COM3 port in IDE but once i installed these drivers i was able to see COM4 and that was working nicely. COM3 even after installation did not work but COM4 worked out best.
So what i believe is this particular chip require a certain set of serial communication protocol set up on particular COM port and that is what these driver do. So no matter what board you use or what IDE you take it i believe this driver is just a way to carry the information to chip and they might solve your problem.
Feel free to share any further queries if you have and do post comment if things work out just fine so other can also get help from it.
Happy to help you...!
Krunal
TenÃa el mismo problema y estaba trabajando con tarjeta generica. La cambie a esp-E y otra vez todo ok.
OK with esp-E.
Hi all,
By Connecting RESET,CH_PD pins of E01 module to 3.3V and GPIO0 to GND. These error can resolved..A brief post on Errors are here
Hi,
I tried various possibilities mentioned above by others for same error. So I would like to share what works for me and really I don't why but it works.
Connections I followed:

I switch on power supply keeping switch position(connected to GPIO0) to F side for flashing code using arduino ide 1.6.11 and once done moves switch to N position. Now keeping switch position to N if I off and on power of esp8266 its runs uploaded program.
Now to upload new code I just have to switch off power of esp8266 and change position of switch to F side again. After this when ESP8266 given power then it goes into flashing and now I can upload new code.
It works because it's correct...
Rather than have GPIO0 'floating' when the switch is set to N, I would
pull it high via a resistor from the switch contact to +3.3V - but the
process is correct.
On 3 Feb 2017 16:27, "Brijesh Singh" notifications@github.com wrote:
Hi,
I tried various possibilities mentioned above by others for same error. So
I would like to share what works for me and really I don't why but it works.
Connections I followed:[image: esp01programmingconnection]
https://cloud.githubusercontent.com/assets/5358553/22596451/9a312c16-ea51-11e6-8149-100eae2ae192.pngI switch on power supply keeping switch position(connected to GPIO0) to F
side for flashing code using arduino ide 1.6.11 and once done moves switch
to N position. Now keeping switch position to N if I off and on power of
esp8266 its runs uploaded program.
Now to upload new code I just have to switch off power of esp8266 and
change position of switch to F side again. After this when ESP8266 given
power then it goes into flashing and now I can upload new code.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/770#issuecomment-277276298,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALP8xZHD2hDKeq3EE3uPFKO2qbWjjwDRks5rY0ddgaJpZM4F7wDM
.
Ok and @duncan-a thanks for suggestion.
I have same Problem
am getting this error
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
what is that problem
am using ESP8266 (2.2.0)
@ritwik552 please check the FAQ first http://arduino-esp8266.readthedocs.io/en/docs_to_readthedocs/faq/a01-espcomm_sync-failed.html
i just make it by changing porn ty...but when am attacking some network at deauth all showing 0pkts/s ant nothing happen
Which is good, if you'd ask me.
means? i don't get it
On Sun, Feb 19, 2017 at 3:44 PM, Ivan Grokhotkov notifications@github.com
wrote:
Which is good, if you'd ask me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/770#issuecomment-280909113,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYreTbr7PMG4xv3acqQEvWc1QRrS6CM4ks5reBYfgaJpZM4F7wDM
.
Hello,
can anyone suggest me how to send a alert sms using esp8266. plzzzzzzzzz
Connecting CH_PD to Vcc solved my problem.....
TL,DR: I solved my problems (warning: espcomm_sync failed etc.) by replacing the 10k resistor between GPIO00 and GND I used first with a 3.9k resistor.
Long Version:
I was also starting to feel a little irritated after sitting in front of this problem last night and today. But just about an hour ago I managed to solve my problem.
Initially my Setup is the ESP-12S on the typical white adapter board. VCC to 3.3V, GND to GND, CH_PD (or EN on other chips) and GPIO02 pulled high with 10k (although CH_PD should be high anyways with the layout of the adapter board, turning the two parallel 10k resistors effectively into a 5k), GPIO15 and GPIO00 pulled low with 10k (although GPIO15 should also be pulled low by the 10k on the board thus making the duo 5k as well). 0.1uf and 47uf are placed across VCC/GND. Power is supplied by the PSU from the Elegoo "The Most Complete Starter Kit". USB-to-Serial is done with one of these
http://www.ebay.de/itm/272461294802?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT
, connecting the TX/RX/GND pins. For programming I use the Arduino IDE 1.6.12 with the esp-library.
The problem: I get the
"
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
"
messages. Turning up the verbosity during upload reveals these lines as well:
"
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
"
It is the Serial Monitor that will give me an idea what might be the problem:
On 115200 Baud it shows me something like this:
"
garbage_data (This is actually the bootloader reporting stuff on 74880 Baud)
AI-Thinker something something
ready
"
On 74880 Baud it reports a bunch of stuff, but most interesting is the very first line:
ets Jan 8 2013,rst cause:2, boot mode:(3,6).
Testing reveals: When connecting GPIO00 to high for normal boot - the Serial Monitor shows exactly the same.
Oh.
Ahhhh!
No wonder I can't program the chip if it isn't even in the right mode!
The 10k resistor seems to be too much for GND to properly register at GPIO00, thus not starting the UART Mode (programming mode) but Flash Mode (normal boot) instead.
I replaced the 10k (probably, I mean, I didn't measure it, but the other ones from the same batch from China seem to be 10k) resistor between GPIO0 and GND with a 3.9k. Voila,
"
writing flash
................................................................................ [ 34% ]
................................................................................ [ 69% ]
..................................................................... [ 100% ]
starting app without reboot
" (and some more lines before and after).
Also, the proper behavior of the Serial Monitor when starting the esp in UART Mode seems to be to show only one line of garbage data on 115200 Baud which is revealed as
"
ets Jan 8 2013,rst cause:2, boot mode:(1,7)
"
on 74880 Baud. Dates might differ, of course.
On my NodeJS it was a sensor connected to D8 what caused the trouble. Connecting it to D7 solved it. I recommend trying to replicate the error with a NodeJS disconnected from everything (expect the USB of course).
I got the same error message when I selected the wrong board. I selected "generic ESP8266" when I should have selected "NodeMCU 1.0 (ESP 12-E Module)"
Me too
Hi, I had the same problem and none of the sugested ways worked for me.
I managed to solve it by unistalling completelly my Arduino IDE (be carefull to copy your projects and libraries if you wish so) and then installed the Portable Arduino IDE on an external hard disk. After that, I pasted again my projects and libraries into the portable created folders, and had no problems more since then.
I think the issue came because of having non-genuine FTDI devices (Arduino D1, Wemos, chinese duemilanove...) and these were somehow blocked and no longer available. Here is a link which explains this issue very good.
I had same problem for couple of days.
Follow steps shown in this site: https://diyhacking.com/esp8266-tutorial/
Buenas tardes. Tengo problemas con subir mi programa a mi placa Wemos D1 wifi
El Sketch usa 261163 bytes (52%) del espacio de almacenamiento de programa. El máximo es 499696 bytes.
Las variables Globales usan 34192 bytes (41%) de la memoria dinámica, dejando 47728 bytes para las variables locales. El máximo es 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
Alguien me puede ayudar? Ya cambin los baudios y nada
There is more than one cause for this message. Make sure the Tools > Upload speed is either 115200 or 230400. Check that the USB port is working and the correct port is selected. : Tools: Port. My computer changes the USB port every time I unplug it and re-plug it in. Sometimes a wire connected to a pin will keep the program from uploading. I had this happen with D0 conneted to RST. Other pins can do it also, possibly when D1 was connected to a LED to ground. I haven't used Wemos D1, so there may be other causes that are specific to this board.
There is more than one cause for this message. Make sure the Tools > Upload
speed is either 115200 or 230400. Check that the USB port is working and
the correct port is selected. : Tools: Port. My computer changes the USB
port every time I unplug it and re-plug it in. Sometimes a wire connected
to a pin will keep the program from uploading. I had this happen with D0
conneted to RST. Other pins can do it also, possibly when D1 was connected
to a LED to ground. I haven't used Wemos D1, so there may be other causes
that are specific to this board.
2018-02-05 11:36 GMT-08:00 Eduardo Dena notifications@github.com:
Buenas tardes. Tengo problemas con subir mi programa a mi placa Wemos D1
wifiEl Sketch usa 261163 bytes (52%) del espacio de almacenamiento de
programa. El máximo es 499696 bytes.
Las variables Globales usan 34192 bytes (41%) de la memoria dinámica,
dejando 47728 bytes para las variables locales. El máximo es 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failedAlguien me puede ayudar? Ya cambin los baudios y nada
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/770#issuecomment-363196631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFvP-bas-8bg95eVGcXTkrjBLAKcYTXgks5tR1hPgaJpZM4F7wDM
.
You can also program esp 8266 with arduino boards with arduino ide
Hello friends,
I was having the same problem.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
I have read the forum and tried to. I worked on it :)
Solution:
I connected a GND crossover cable between GPIO0.

@Sephok I had the problem with ESP8266 ESP-01
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
I solved doing similar that you. With this connection, didn't problem


try selecting nodemcu v1.0 board it will fix that issue... it worked for me
Fixed my issue by playing with upload speed, only "921600" worked... all other showed this error...
i have download latest version of tasmota, using arduino ide to flash and upload this firmware to my sonoff TH16: I need help on how to fix this issue.
Sketch uses 582272 bytes (60%) of program storage space. Maximum is 958448 bytes.
Global variables use 50524 bytes (61%) of dynamic memory, leaving 31396 bytes for local variables. Maximum is 81920 bytes.
Uploading 586416 bytes from C:\Users\Linda\AppData\Local\Temp\arduino_build_724539/sonoff.ino.bin to flash at 0x00000000
................................................................................ [ 13% ]
................................................................................ [ 27% ]
................................................................................ [ 41% ]
................................................................................ [ 55% ]
................................................................................ [ 69% ]
................................................................................ [ 83% ]
................................................................................ [ 97% ]
............. [ 100% ]
Invalid library found in C:\Program Files (x86)\arduino\libraries\lib: no headers files (.h) found in C:\Program Files (x86)\arduino\libraries\lib
Invalid library found in C:\Program Files (x86)\arduino\libraries\lib: no headers files (.h) found in C:\Program Files (x86)\arduino\libraries\lib
thank you linda
Hi @lincronin I think that last error is harmless, it just means you have an invalid library, e.g. lib may be empty.
I know the issue is closed but there should be no reason to go through all of the stuff mentioned here. First time using the nodeMCU's I got the blinky sketch to work, and then something happened between my laptop updating and developing on different machines. I spent days trying to figure out why some of my old sketches, when edited or deployed to new NodeMCUs would work, and nothing else would.
The following configuration solved the issue:
Board: "NodeMCU 1.0 (ESP-12E Module)"
Upload Speed: "115200"
CPU Frequency: "80 MHz"
Flash Size: "4M (no SPIFFS)"
Debug port: "Disabled"
Debug Level: "None"
lwIP Variant: "v2 Lower Memory"
VTables: "Flash"
Exceptions: "disabled"
Erase Flash: "Only Sketch"
Port: <your_port>
This worked across different machines, using this link to add the board file to boards manager. I downloaded "esp8266 by ESP8266 Community version 2.5.0".
I had this problem as well, but none of these solutions fixed the probem. What did though, was changing _Erase Flash_ option from _Only sketch_ to _All Flash Contents_. Hope it helps
I had this problem in Windows 10. Once my NodeMCU was connected i opened up device driver, clicked com ports and right clicked on siliconlabs cp210x usb uart and clicked "search for updates" - windows updated the driver and rebooted. Now its working without issue.
as i did ,if U have sensor connected to 8266 or nodemcu ,before upload u can remove them .after uplaoded than can connect them.maybe cause of the power
I had the same problem. My bachelor degree is an IOT project, i have to present it next week and today this happened and i nearly had a heart attack :)). After some research i find out that the some pins are using the internal timers and the sensor connected to a certain pin (in my case, D4) was resetting the timer and i could not upload code anymore. The system had an external power supply and that would't fix the issue either. So, try removing every sensor one by one and find out if the problem persists. Good day!
I had the same problem..
Warning:espcomm_upload_mem failed
but none of the above mentioned solutions fixed the problem.
I had this problem in Windows 10. Once my NodeMCU was connected i opened up device driver, clicked com ports and right clicked on siliconlabs cp210x usb uart and clicked "search for updates" - windows updated the driver and rebooted. Now its working without issue.
thanks, @supernovae, this fixed it for me
Most helpful comment
Problem - using arduino IDE 1.6.11
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
My ESP - ESP12F
Connection
VCC ----- VCC (3.3 Volt using 12 volt adaptor with voltage regulator LM 2596, to 3.3 volt)
CH_PD (i don't havr CH_PD on ESP12F but i have EN instead) ----- VCC (3.3 Volt)
GND ----- GND (any ground, the adaptor or FTDI232 GND)
GPIO15 ----- GND
GPIO0 ----- GND
RX (on esp) ----- TX (FTDI232)
TX (on ESP) ----- RX (FTDI232)
What solving my problem is :
source of learning this technique is HERE
my first post on git hub, sorry for my bad english, thanks