0

error: espcomm_upload_mem failed
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

error: espcomm_upload_mem failed

by jhbowling on Thu Jan 10, 2019 8:44 pm

I have an Adafruit HUZZAH ESP8266 Breakout PID: 2471 that I can't seem to program. I have it powered with an external power source with common ground and when I try to upload I get:

trying to connect
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

I am not the type of person who normally posts...instead I scour the forums and eventually figure things out, but this one has me stumped. I have tried a lot of different things but nothing has worked.

If I wire #0 to ground while uploading, I get this:
Uploading 294080 bytes from /tmp/arduino_build_253614/Blink.ino.bin to flash at 0x00000000
erasing flash
size: 047cc0 address: 000000
first_sector_index: 0
total_sector_count: 72
head_sector_count: 16
adjusted_sector_count: 56
erase_size: 038000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting timeout 15000
setting timeout 1000
espcomm_send_command: receiving 2 bytes of data
writing flash
serialport_receive_C0: 00 instead of C0
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
serialport_receive_C0: 02 instead of C0
warning: espcomm_send_command: didn't receive command response
closing bootloader
error: espcomm_upload_mem failed

In either case the red light remains dimly lit.
Attachments
huzzah1.jpg
huzzah1.jpg (423.63 KiB) Viewed 250 times

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by jhbowling on Sat Jan 12, 2019 1:49 pm

I am now able to program the Huzzah.

I have a dual boot machine (Ubuntu 16.04/Windows 10) and I decided to give Windows a try. Installed Arduino IDE, compiled, and now I'm able to upload by connecting #0 to ground. If I reboot into Ubuntu the exact same hookup is not working. Very strange.

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by adafruit_support_carter on Thu Jan 17, 2019 2:50 pm

What are you using to connect the breakout to the PC?

adafruit_support_carter
 
Posts: 11629
Joined: Tue Nov 29, 2016 2:45 pm

Re: error: espcomm_upload_mem failed

by jhbowling on Sat Jan 19, 2019 12:28 pm

This product:

https://www.sparkfun.com/products/11301

I also tried another cable...same result.

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by adafruit_support_carter on Mon Jan 21, 2019 3:01 pm

You can't just use a regular USB cable. You need a serail-to-USB converter:
https://learn.adafruit.com/adafruit-huz ... -cable-5-4

adafruit_support_carter
 
Posts: 11629
Joined: Tue Nov 29, 2016 2:45 pm

Re: error: espcomm_upload_mem failed

by jhbowling on Mon Jan 21, 2019 11:20 pm

This is what I'm using (see photo).

Wouldn't the fact that it is working under Windows rule out this sort of thing?
Attachments
scaled.jpg
scaled.jpg (838.12 KiB) Viewed 175 times

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by adafruit_support_carter on Mon Jan 21, 2019 11:46 pm

Might just be a linux permissions issue or modemmanager. What does the device show up as?

adafruit_support_carter
 
Posts: 11629
Joined: Tue Nov 29, 2016 2:45 pm

Re: error: espcomm_upload_mem failed

by jhbowling on Tue Jan 22, 2019 7:10 am

Code: Select all | TOGGLE FULL SIZE
ls -la /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jan 22 06:00 /dev/ttyUSB0


Code: Select all | TOGGLE FULL SIZE
groups
adm tty uucp dialout cdrom sudo dip plugdev lpadmin sambashare wireshark docker

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by adafruit_support_carter on Tue Jan 22, 2019 11:50 am

Seems OK. Could still be modemmanager maybe. Does the manufacturer of that FTDI board have any support and details about using it with linux?

adafruit_support_carter
 
Posts: 11629
Joined: Tue Nov 29, 2016 2:45 pm

Re: error: espcomm_upload_mem failed

by jhbowling on Tue Jan 22, 2019 8:29 pm

I have no reason to suspect the FTDI board. The same thing happens with this one.
Attachments
scaled.jpg
scaled.jpg (567.58 KiB) Viewed 148 times

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Re: error: espcomm_upload_mem failed

by adafruit_support_carter on Tue Jan 22, 2019 9:34 pm

The HUZZAH works when uploading via Windows so it's not the HUZZAH. It's something with linux and those USB to serial boards.

adafruit_support_carter
 
Posts: 11629
Joined: Tue Nov 29, 2016 2:45 pm

Re: error: espcomm_upload_mem failed

by jhbowling on Thu Jan 24, 2019 6:53 am

Yes, I don't think it's the HUZZAH.

jhbowling
 
Posts: 7
Joined: Fri Nov 24, 2017 7:53 am

Please be positive and constructive with your questions and comments.