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

13 Comments

  1. Vince

     /  November 1, 2016

    Hi !

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

    Reply
    • admin

       /  November 5, 2016

      Hi Vince,

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

      Have fun!

      Reply
  2. STEVEN HENERY

     /  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?
    https://goo.gl/photos/jS64WDcakjZhj1kA7

    Kind regards
    Steven

    Reply
    • 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: http://tech.scargill.net/itead-slampher-and-sonoff/

      Reply
  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. 😉

    Reply
    • 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

      Reply
  4. Cristi

     /  February 17, 2017

    Hi,

    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?
    https://goo.gl/photos/9yNjYJgBbEXumBPAA
    https://goo.gl/photos/RTFCemWPVigBBsBN7
    https://goo.gl/photos/KqamhXAdFRwyk52v8

    Thank you

    Reply
    • Cristi

       /  February 17, 2017

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

      Reply
      • admin

         /  February 19, 2017

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

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

    Reply
  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: http://homeautomation.proboards.com/thread/259/program-slampher-socket-esp8285-esp8266

    Reply
    • admin

       /  August 16, 2017

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

      Reply

Leave a Reply

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

Subscribe now