Itead Sonoff & Slampher custom firmware fix

A couple of months ago, I received an Itead Studio Sonoff and Slampher module that are meant for some home automation by using their app (and platform). I’ve made some short videos about the modules and a dissasembly. Because both modules run on the ESP8266 chips, reprogramming them with custom firmware seemed obvious. Itead even made it that easy that they provided a 4 pin header (there are now modules with 5 pin headers, but I believe I received some old versions. Mine include the 433 RF functionality).

After much experimenting, I could not get the boards (both Salmpher and Sonoff) in flash mode (program mode). This was highly frustrating as all the other people seemed to be able to! So WHY was it not working? Checking many websites, the instruction was always the same: Hold the button, plug in the USB interface, set the programmer tool to 1MB of flash and program the board. Frustrating, it didn’t work. The boards did not go into program mode!

After much more searching, I encountered a comment on Peter Scargill’s blog post from Alberto Avina. After trying out this little trick on my Slampher module, it worked!!! Finally I could follow the standard instructions and flash new firmware. He only mentioned the Slampher fix, but my Sonoff was behaving the same. Therefore, the search began on the Sonoff board which resistor they forgot (or on purpose) did not install. The search was finalized quickly by using the Sonoff schematic (R21 towards the E-FW or GPIO0).

After putting a little wire on both footprints, both the boards now work! For your reference, I have attached pictures of which resistors to fill in.

Slampher programming mode fix (click for full size)

Sonoff programming mode fix (click for full size)

Share this post
Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0
Leave a comment


  1. Vince

     /  November 1, 2016

    Hi !

    SO you just solder the wire to flash the firmware, and take it off after ?

    • admin

       /  November 5, 2016

      Hi Vince,

      The little wire stays. It doesn’t impact normal operation.

      Have fun!


     /  November 15, 2016

    It appears I have a slightly different board from yours. Do you think you could circle where I have to solder the wire on my board attached if it can be done?

    Kind regards

    • admin

       /  November 16, 2016

      Hi Steven, It looks like you have a version withouth the RF module. Therefore they removed some stuff from the board! The rest of the PCB looks quite the same. I believe you don’t have anything to do. There is a 0 ohm resistor on the place I soldered a wire, so you should be ready to go.

      Is your serial communication working? In that case try to follow Peter’s instructions:

  3. Super Tipp. Endlich, und ich war schon am verzweifeln. Aber es reich schon mit einem feinen Schraubendreher die beiden Kontakte zu brücken beim einschalten. Ist viel einfacher als Löten. 😉

    Great tip. Finally, and I was already despairing. But it is already rich with a fine screwdriver to bridge the two contacts when switching on. Is much easier than soldering. 😉

    • admin

       /  January 1, 2017

      I think it’s more convenient than having to touch it every time you want to flash 🙂 especially during development! But yeah, that’s a quick fix too

  4. Cristi

     /  February 17, 2017


    I connect my Sonoff wifi only to a FTDI232. when booting in firmware mode or after should the green led of the device be on?

    It seems I cannot boot in firmware mode. I have the 0ohm on R21 version. but holding down the button while plugging into usb does not seem to work. Any advice?

    Thank you

    • Cristi

       /  February 17, 2017

      I just fixed it….the green and red wire were reversed (rx tx was switched…) my bad

      • admin

         /  February 19, 2017

        Hi Cristi, great to hear! Do you have a write-up of your work? I’m always interested to read!

  5. I’m having a hard time getting this to work. I’m fairly certain I’m using a sonoff RF, it has the extra component with the antenna and I have tried booting it with rx-tx/tx-rx and rx-rx/rx-rx. How can you tell if the sonoff is booted in programming mode?

    When it boots normally, the relae flips once and the light starts blinking slowly and the a green amber.

    When I boot it while only hodling down the button, the green light blinks quickly and the sonoff creates a new wifi network.

  6. papa

     /  August 13, 2017

    Thanks for your work on flashing new firmware to Slamphers. The one I just bought had a V2.0, 2017-4-14 board. How it differed from your docs 1) ESP8285, not ESP8266 2) GPIO0 connection in a different spot. Here I document flashing firmware to the new version:

    • admin

       /  August 16, 2017

      Thanks for keeping this article up to date! My devices are currently lying in the closet, due to different priorities.

  7. Ryan

     /  January 12, 2018

    So can you just solder bridge the gap?

    • admin

       /  January 17, 2018

      Yes indeed, in stead of using a wire you can use a lot of solder 🙂

  8. Bert

     /  January 16, 2018

    Hi, Thank you for this information! I managed to flash my Slampher (v 0.2) with the Sonoff-Tasmota firmware.
    I have about 8 Sonoff devices all flashed with this firmware and i am using it with mqtt and openHAB. All are working perfectly.
    But with the Slampher i do not know how i can get the device in WiFi Access Point Mode in order to configure the firmware with the correct wifi and mqtt settings.

    With the other Sonofs i have (WCD and Basic) you have to press the button 4 times, then the firmware enters in Wifi access mode.
    But with the Slampher this does not seem to work.
    I know you are using a different firmware (your own) but perhaps you ore anyone else have a suggestion how to go forward…

    Regards, Bert

    • admin

       /  January 17, 2018

      So, I understand you correctly that also on the slampher you have the Sonoff-Tasmota, where you could normally get your device in the right mode?

      It’s been I while that I played with these, but it could be worth checking out the pinout, but also make sure you don’t need the little hack described here. I remember it had to do with the pull up/down of the switch.


Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe now