0

Connected a generic ESP8266 to an Arduino Uno.

I can send AT commands fine and generate a normal response, but cannot upload sketches to the ESP8266. I have "Generic ESP8266 Module selected as the board. Tried everything e.g. switching Tx and Rx, connecting GPIO0 and GPIO2 to to Vcc or ground, but to no avail.

Arduino IDE spits this out -

esptool v0.4.5 - (c) 2014 Ch. Klippel <[email protected]>
 setting board to ck
 setting baudrate from 115200 to 115200
 setting port from COM1 to COM3
 setting address from 0x00000000 to 0x00000000
 espcomm_upload_file
 stat C:\Users\Michael\AppData\Local\Temp\build7227402767538495982.tmp/wifi_setup.cpp.bin success
 setting serial port timeouts to 1000 ms
opening bootloader
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
 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
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
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
 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
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
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
 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
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
warning: espcomm_sync failed
error: espcomm_open failed
asked Sep 28, 2015 at 16:25
3
  • Not sure, but I think you need to flash the NodeMCU firmware first. Commented Sep 28, 2015 at 18:10
  • 2
    You are going to have to provide a bit more detail on your setup. How do you have the ESP8266 connected to the Arduino? What are you using to program the ESP 8266? This? Commented Sep 28, 2015 at 23:04
  • Hi @user2277005 ! did you manage to solve this problem? All the solutions here don't work Commented Apr 7, 2016 at 16:11

3 Answers 3

1

You mention:

connecting GPIO0 and GPIO2 to to Vcc or ground

I've had success with this sequence:

  • GPIO0 to gnd (and hold momentarily)
  • RST to gnd (then let go, while holding GPIO0 to gnd)
  • let go of GPIO0 from gnd (e.g. let it float again)

To do a firmware flashing, you need to hold GPIO0 to ground for the duration of the flashing process, so the sequence would be slightly different.

You can do this just prior to "build and upload" in the Arduino IDE—provided the build process doesn't take too long. It will sometimes still fail, in which case reset the ESP8266 (RST to gnd momentarily) and restart the sequence.

I've found a little test/development harness (like this one http://www.buildcircuit.com.au/esp8266-test-board) is very handy for doing this repeatedly.

answered Dec 29, 2015 at 6:49
1
  • Your solution worked for me, when I have this error. Thanks! Commented Nov 16, 2016 at 7:09
0

I have been hooking the ESP8266 straight up to my PC and programming it in NodeLua. Of course it depends on what you want to do, but consider dropping the Arduino and just using the ESP8266.

answered Sep 29, 2015 at 14:58
1
  • Alright will give that a go. Commented Oct 1, 2015 at 8:03
0

You don't need an Arduino UNO to program the ESP. You just need an USB to UART adapter (CP210x or FTDI one) and the Arduino IDE. Hook the ESP rx and tx to the tx an rx of the adapter and you are ready to go. Here is an detailed explanation how to program ESP using arduino

If you don't have an USB to UART bridge you can use the Arduino board as bridge: check this

answered Apr 27, 2016 at 12:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.