ESP8266: flashing NodeMCU V1.0 on Mac OS X (or ESP8266 ESP-12E in general?)

A few days ago a package arrived from SeeedStudio: the new NodeMCU board V1.0 (see picture)

The NodeMCU V1.0 (picture from here)

On paper it has some nice advantages compared to the old V0.9 version or also to other ESP8266 dev boards: you can directly connect it to your computer for programming and you won’t need an additional USB-to-Serial programmer or an external power supply. The USB connector does the job. The only problem: they must have changed something on the interface. Flashing doesn’t work out of the box anymore:

stdin:1: open a file first

is what I got when trying to upload a file with the ESPlorer to the module…

I’m programming on a Mac, so all the fancy Windows based flashing tools won’t work for me directly. I usually use the adapted Arduino IDE or the to upload new images to the device. This posts describes how you can flash the new hardware despite the problems with the esptool. Basically it shows how you can use the original Windows tool from Espressif from your Mac OS X system, even if it is made for Windows.

  1. Download and install driver for the CP2102 from here:
  2. If you don’t already have it install homebrew:
  3. Install wine:
    brew install wine 

    I had to work around some issues with brew and wine. Write a comment if you want to know how I resolved them…

  4. Download the latest Flashing tool from Espressif:
  5. Install unrar (if you don’t already have it):
    brew install unrar
  6. Unpack the flash tool:
    unrar x FLASH_DOWNLOAD_TOOLS_v1.2_150512.rar
  7. Install unrar (if you don’t already have it):
    brew install unrar
  8. Enter the directory and start the Flashing Tool:
    cd FLASH_DOWNLOAD_TOOLS_v1.2_150512
    wine flash_download_tool_v1.2_150512.exe
  9. Now that the wine directory has created enter the dosdevices folder and create a symlink to your NodeMCUs tty device:
    cd ~/.wine/dosdevices
    ln -s /dev/tty.SLAB_USBtoUART com1
  10. Select your image and adjust the settings according to this screenshot:
    ESP Flash Tool started from wine: adjust the settings accordingly
  11. Now connect the NodeMCU module using USB and press the RST button while you keep pressing the FLASH button. This will put the module into the right state for flashing
  12. Now click START in the flasher tool and wait until it is finished. Click RST again and have fun.

I hope that the esptool gets fixed quickly to work with the new hardware. I’m also not sure whether the problems comes from the USB-to-Serial converter or rather from the ESP-12E module. I suspect it is the later, but I couldn’t find anyone complaining about problems with the ESP-12E in general.

Shopping Links:

Now a beer! Did you like this post? It often takes me several hours of my free time to write one. If I was your neighbour would you offer me a beer for the hard work I did for you? The beauty is: beers can be teletransported with a painless donation using Paypal. A beer in a Swiss bar costs about USD $4.80. Or use this affiliate link if you order something on Banggood and I'll get a small kickback. Thank you!