Import firmware onto the NodeMCU (ESP8266); Ubuntu 18.04
Posted: Tue Feb 12, 2019 8:11 pm
Hi,
I'm trying to follow the DIY instructions from Lufdaten--a project of homemade sensors measuring air quality--to set up the Wi-fi module for my dust and temperature sensor devices.
https://luftdaten.info/en/construction- ... figuration
I've installed the Arduino IDE & Boards ESP8266 as instructed. I'm lost however when it comes to import the data collection firmware onto the NodeMCU board itself (and yes, I've it connected to my laptop).
This is the code they're referencing:
I'm executing the code in my root directory and set-up the filepath properly to the firmware's location. However I keep getting:
It's probably something silly but I've never done this before. I'm guessing that the command is moving files onto the NodeMCU and executing the firmware installation there? I would appreciate your insights, thanks!
SOLUTION
Step 1: cd into the hidden file directory where esptool is located
Step 2: install the bootloader software (i.e. esptool)
Documentation: https://github.com/espressif/esptool/bl ... /README.md
Step 3: Run the command to flash the firmware on Arduino
IF THE FOLLOWING ERROR ARISES:
Reference: https://stackoverflow.com/questions/278 ... -from-pyth
The Arduino’s LED should be blinking while the firmware is uploaded on the board.
I'm trying to follow the DIY instructions from Lufdaten--a project of homemade sensors measuring air quality--to set up the Wi-fi module for my dust and temperature sensor devices.
https://luftdaten.info/en/construction- ... figuration
I've installed the Arduino IDE & Boards ESP8266 as instructed. I'm lost however when it comes to import the data collection firmware onto the NodeMCU board itself (and yes, I've it connected to my laptop).
This is the code they're referencing:
Code: Select all
Linux: ~ / .arduino15 / packages / esp8266 / tools / esptool / 0.4.9 / esptool -vv -cd nodemcu -cb 57600 -ca 0x00000 -cp /dev/cu.wchusbserial1410 -cf /path/to/firmware/file (the port behind, -cp ‘ may need to be adjusted)
I'm executing the code in my root directory and set-up the filepath properly to the firmware's location. However I keep getting:
Code: Select all
bash: /home/COMPUTER: Is a directory
It's probably something silly but I've never done this before. I'm guessing that the command is moving files onto the NodeMCU and executing the firmware installation there? I would appreciate your insights, thanks!
SOLUTION
Step 1: cd into the hidden file directory where esptool is located
Code: Select all
cd ~/.arduino15/packages/esp8266/tools/esptool/0.4.9
Step 2: install the bootloader software (i.e. esptool)
Code: Select all
pip install esptool
Documentation: https://github.com/espressif/esptool/bl ... /README.md
Step 3: Run the command to flash the firmware on Arduino
Code: Select all
esptool --port /dev/ttyUSB0 write_flash 0x0000 ~/Downloads/latest_en.bin
- Make sure to specify the correct port; open the ArduinoIDE and check Tools > Port, then Tools > Get board info to check whether the Arduino is recognized.
- Make sure to write the correct directory path to the firmware.
IF THE FOLLOWING ERROR ARISES:
Code: Select all
then change permission privileges with [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
Code: Select all
sudo chmod 666 /dev/ttyUSB0
Reference: https://stackoverflow.com/questions/278 ... -from-pyth
The Arduino’s LED should be blinking while the firmware is uploaded on the board.