-->
Page 1 of 1

Can send AT+ commands, but can't upload sketch

PostPosted: Mon Sep 28, 2015 11:08 am
by Mick Reilly
I'm using a generic ESP8266 module.

At the moment, I have a ESP8266 connected to an Arduino Uno through a 3.3V regulator, GPIO0 and GPIO2 are unused. I can send ANY AT command through the serial monitor of the Arduino Uno perfectly fine, and obtain a normal reply. However, when I attempt to upload any code at all, I get

Code: Select allesptool v0.4.5 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
   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


I've tried just about everything I could find on this topic - connecting GPIO0 to ground, connecting GPIO0 and GPIO02 both to Vcc, switching Rx with Tx etc. to no avail.

Any ideas?

Re: Can send AT+ commands, but can't upload sketch

PostPosted: Thu Oct 29, 2015 4:19 pm
by ArsenArsen
Just temponarly deattach serial from arduino, upload and plug em back in and reset. Thats it!

Re: Can send AT+ commands, but can't upload sketch

PostPosted: Thu Apr 07, 2016 11:07 am
by Andrea Ci
Hey!
I have the same exact problem, but without arduino (direct connection to PC via usb-to-serial ttl).

Did you manage to solve it?

Re: Can send AT+ commands, but can't upload sketch

PostPosted: Fri Apr 08, 2016 7:51 am
by martinayotte
With TX/RX and RX/TX connection, the Arduino is talking to ESP, but not the USB-TTL Serial.
With TX/TX and RX/RX connection, the USB-TTL Serial is talking directly to ESP, you should then be able to upload.
You can NOT have both mode at the same time !
If needed often, you can add a DPDT switch for that switching.