Hi all,
I've been struggling to flash my new Sonoff Pow R2 with sonoff-tasmota and would appreciate some advice with troubleshooting! This is my first time using any Sonoff device, and the first time using the GPIO on a pi, so it could be something really stupid.
The TL;DR is that I can't get esptool to connect to the sonoff. I'm not sure if I've failed to put it in flash mode, but when I try to erase the flash (or read_mac) I get the following output:
$ sudo esptool.py --port /dev/ttyAMA0 erase_flash
esptool.py v2.4.1
Serial port /dev/ttyAMA0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Expressif device: Timed out waiting for packet header
I get the same result if no device is attached.
The device I'm trying to flash is a Sonoff Pow R2 (board says v1.0, 2017-11-30). I've soldered a 6-pin female header onto the Sonoff, and have some male to female jump leads to connect to the pi.
I'm using a Raspberry Pi B as I don't have a USB to serial programmer.
The software on the pi is a fresh installation of Raspbian Jessie (Lite), with esptool v2.4.1 installed using pip (python 3 version)
I have followed the
instructions on the wiki for setting everything up, replacing ttys0 with ttyAMA0 throughout as my Pi is the older type.
I am of course holding the button down as the 3.3v power is connected to the sonoff. I've tried both holding the button before the power is connected and then releasing after a couple of seconds, and holding it and keeping it pressed until the command is running.
Things I've already tried:
- Verified the voltage output from the pi using a digital multimeter (I get 3.28v, which doesn't drop when I connect the sonoff). The reading is the same on the pi, at the ends of the jump leads, and at the solder at the bottom of the header.
- Changed jump leads
- Changed the power supply to the pi. The supply I'm using is a decent 3A lead made specifically for a pi.
- Checked my soldering - I'm quite new to it but I can't see a solder bridge anywhere
- Tried another raspberry pi (another model B)
- Swapped the TX and RX leads over - same result
- Double checked that I've set up the pi correctly so serial-getty is not hogging the serial connection (again, using /dev/ttyAMA0 instead of /dev/ttys0 because my pi is older)
Any ideas?
Some photos attached. Please don't judge me for my terrible soldering!
Before anyone freaks out, the AC is not connected - the wires coming off the unit are connected to push connectors.



