Like a lot of people I’ve been reprogramming the range of sonoff devices with alternative firmware for simpler Alexa control.
However the latest S20 socket I bought didn’t flash quite as easily as the first one I tried.
First of all soldering on the header was made a little bit more difficult due to the new construction.
1: Unscrew the 3 black Phillips head screws
2: Separate the 2 halves of the plug
3: Take a 3mm drill bit and carefully drill out the top of the 2 plastic posts at the socket end which are holding the circuit board in.
4: Carefully turn over the PCB and solder on your header.
Connect your FTDI connector to the S20, in this picture orange = gnd, yellow = RX, Green = TX, Blue = Vcc (3.3v)
You don’t appear to have to reverse tx and rx to program these.
Load the arduino editor and the sketch you want to load, to program these you need these settings in Arduino IDE
80mhz CPU Frequency
40mhz Flash frequency
115200 Upload Speed
1M(128kb) SPIFFS Flash Size
DOUT Flash Mode