What am I doing wrong when flashing an ESP8266 with Tasmota?

Hi all,

I was hoping someone could point me in the right direction (or preferably tell me what simple thing I’ve overlooked).

I’m trying to use the Freetronics USB to Serial adapter + the Sonoff Programming adapter (from this website) to flash a couple of Sonoff SV’s. I’ve used this equipment before to flash two other Sonoff SV’s with Tasmota firmware without issue.

However, today I cannot get esptool to connect to the Sonoff, instead receiving the error “Failed to connect to ESP8266: Timed out waiting for packet header”

The Sonoff appears to be in programming mode (no LED flashing), but while esptool is trying to connect, the Serial to USB adapter RX LED flashes (and the blue voltage led is on) but no

I have tried:

  • Different Sonoff SV’s (one straight out of the packet)
  • Different computers (mac, windows)
  • Different USB cables.
  • On a breadboard wiring RX to RX and TX to TX instead of RX/TX TX/RX.
  • Powering the sonoff from external power and only connecting RX + TX to the sonoff programming adapter.

Also:

  • Checked to make sure there is continuity between the USB/Serial + sonoff programming adapter for all pins.
  • Checked voltage of 3.3V is being provided to the Sonoff.

The USB/Serial adapter is being picked up by my computers and powering the Sonoff, so it doesn’t seem faulty, but equally I cannot think of anything else to swap out/eliminate.

Thanks in advance

Paul

Hi Paul, it sounds like you’ve tried many different things to isolate the problem already, which is great.

Just to make sure I understand, this combination of devices has worked in the past: you’ve successfully flashed Tasmota onto this particular Sonoff, using this programming adapter and USB-to-Serial converter, but now it doesn’t work? Is that right?

The programming adapter is the simplest part of this chain and it’s very unlikely to have failed, but it could be worth checking that just to rule it out before moving on to more complicated devices. If you have a multimeter, please try using continuity testing mode to make sure the matching pins on the adapter are connected, and there aren’t any shorts to adjacent pins.

Assuming that’s ok, the next thing to check is the USB-to-Serial adapter. Do you have any other kind of Arduino board or equivalent? If so, I can tell you how to link it to extra pins on the Arduino and pass serial data between them, so you can verify that it’s working.

Also, make sure the USB-to-Serial adapter is set to 3.3V mode, not 5V mode which could damage the Sonoff.

Cheers

Jon

1 Like

Hi Jon

Thanks for the response. Your summary of my problem was spot on. I followed your advice with further continuity testing and it turned out that I was causing a short between the rx and tx pins on the programming adapter when I was sitting the adapter in the sonoff (but not when lying it flat on the desk).

This is why only the rx led would flash I guess. I’m all sorted now, thanks again.

Cheers

Paul.