Flashing LOLin NodeMCU v3

Using various clones of open hardware is not that surprising. One time I bought a clone (loose implementation?) of NodeMCU v3 called LOLin v3 which is using CH304G TTL to USB converter.

If you are using Windows then you should install CH304G driver before doing anything else. As for information needed for flashing, here is the specification:

Baud rate: 9600
Flash Mode: QIO
Flash Size: 4MiB
Flash Frequency: 40MHz

You will need a combined firmware binary. If you are compiling it by yourself, I suggest using one of the development branches. To write the firmware use esptool.py:

$ esptool.py --port /dev/ttyUSB0 --baud 9600 erase_flash
$ esptool.py --port /dev/ttyUSB0 --baud 9600 write_flash \
  --flash_mode qio --flash_size 4MB --flash_freq 40m \
  0x00000 combined-firmware-file.bin
To test it you can connect to it with e.g. screen:
$ screen /dev/ttyUSB0 115200

See also