When your NodeMCU V3 development board is misbehaving or not functioning as expected, you may test the NodeMCU V3 using Esptool.
Esptool does not only work on NodeMCU V3. It works on any microcontroller module or development board using ESP8266 and ESP32.
A command line utility to communicate with the ROM bootloader in Espressif ESP8266 & ESP32 microcontrollers.
Allows flashing firmware, reading back firmware, querying chip parameters, etc.
Project Description – https://pypi.org/project/esptool/
How to Install Esptool
To install Esptool, you need to install Python first. Esptool works on top of Python. You don’t install Esptool by downloading from a link and running an installation program. You will install Esptool using Python pip.
Head over to https://www.python.org/downloads/. Download and install the latest version of Python, which, as of this writing, is version 3.8.1.
In Windows 10, open a command prompt, go to the directory where you installed the Python software. Go to the “scripts” directory. Then, on the command prompt, type “pip install esptool”.
1 | C:\Python\Scripts>pip install esptool |
Running the Esptool Tests
Display the NodeMCU V3 chip ID.
1 | esptool.py --port com8 chip_id |
Display the NodeMCU V3 flash ID.
1 | esptool.py --port com8 flash_id |
If you are testing a newly purchased NodeMCU V3 development board, you may want to save its existing, factory supplied firmware. This only works if you have not yet loaded any Arduino sketch on the board. Uploading and running an Arduino sketch on a NodeMCU V3 development board overwrites and erases its factory supplied AT Commands firmware.
1 | esptool.py --port com8 read_flash 0 0x400000 nodemcu_backup.bin |
Supplied Esptool read_flash parameter meaning:
- com8 – the port where NodeMCU V3 is connected
- 0 – start adddress of flash memory to read
- 0x400000 – end address of flash memory to read (4MBytes)
- nodemcu_backup.bin – the filename where to save the firmware
To restore the firmware later on, use the following esptool command:
1 | esptool.py --port com8 write_flash 0 nodemcu_backup.bin |
Related Articles on How to Test NodeMCU V3 Using Esptool
Arduino Reference and Resources
How to Test NodeMCU V3 Using Arduino IDE
How to Use MCP4725 Module with Arduino
How to Use ADS1220 ADC Module with Arduino
References on How to Test NodeMCU V3 Using Esptool
Esptool – https://github.com/espressif/esptool
NodeMCU on Wikipedia – https://en.wikipedia.org/wiki/NodeMCU