Open boneskull opened 9 years ago
espcomm_send_command: receiving 1796 bytes of data
Wow, looks like a bug. Will check.
Side note: since you are using a PL2303-based USB-serial converter, the version of FTDI driver is kind of irrelevant.
Investigated this a bit. Totally weird. The issue comes from the fact that the reply packet has incorrect size or checksum. I tried to print out each received byte:
Uploading 31680 bytes from /var/folders/15/ybtbgzpj7636vv4wp92l2c700000gn/T/build2638420307500603799.tmp/sketch_may25a.cpp_00000.bin to flash at 0x00000000
erasing flash
size: 007bc0 address: 000000
first_sector_index: 0
total_sector_count: 8
head_sector_count: 8
adjusted_sector_count: 4
adjusted_size: 004000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
serialport_get_timeout: 1000
serialport_set_timeout: 10000
setting timeout 10000
setting character timeout 100
done
old_timeout = 1000
c0
serialport_set_timeout: 1000
setting timeout 1000
setting character timeout 10
done
01
02
02
00
07
90
02
40
rp.direction = 1
rp.command = 2
rp.size = 2
rp.checksum = 40029007
espcomm_send_command: receiving 2 bytes of data
08
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
Here the checksum is already broken (on other runs size was broken as well).
Now when I connect a scope, I see the ESP is sending the correct data:
But the bytes I read from the port are different. Looking further.
Hi, I had same problem on Mac OS X Yosemite 10.10.3 and it is fixed by esptool.py. Short tutorial for switching uploader from esptool to esptool.py on Mac
http://hpclab.blogspot.com/2015/06/esp8266-arduino-ide-on-mac-os-x.html
Hope it would help someone who just jumped into ESP8266 world
It might be worthwhile adding a note to the README, since PL230x based adapters are quite widespread.
@stblassitude I've added a note to Arduino docs.
FWIW I've since found the CP2102 devices are the most reliable when working with ESP8266's
Hello gentlemen, I was having constantly the same issue with lolin nodemcu 1.0 HW that uses CH340 chip.
I apply the following workaround : http://arduino.stackexchange.com/questions/20219/upload-with-esptool-fails-with-espcomm-send-command-cant-receive-slip-payload installing the esptool.py that works fine for me. (file is platform.txt instead of hardware.txt described)
so... practically .... attached the files that works for me now : (Arduino 1.6.8 / ESP8266 2.20 / OS X 10.11.4 )
platform.txt location >> ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0 esptool.py.zip location >>~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/tools (IDE to be restarted)
Dear Ivan, why not considering including this in the official package for Mac with an instruction somewhere ?
I attempted the update above from @etiquet on 2.3.0 with no luck, error being "Failed to connect to ESP8266". Note I kept GPIO 0 low via 10K ohm resistor when plugging board in using a common programmer (http://samy.pl/o/espp.jpg). I've tried both esptool 1.1 and 1.2-dev.
Same when attempting from console:
$ sudo esptool.py --port /dev/cu.Repleo-CH341-00005014 write_flash 0x00000 build5f5ea63a04bf75fd9ebf7eb6ec082a45.tmp/Blink.ino.bin
esptool.py v1.2-dev
Connecting...
A fatal error occurred: Failed to connect to ESP8266
Try to connect The GPIO0 with a 10k resistor to ground and the CH_PD to VCC and it works :)
Here's the end of trying to build
WiFiScan
example using the1.6.4-673-g8cd3697
board definition:Trying the upload manually, with a somewhat different command, also fails:
I tried various combinations of flags
-bf
,-bm
and-cb
to no avail.But
esptool.py
uploads fine:Setup: