Skip to content

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 article
Published inElectronics


  1. Vince Vince

    Hi !

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

    • admin admin

      Hi Vince,

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

      Have fun!


    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 admin

      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 admin

      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

    • Cristi Cristi

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

      • admin admin

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

  4. 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.

    • admin admin

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

  5. Ryan Ryan

    So can you just solder bridge the gap?

    • admin admin

      Yes indeed, in stead of using a wire you can use a lot of solder ๐Ÿ™‚

  6. Bert Bert

    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 admin

      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.

  7. Lucas Lucas

    You just saved my Sonoff RF throwing into bin. Great finding and so easy to do. Brilliant.

    • admin admin

      Well, that’s awesome to hear on a friday evening ๐Ÿ™‚ What are you creating?

      • Lucas Lucas

        Well, all I am doing at the moment is more testing, rather implementing home automation stuff. I have one Sonoff RF, which (thanks to you) I managed to flash finally with Tasmota. I also have one Sonoff Basic, which I flashed with it few days ago. I also have two no-name WiFi plugs with Esp8266 modules which are operated by Smart Life app and I am still wondering if there is any way I can also flash them with Tasmota, so my Home Assistant can pick them up. Rpi3 just got HA installed few days ago, which I still need to configure for Samba share, MQTT broker, etc. All this supposed to be basic setup, so when I say “night night” or something like that, it will switch all downstairs lights off and switch bedroom light on, etc. I know it’s complete basic setup, but eventually it’s going to be bigger and bigger. Actually echo dot doing this at the moment, but HA, MQTT there is so much potential in there. Now I would like to get some more sonoff’s.
        Ufff, that took a lot of writing.

  8. Lucas Lucas

    I think I celebrated success to early. Although your method still works, my Sonoff RF is dead (I think).
    Long story short… I had problems with it since the very beginning. It worked when I first plugged it in. When I unplugged it and plugged in again after few minutes it did not turn on. Every gap between unplugging and plugging back in had to be minimum 24hrs, otherwise it would not work. Never had that problem with sonoff basic. I could plug it in and out as often as I wanted to.
    When I flashed it with tasmota yesterday, first thing I tried was plugging it in few times and it worked, so I thought it was software issue before. Happy with results I installed it to main light. After about 20 minutes later, I could not turn light on using RF remote. Also it would not respond to main button on the switch itself. I thought I could flash it again today, so I did, with success. But after plugging it in, no response again. LED is not blinking at all (it does flash when installing tasmota). Correct me if I am wrong, but it did not behave normal from very beginning?

    • admin admin

      I’ve experienced similar funny things. The issue is that the ESP is coming from China. That’s not necessarily bad, but there are many modules out there, and not all might be of good quality. Also, hardware (soldering) might be acting up and your USB-TTL converter might be causing issues. I’ve also seen issues with the power supply.

      Long story short: There are many points of failures, especially if you start hacking the thing ๐Ÿ™‚

      Did you try getting serial output to see if the device is properly booting?

      • Lucas Lucas

        Hi, thanks for your reply. Unfortunately I don’t know what procedure you are asking me about. Thanks.

        • admin admin

          When your USB-Serial adapter is connected, you can use it to flash the device, but if you connect a terminal program to the COM port, you should also see Serial output from the ESP8266 (I’m not sure at which baud rate, it depends on your firmware).

          It could give you hints why it’s booting or not.

          • Lucas Lucas

            I think I will leave for now. Like I mentioned, I had problems with it since the very beginning, so there is possibility that something went wrong during production. Maybe I will come back to it one day.
            Thanks for all your support.

          • admin admin

            I did the same thing with mine… Fun things, but sometimes not very reliable; also I hate programming & debugging them.

            Keep me posted on other endeavors. Always nice to see. Got a website/twitter?

          • Lucas Lucas

            No website, but you can find me on Twitter and Instagram under cholek3.
            I am no programmer or developer of any kind. If not all those video tutorials, I probably wouldn’t be even here. ๐Ÿ˜‰

  9. Rey Luther Itchon Rey Luther Itchon

    Hi! After flashing Tasmota into the sonoff rf, does the remote still work?

    • admin admin

      I’m afraid that I don’t know. I checked their github page, but didn’t see a mention of RF. Maybe it’s one of the chips that are in their supported list.

      List project though!
      Check the project or make an issue on their github. Good luck

    • Lucas Lucas

      Yes, it does. If I remember correctly, you have to use same pairing method as you do with standard sonoff firmware.

  10. Colin Colin

    I think you will need a wire to pull R21-2 to GND during boot because it will need to be removed to pair the RF control.

    • admin admin

      It’s been a while since I looked at this, so I can’t tell you!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.