Skip to content

warning: espcomm_sync failed error: espcomm_open failed #1471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kapilpawar opened this issue Jan 20, 2016 · 19 comments
Closed

warning: espcomm_sync failed error: espcomm_open failed #1471

kapilpawar opened this issue Jan 20, 2016 · 19 comments

Comments

@kapilpawar
Copy link

kapilpawar commented Jan 20, 2016

i am using ESP8266 and ARDUINO for data transmission.
while uploading any code it is showing ..

warning: espcomm_sync failed
error: espcomm_open failed

please help me...
thanks in advance

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@krzychb
Copy link
Contributor

krzychb commented Jan 20, 2016

Hi kapilpawar,

This message indicates possible issue with:
• h/w connection between your computer and ESP module
• selection of board / board reset method in Boards Manager

It may be either one or both above.

The answer depends on the module type and external serial adapter type (if you use one).
There is a dozen module types, three generic adapter types and couple of methods to connect them.

Therefore in order to help you troubleshoot this issue, you need to post some additional details:

  1. ESP board type - https://github.com/esp8266/Arduino/blob/master/doc/boards.md
  2. Serial adapter type (if you use one) - https://github.com/esp8266/Arduino/blob/master/doc/boards.md#serial-adapter
  3. How you connect your ESP board with adapter - https://github.com/esp8266/Arduino/blob/master/doc/boards.md#minimal-hardware-setup-for-bootloading-and-usage
  4. Screenshot of configuration for upload you selected under Tools > Board: of Arduino IDE

Krzysztof

@kapilpawar
Copy link
Author

Hi krzychb,
I am using ESP1 module,.

I am trying to connect ESP8266 directly to the ARDUINO UNO...
so please give resolution to resolve this problem.

thank you krzychb..........

@krzychb
Copy link
Contributor

krzychb commented Jan 20, 2016

kapilpawar,

I am afraid this not the best place to troubleshoot this issue.

The purpose of this repository is to let you write sketches using Arduino IDE specifically for ESP8266.

To obtain firsthand experience regarding direct connection of ESP8266 to the ARDUINO UNO I would check http://www.esp8266.com/viewforum.php?f=8&sid=9ea483e0556ae73240806f83061efbc0 that deals specifically with topics, source code that relate to the Arduino Platform.

Krzysztof

@igrr
Copy link
Member

igrr commented Jan 20, 2016

I think what kapilpawar means is that he uses Arduino UNO as a serial
adapter to flash the ESP. Am I right?

On Wed, Jan 20, 2016, 14:33 krzychb notifications@github.com wrote:

kapilpawar,

I am afraid this not the best place to troubleshoot this issue.

The purpose of this repository is to let you write sketches using Arduino
IDE specifically for ESP8266.

To obtain firsthand experience regarding direct connection of ESP8266 to
the ARDUINO UNO I would check
http://www.esp8266.com/viewforum.php?f=8&sid=9ea483e0556ae73240806f83061efbc0
that deals specifically with topics, source code that relate to the Arduino
Platform.

Krzysztof


Reply to this email directly or view it on GitHub
#1471 (comment).

@kapilpawar
Copy link
Author

exactly .........

@krzychb
Copy link
Contributor

krzychb commented Jan 20, 2016

kapilpawar,

The first two questions are now clarified thanks to igrr 😄
Please answer remaining two.
For third question please provide schematic

Krzysztof

@kapilpawar
Copy link
Author

Hi krzychb,

my connection is .........

ARDUINO UNO ...................> ESP8266
TX...........................................>RX
RX.........................................>TX
VCC......................................>3.3V
GND.....................................>GND
CH_PD ................................>3.3V
RST......................................>3.3V
GPIO 2 ..................................>3.3V

and
laptop to arduino through USB cable.
please help me i have tried different combination of the pins, but it didnt work....

@Duality4Y
Copy link
Contributor

you know that arduino uno is 5V and that connecting it's TX to your esp8266 RX will blowup the RX on your esp8266 ? you need level shifters.

also remove the avr it's in the way of the serial communication. if you haven't done that already.

@kapilpawar
Copy link
Author

hi Duality4Y

i tried with 3.3v that is also given in the same arduino board..
please help,,

@kapilpawar
Copy link
Author

while uploading it is showing...

Sketch uses 198,612 bytes (45%) of program storage space. Maximum is 434,160 bytes.
Global variables use 33,014 bytes (40%) of dynamic memory, leaving 48,906 bytes for local variables. Maximum is 81,920 bytes.

warning: espcomm_sync failed
error: espcomm_open failed

@Duality4Y
Copy link
Contributor

connecting to the 3.3v pin on the arduino doesn't matter it's gpio will still be 5V TTL.
also have you tried removing the avr? because it's in the way of the communication if it's connected to the same pins :)

@Duality4Y
Copy link
Contributor

have a look at how it's connected here:
http://www.stefanocottafavi.com/discover-the-esp8266/

@drmpf
Copy link

drmpf commented Jan 20, 2016

@supersjimmie
Copy link

Normally, if you want communication between arduino and ESP, you need RX to TX and TX to RX, like you say:
TX...........................................>RX
RX.........................................>TX

But in this case, you want to "abuse" the serial from the arduino to pass-through between your laptop and the ESP. Then you need to connect Arduino RX to ESP RX and Arduino TX to ESP TX (that is pass-through). By doing that, the ESP will be connected to the laptop the same way as the Arduino.
So you need:
TX...........................................>TX
RX.........................................>RX

Also make sure the ESP is in flash mode.

Oh, and you will need to connect Arduino Reset pin to GND.
This will prevent the Arduino from using the serial itself. (preventing it to start)

@Duality4Y
Copy link
Contributor

oh yea good point you need to connect it that way indeed :)

@mammenj
Copy link

mammenj commented May 2, 2016

I have spent lot of time on this error. What I found is that FTTD usb adapter was not providing enough power to the board to flash the sketch. As soon as I provided a stable power, it works all the time. So its good idea to have stable power if you are still facing the issue,

@jyotirajsharma
Copy link

I am facing the exact issue and below is my configuration. Wil changing to ext. power supply than from Aruduino solve this problem ?
ARDUINO UNO ...................> ESP8266
TX...........................................>RX
RX.........................................>TX
OR
TX...........................................>TX
RX.........................................>RX
VCC......................................>3.3V
GND.....................................>GND
CH_PD ................................>3.3V
RST......................................>3.3V

Arduino: 1.6.12 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None"

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
read 0, requested 1
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
serialport_receive_C0: 08 instead of C0
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
serialport_receive_C0: FC instead of C0
resetting board
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
read 0, requested 1
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
serialport_receive_C0: 08 instead of C0
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
serialport_receive_C0: FC instead of C0
resetting board
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
read 0, requested 1
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
serialport_receive_C0: 08 instead of C0
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
serialport_receive_C0: FC instead of C0
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

@devyte
Copy link
Collaborator

devyte commented Oct 18, 2017

This error is documented. Closing.

@devyte devyte closed this as completed Oct 18, 2017
@AliHassan4198
Copy link

AliHassan4198 commented Oct 10, 2018

I have the same issue... I Just Close the Serial Port Monitor of Arduino and the then All files are easily programmed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants