Updated Sonoff Basic Flashing


It’s been a while since I made my video on flashing new firmware on Sonoff basic. The way I do it now is a whole lot different than how I did it then.

Flashing over the air is more commonly used now a days, not opening up the Sonoff is preferred, which I totally understand. It’s just that in my experience, using a USB to Serial adapter has been a lot more reliable, so I’m gonna tell you how I do it.

First thing you need is a USB to Serial adapter. I’ve been using this

https://amzn.to/2mOj6ex

And it works great! If you do get this adapter, however, just be aware that it does use a mini USB cable. It’s a little older now, so you may not have one lying around. If this is the case, you may want to get yourself one of these

https://amzn.to/2JVjj8D

This uses a Micro USB which is what most non-ios phones use. This is probably the one that I would buy for my first time. Regardless of whichever USB you are going to get, you’re going to need jumper wires. If you’re going to do a bunch of Electronic projects, having a bunch of these on hand will be super useful.

https://amzn.to/2JV958g

Now because the new Sonoff Basic R2 has the serial pin holes soldered close, you can’t just use the male side of a jumper wire and poke it through, you need the Jumper Holder Thingy, (Properly Named By Drzzs himself). An easy to print object on Thingiverse

https://www.thingiverse.com/thing:2980893

It’ll hold down the Jumper Cables on the board so you don’t have too! If you do not yet have a magical 3D printer, I suggest you find one near you. Maybe it could be one of your friends, a public library or school, or makerspaces will be available to use. If you can’t find any of those, use 3D Hubs, a place that you can find local people who can print you stuff for a few dollars. If all else fails, you can email me, but if you live far away, the shipping cost can be enormous, so I would go against it. It really doesn’t make sense to pay 30$ in shipping for a 2$ plastic part.

You are also gonna need some Pogo pins, unfortunately I could not find a small pack of them, so I had to get 100 of them.

https://amzn.to/2K0dwik

Hopefully we can find some other uses for them. 🙂

These new R2 versions don’t have the QC sticker keeping the box shut anymore thank goodness. Guess they realized we don’t care about voiding warranty. The most important thing about these new Sonoff basics, is that the serial contact holes are soldered close. The square pin is 3V, then Rx, Tx, and ground are the next pins, with GPIO 14 closing us off. When you have the sonoff flashing clip, the pogo pins will slide through the holes on the top end of the clip, with the Female end of some jumpers attached to the back with the pogo pins. Squeeze the back, and it’ll open the front end, which will clamp on to the Sonoff basic. There is an extra spot for another pogo pin, but you don’t need it because it goes over GPIO 14 which you don’t need for flashing. On the other end of your Jumper wires, connect it to your FTDI adapter. The 3V and Ground pins connect the corresponding pin on the other device, but the Rx on the FTDI adapter connects to the Tx pin on the Sonoff and vice versa.

Now you go to this Git Hubs page

https://github.com/letscontrolit/ESPEasy/releases

Find and download the mega file. Save it somewhere that’s easy to find, than extract it. Now we are going to need to know where it is, so make it east to find. The next software we’ll be needing is the Sonoff.bin file.

https://github.com/arendst/Sonoff-Tasmota/releases
On this page you can find the version that you want to use. For me, I’m going to use 5.14, than I’ll scroll down to sonoff.bin and download it. I’m going to save that to the ESPez folder that I just extracted. The last bit of software we’re going to use is Termite.

https://www.compuphase.com/software_termite.htm

It’s a serial terminal that is pretty useful and makes it so that you don’t have to disconnect it from your computer to communicate with your sonoff through the serial adapter. Download the Complete Setup version, and start it up.

 

Before we start flashing, make sure that your FTDI is set to 3V instead of 5V. If you try doing this with 5V, you may do some damage. To get started, hold the onboard button on the Sonoff, and plug in the USB adapter. Some lights will come on, and you may hear a chime from your computer. After that, open your ESP mega folder, and click on Flash Esp8266 the file I like to call FlashEz. It should show the Comport that you have your serial adapter to USB plugged into. Under Firmware, select Sonoff.bin, click flash, and pray. If it doesn’t flash, check the pogo pins and make sure they are secure. Once you’ve successfully flashed your sonoff, leave the sonoff connected to the adapter, but unplug the adapter from your computer, then plug it back in. Open up termite, then open up the settings. Select the Comport that your USB adapter is plugged into, set the Baud Rate to 115200. Afterwards it should show green text, which means it is working! By watching the text that starts appearing, you can tell when it is in AP mode. You can also type commands.

Backlog SSID1 xxxxxx; Password1 yyyyyy; MqttHost brokerIP; MqttUser xxxxxxx; MqttPassword yyyyyyy; GPIO14 09; Hostname sonoff_name; MqttClient unique_sonoff_name; Topic sonoff_name; FriendlyName1 Sonoff-Name

 

This is the format that Termite uses. Fill in the x’s and y’s and names to set up the connection to your Sonoff basic. Once you enter the command, the IP adress for the Sonoff should appear. Copy and paste it into your browser. And that’s it.

I’m sure this process will change at some point, but until than that’s all for now. Until next time,
Adios!

Similar Posts