Tasmota: espcomm_upload_mem failed - High Sierra issue

Created on 3 Oct 2017  Â·  25Comments  Â·  Source: arendst/Tasmota

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

stale

Most helpful comment

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

All 25 comments

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

@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.

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

I tested those FTDI types and it worked however the CH34X types, crashes
the OS. I read some where on the net of a similar problem and a fix, I have
yet to look into it.

On Tue, Oct 3, 2017 at 10:40 PM Maarten Paauw notifications@github.com
wrote:

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:
[image: schermafbeelding 2017-10-03 om 16 34 45]
https://user-images.githubusercontent.com/4550875/31131081-6e6d74f6-a859-11e7-824b-5e29660aa368.png

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/957#issuecomment-333863348,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ae1zHzFCJTglZRi6w4gQUmOUdnxgSeG0ks5sokc_gaJpZM4PrqZN
.

@alton76 I'm looking forward to your results.

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.

@maartenpaauw

four things...

1) verify the RX & TX ports

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

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

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

4) 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

@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?

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.

Could agree more, there is an issue with High Sierra and I have re-confirm
it with a test. Sierra seem a whole lot stable...

At this point, either reinstall to Sierra or install two OS X in one
machine. I haven’t done the dual thing but it’s possible if you want to
keep High Sierra

https://www.google.com/amp/www.macworld.co.uk/how-to/mac-software/how-dual-boot-os-x-el-capitan-macos-sierra-on-mac-3659676/%3Famp

On Wed, Oct 4, 2017 at 12:11 PM nicolasbisi notifications@github.com
wrote:

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.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/957#issuecomment-334045067,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ae1zH7DWwtS_ulU1eEY-O7CoHhKnTt0Hks5sowVXgaJpZM4PrqZN
.

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

Would someone care to update Wiki (uploading section) to insert a note
about this?
We can remove if once the issue is solved...

On 4 October 2017 at 09:11, Maarten Paauw notifications@github.com wrote:

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

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/957#issuecomment-334068838,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcWpOme0NkQ9Sv-Mdn0Ob-pwBWQTgDznks5soy--gaJpZM4PrqZN
.

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

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

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

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!

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

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

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.

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!

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

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 !!!!

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vujagig picture Vujagig  Â·  3Comments

renne picture renne  Â·  3Comments

ximonline picture ximonline  Â·  3Comments

JoergZ2 picture JoergZ2  Â·  3Comments

wirelesssolution picture wirelesssolution  Â·  3Comments