A Flashing ESP Chips Surprise

Well, you could have blown me away.  Tonight was making a little relay controller for the hot tub using a WEMOS board and relay board. I carefully soldered them together and plugged them into a USB connection on my PC, as I’ve done thousands of times.

Also as I’ve done thousands of times I flashed the board with my ESP8266 standard software which I have down to a single button-press in Eclipse.

Nothing. Dead. Thankfully my own terminal software has a 78Kbaud setting and so I went in and had a look. Checksum error. No matter how many times I flashed the board, the same result. I figured it was duff but before throwing it in the bin – I picked another of my boards, a NodeMCU clone and flashed that. Perfect.

I went back and tried the WEMOS again – duff.  I grabbed another WEMOS – duff.

This was getting to be beyond believe – two in a row? I even tried bolstering the usb power with a proper power supply – nothing.

I went looking for the checksum error and came across this post.


I noted something about changing programming modes. I figured they were talking nonsense as I’ve been blowing these chips for years without a hitch (though I HAVE had people tell me they have had difficulty blowing ESP8266 chips).   But hey, what did I have to lose. There is a line in my make file..


I changed it to dio instead of qio – something I’ve NEVER done  – and I’ve blown plenty of Wemos boards before as well.

My ESP8266 software for the Home Control Project“Imagine my surprise” when the board flashed successfully.  I plugged in the other “duff” board – THAT flashed successfully.

Could it be that there really ARE two types of Flash and for the first time ever I’ve been on the receiving end?

All’s well that ends well and I hope anyone having issues flashing boards benefits from this – but I certainly didn’t expect to be writing this!

Something here about the various modes of programming.


October 1 2017

Yet another stunning example; This time a WEMOS board with OLED. I could not get the usb connector to show up as a device on my PC – and so using my normal programming FTDI I connected up ground, 5v, rx and tx to board pins via connectors. I flashed the chip – that happened perfectly – and yet – the board would not start. The usual 78k debug info but no start. I tried this several times then remembered this blog. I changed the line in my makefile to DIO instead of QIO and VOILA, worked first time.

So again a ripoff Wemos board – I just don’t get it – what’s so special about the ESP12 boards they use?


18 thoughts on “A Flashing ESP Chips Surprise

  1. Yesterday i was updating the firmware to one of my ESP12 used for the nextion control ( I already did it several time using the same esptool.py configuration) and this time I had an error during the ereasing procedure:
    A fatal error occurred: Timed out waiting for packet content

    In the writing i had this similar error when I was writing the third componet of the firmware at
    A fatal error occurred: Timed out waiting for packet header

    I tried to change qio in dio and viceversa, also added a -u (uncrompress) following some hint from a forum but nothing.
    Anyone has some suggestion about this issue?

    1. Some more information.
      I tried with three different programmer chipset (CHU and prolific) with the same result. Also changed through several USB and PC and OSX. Same behaviour. So I suppose that something is broken at flash level.
      I also tried with other two working board i already programmed with 1.9.3.
      One during the erase_flash started to have the same issue, the other not.
      I also tried to program a 4mb blank FF on them having the same result

      sptool.py v2.1
      Detecting chip type… ESP8266
      Chip is ESP8266
      Uploading stub…
      Running stub…
      Stub running…
      Configuring flash size…
      Wrote 1048576 bytes at 0x00000000 in 93.0 seconds (90.2 kbit/s)…
      Hash of data verified.
      Wrote 1048576 bytes at 0x00100000 in 93.0 seconds (90.2 kbit/s)…
      Hash of data verified.
      Wrote 1048576 bytes at 0x00200000 in 93.0 seconds (90.2 kbit/s)…
      Hash of data verified.
      Writing at 0x003c0000… (76 %)
      A fatal error occurred: Timed out waiting for packet header

      The only thing I noticed that I’m having this issue using an ESP12S while I have no problem on two ESP8266MOD aithinker…

  2. I use always dio, it is slowly respect to qio,but you have two more pin usable.
    Many esp version module bring it out and many framework support it.
    Normally the flash have all 4 pin connected inside the esp module, so the two flash metod work always, but can be that some manufacturer only connect two flash pin to the esp chip, so in this case you can use only dio.
    It means QuadInputOutput – DualInputOutput

  3. I was prepared to trash my two Sonoff’s that exhibited this problem, exactly as you describe it right down to the checksum error.

    Thanks to your prompting, the solution for me was quite simple. I use the Arduino IDE to program my esp’s, and simply changing the “Flash Mode: DIO” to “DOUT” fixed it.

    1. WELL – there you go – I wonder how many other souls will have their ESPs saved because of this chance discovery…. excellent – glad to hear it.

    2. I’m gonna go back and check my ESP8266s and Sonoffs tonight! I thought I had a bad/cheapie USB-TTL adapter… (well that still might be the problem, but!)

  4. Question not related the issue you encountered, but instead about the relay. I have been looking for some relays that can support some high resistive loads 15+ amps. What are you using on your hot tub? Is the relay to control the pump or to turn to heater on and off. My purpose is to control a pool pump and a hot tub pump. I tried some that claim they support up to 25A but they burn out in less than a month.

    Thank you


    1. Hi there

      I’m just controlling the pump – for something like the motors – may I suggest simply using a little relay – the type you get with Arduino- to control a CONTACTOR – you can get those as big as you like… usually 240v in to a coil then a honking great set of contacts – not expensive.

    2. inductive loads need arc suppression across the relay contacts. say 100r 1 watt resistor in series with a 0.47 uf capacitor. a varisitor across the motor windings will also help.

    1. Doesn’t really tell you much Philippe – and the boards that have that mode don’t bring the pins out – also easyGPIO probably doesn’t implement them (I don’t use Arduino).

      But thanks for the info.

      1. This may or may not be useful to you Pete, I use the Wemos D1 mini pros with an external twig for my remote sensors, when I first started I had big problems programming the devices from the Arduino IDE that is they just sprung up errors all the time, after a lot of messing about and trying different things it appeared that they would only program with a usb lead of about 5 inches long, anything longer gave me problems.


        1. That will likely be power, Stuart. If the USB voltage is a little low to start with and a bad lead makes it worse then you could get problems. I ONLY use short leads and the stiffer the better.

          1. but you need to test them anyway… bad usb cables with just thick insulation EXIST, only one of those cheap usb power meter can tell you how good they are… i had bad experiences with short cables, too, now i always test them with an usb load…

Comments are closed.