Skip to content
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

espcomm_upload_mem failed - High Sierra issue #957

Closed
jeylites opened this issue Oct 3, 2017 · 26 comments
Closed

espcomm_upload_mem failed - High Sierra issue #957

jeylites opened this issue Oct 3, 2017 · 26 comments
Labels
stale Action - Issue left behind - Used by the BOT to call for attention

Comments

@jeylites
Copy link

jeylites commented Oct 3, 2017

Any idea what this is?

Tasmota ver: 5.8.0

Archiving built core (caching) in: /var/folders/xv/crvzgz1524sd7__nxwb8ttrw0000gn/T/arduino_cache_689350/core/core_esp8266_esp8266_generic_UploadTool_esptool,CpuFrequency_80,FlashFreq_40,FlashMode_dout,UploadSpeed_115200,FlashSize_1M0,ResetMethod_ck,Debug_Disabled,DebugLevel_None_____dbfd31d0555bcd0761520a5858d44b80.a
Sketch uses 477912 bytes (46%) of program storage space. Maximum is 1023984 bytes.
Global variables use 43924 bytes (53%) of dynamic memory, leaving 37996 bytes for local variables. Maximum is 81920 bytes.
Uploading 482064 bytes from /var/folders/xv/crvzgz1524sd7__nxwb8ttrw0000gn/T/arduino_build_451341/sonoff.ino.bin to flash at 0x00000000
warning: espcomm_send_command: didn't receive command response
An error occurred while uploading the sketch
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
error: espcomm_upload_mem failed

@maartenpaauw
Copy link

Just started today with playing around with my Sonoff. I followed the Wiki page and getting the same warnings and errors.

@jeylites
Copy link
Author

jeylites commented Oct 3, 2017

@maartenpaauw

Just wondering, what Arduino IDE version are you using? Everything went bad after upgrading to Arduino 1.8.4 (MAC OSX), so I downgraded to 1.8.3 and it worked.

Another note, I recently upgraded to macOS High Siera, and I discovered that the Chinese made CH340G / CH341G is not macOS High Siera compatible. The OS crashes at every plug in.

@maartenpaauw
Copy link

I tried to build and upload with Visual Studio Code and Atom with the Platform.io package installed.
I recently upgraded to Mac OS High Siera aswell.

This is the FTDI I ordered from Ali Express.
https://www.aliexpress.com/item/Free-shipping-FT232RL-FT232-FTDI-USB-3-3V-5-5V-to-TTL-Serial-Adapter-Module-Mini/32351819193.html

When I plugged it in it shows up in the USB list:
schermafbeelding 2017-10-03 om 16 34 45

@alton76
Copy link

alton76 commented Oct 3, 2017 via email

@maartenpaauw
Copy link

@alton76 I'm looking forward to your results.

@maartenpaauw
Copy link

maartenpaauw commented Oct 3, 2017

Some extra information.

Photo's how I wired my Sonoff to the FTDI module:
https://photos.app.goo.gl/FYk2497J7Been4ov1

Video how I try to get the Sonoff in flash mode:
https://youtu.be/8pD-jmpa5aM

The log/output I get when I try to upload the firmware:
https://gist.github.com/maartenpaauw/a8312b8cc4b01af189aad450d6d67938

The things I configured are the WiFi settings (SSID & password) and uncomment the env_default = sonoff line.

I own the Sonoff and FTDI chips 2 times and tried it in multiple combinations.

@jeylites
Copy link
Author

jeylites commented Oct 3, 2017

@maartenpaauw

four things...

  1. verify the RX & TX ports

Eg: FTDI RX ---> TX ESP8266
FTDI TX ---> RX ESP8266

  1. Make sure you have these settings correct
    screen shot 2017-10-04 at 1 41 43 am

  2. Before you start the uploading process, check to see if Arduino IDE (PORT) see the FTDI.

  3. I had the same error but after downgrading to Arduino IDE 1.8.3 (Mac OSx) it worked.

