Tasmota icon indicating copy to clipboard operation
Tasmota copied to clipboard

Latest version of sonoff basic does not enter flash mode

Open whhsw opened this issue 9 years ago • 226 comments

Just got 4 new sonoff basic (5 pin on the board). None of them can enter flash mode. Press program button and connect usb to computer, does not show any thing different to output console.

I also have some old sonoff 4CH. With same computer, same USB cable, same configuration, I can access flash mode on old devices. So I believe it's not the problem of cable or connection. Seems that there is some kind of protection on the newer firmware.

Any suggestion on what I should do next step for debug ? (Sorry I am a software engineer, newbie to hardware part..)

Seen similar issues on other thread, related to different modules: https://github.com/arendst/Sonoff-Tasmota/issues/453 https://github.com/arendst/Sonoff-Tasmota/issues/443

wechatimg4 wechatimg5

whhsw avatar May 20 '17 10:05 whhsw

Ignore the pin further from the button. The wiki shows which pin is which. You must hold down the button as you insert the vcc pin (then you can let go). It should now be in flash mode.

dobrynski avatar May 20 '17 12:05 dobrynski

yeap, I followed exactly what the wiki says. It does not work. This is the only thing serial port prints. It does not give out anymore info like the old 4ch does.

--- Miniterm on /dev/cu.usbserial 115200,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

This is the upload error. Uploading .pioenvs/sonoff/firmware.bin warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed *** [upload] Error 255

whhsw avatar May 20 '17 13:05 whhsw

Try to execute pio run -v -t upload from a PlatformIO serial console and analyse the output.

arendst avatar May 20 '17 14:05 arendst

Got 2 new sonoff-basics looking exactly the same as yours (including the hardware mod, extra component soldered between D5 and C?). They flashed without issues.

Did have another problem. After successfully flashing 5.0.7 unit didn't give any sign of life anymore. Re-flashing didn't help. After flashing a 4.0.3 backup image it starting working and then did an upgrade via web to 5.0.7 without further issues. YMMV

gdave321 avatar May 20 '17 14:05 gdave321

@arendst Thanks for guiding! Here is the the output. Is there anything helpful?

[skipped some complication message]. Auto-detected: /dev/cu.usbserial esptool -vv -cd ck -cb 115200 -cp "/dev/cu.usbserial" -cf .pioenvs/sonoff/firmware.bin esptool v0.4.9 - (c) 2014 Ch. Klippel [email protected] setting board to ck setting baudrate from 115200 to 115200 setting port from /dev/tty.usbserial to /dev/cu.usbserial espcomm_upload_file espcomm_upload_mem

opening port /dev/cu.usbserial at 115200 tcgetattr tcsetattr serial open opening bootloader resetting board trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload resetting board trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload resetting board trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload 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 *** [upload] Error 255

whhsw avatar May 20 '17 16:05 whhsw

@gdave321 did your device print out anything in serial console before the flash? These ones do not print anything out.. What's the date print on the warranty label on your devices? Mine is marked as 2017/03/15 (the only date I can find out of the device).

wechatimg5

whhsw avatar May 20 '17 16:05 whhsw

I have a very similar issue. My date is 2017/3/10. I cannot flash it in any way. No terminal output. And all flash attempts result in: warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed

DarkAllMan avatar May 22 '17 10:05 DarkAllMan

Have you tried swapping around the TX/RX connections?

dobrynski avatar May 22 '17 11:05 dobrynski

I have tried that yes.....

DarkAllMan avatar May 22 '17 11:05 DarkAllMan

I made some progress! Though still have no idea of why, and the way to success is not reproducible.

Out of the 4, I randomly got two worked... A rough sequence of what I did is: swap TX/RX, so the connection is TX-TX, RX-RX. hold the power button, plug in usb cable. Keep holding power button all the way, do not release. And then out of many times of try, it just uploaded !!!!

Highly suspect this is related to some kind of timing issue (sth. like input any key within this N seconds, otherwise it will reboot normally.). Since even after the succeed upload, I can't reproduce with the same device twice.

Also another thing I noticed is, green light does not flash everytime it's plugged in. So would it be possible that this new model need 5v power supply ? Don't want to risk burning it...

whhsw avatar May 22 '17 13:05 whhsw

Trying..... but I am not not able to produce the same result as you did....

DarkAllMan avatar May 22 '17 14:05 DarkAllMan

The reverse of RX / TX has solved the problem. (Sonoff S20) THX!

settenke avatar May 23 '17 18:05 settenke

Still not able to flash it......... no idea on how to solve it....

DarkAllMan avatar May 25 '17 08:05 DarkAllMan

same here… I have 2 more left that still with no way of flashing..

If anyone could help pointed out which one is GPIO 0, wiring GPIO 0 with GND might work?

On Thu, 25 May 2017 at 4:00 PM DarkAllMan [email protected] wrote:

Still not able to flash it......... no idea on how to solve it....

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

whhsw avatar May 25 '17 08:05 whhsw

Is there an update to this issue?

DarkAllMan avatar Jun 06 '17 14:06 DarkAllMan

Not sure if they have perhaps made a change.. but on my sonoff Dev I have to hold the flash button down until flashing starts (well actually I think there is a 2second window - but easiest to just hold the button down until flashing starts).

Worth a try?

khcnz avatar Jun 06 '17 20:06 khcnz

I did try, but nope...nothing...

DarkAllMan avatar Jun 07 '17 18:06 DarkAllMan

I had the same issue with S20. I had to swap RX/TX, and then just kept trying to flash it following @whhsw's directions and eventually it uploaded. Appears to be some sort of timing issue with the new model?

timothy-gibson avatar Jun 11 '17 03:06 timothy-gibson

The people who succeeded, what baud-rate were you using and how many times did you try it? Having the same issue with a new sonoff.

kristoffernolgren avatar Jun 22 '17 20:06 kristoffernolgren

I have 4 basic and 4 Pow on the way. So I'll let you know.

dobrynski avatar Jun 22 '17 21:06 dobrynski