Upload files to NodeMCU from Windows Bash
Uploading files to a NodeMCU ESP8266 can be done with the Java tool ESPlorer. If you want to automate this process, you’ll want to use something else.
A quick research brought up NodeMCU-Uploader, which is a python script. On my Windows machine, I’ve got the bash installed. Naturally I want to use it 🙂
Fortunately the bash allows access to the COM ports. You have to modify the permissions for the device though.
sudo chmod 666 /dev/ttyS3
where “3” is the COM port, you can see in the Windows Device Manager
After that, the COM port can be access. The uploader can be installed with pip.
sudo apt install pip
pip install nodemcu-uploader
After everything has been set up, files can be uploaded by specifying the port and file
nodemcu-uploader --port /dev/ttyS3 upload application.lua