My setup:
Arduino IDE 1.8.3
macOS Sierra 10.12.6
Tasmota 5.8.0

@maartenpaauw
Copy link

@jeylites

I tried to flash the firmware with Arduino IDE with the settings displayed in the image above.
Still got the same error (the error you posted).

The only thing different:
My OS is High Sierra (10.13)

Did anyone else successfully flash the firmware with High Sierra?

@nicolasbisi
Copy link

Just to confirm that it is indeed a problem with High Sierra. I was uploading fine and after the update, it was not working anymore. I tried on another computer still running Sierra and it worked fine.

@alton76
Copy link

alton76 commented Oct 4, 2017 via email

@maartenpaauw
Copy link

I switched to Windows and was able to flash the firmware. I think it is a High Sierra issue.

@lobradov
Copy link

lobradov commented Oct 4, 2017 via email

@jeylites jeylites changed the title espcomm_upload_mem failed espcomm_upload_mem failed - High Sierra issue Oct 5, 2017
@prigal
Copy link

prigal commented Oct 7, 2017

Same problem here with High Sierra.
Back to Sierra on an other mac, it works fine.

@JeremyHX
Copy link

JeremyHX commented Oct 22, 2017

Same issue - did someone find a workaround (besides reverting to Sierra)?

@ol-v-er
Copy link

ol-v-er commented Oct 23, 2017

Just solved the problem.

Install the VCP drivers for Mac from the FTDI website : http://www.ftdichip.com/Drivers/VCP.htm

After install, reboot (it does not work if you do not reboot).

After reboot, plug the FTDI USB/serial converter. Accept the security alert from MacOS.

Restart the flash process. It works!

PS : I found the info here https://forum.arduino.cc/index.php?PHPSESSID=elctcucgnv8b3nv2k72j2nihc7&topic=427825.15

@fcrespo82
Copy link

Sorry guys! I know that reactions are for what I am saying here. But I NEED to thank @ol-v-er !!

This saved me hours of internet research for this error. I thought I lost my sonoff but tried this and OMFG it worked!!

Thank you very much!

@65sc02
Copy link

65sc02 commented Dec 22, 2017

THis worked for me, too! Oh my God!!! Thank you soooo much!!

@maartenpaauw
Copy link

If Homebrew is installed and caskroom/cask is tapped you can install it with brew cask install ftdi-vcp-driver.

@tIsGoud
Copy link

tIsGoud commented Jan 7, 2018

Good team effort, thanks!

In addition to @maartenpaauw I had to install the caskroom drivers:

brew tap caskroom/drivers
brew cask install ftdi-vcp-driver

After that the uploading worked fine again.

@mitchwd
Copy link

mitchwd commented Jan 18, 2018

Amazing. Thanks so much @ol-v-er and @tIsGoud!

Surprisingly, I was able to get the upload working over esptool.py (before installing the drivers), but I don't know enough about the differences yet to know why!

@johnhopkins
Copy link

Another thanks to @ol-v-er. This solved the issue for me.

@coyte
Copy link

coyte commented Jan 25, 2018

Same here: High Sierra, esptool.py worked, espcomm failure. Spend a day looking for cause. After installing drivers en replugging USB cable, the issue was solved.
Big thank you to all involved !!!!

@stale
Copy link

stale bot commented May 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Action - Issue left behind - Used by the BOT to call for attention label May 25, 2018
@stale
Copy link

stale bot commented Jun 9, 2018

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

@teejay-87
Copy link

Me too, thanks to @tIsGoud and @ol-v-er

@ArthurZhou
Copy link

i think i have found a solution.
(thaks for this chinese document)


  1. go to /Users//Library/Arduino15/packages/esp8266/tools/esptool (path on macos, im not sure where is it on windows)

  2. delete folder 0.4.9

  3. then download esptool-0.4.12 and extract it

  4. copy the folder you've just extracted to the folder you've opened before and rename it to 0.4.9

  5. try to flash again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
Development

No branches or pull requests