Roman Chyla 4e6370c9cc Added setup.py in order to allow installation by pip | 8 年之前 | |
---|---|---|
LICENSE | 9 年之前 | |
README.md | 8 年之前 | |
nodemcu-uploader.py | 8 年之前 | |
setup.py | 8 年之前 |
A simple tool for uploading files to the filesystem of an ESP8266 running NodeMCU as well as some other useful commands.
It should work on Linux, Windows, and OS X; and with any type of file that fits the filesystem, binary or text.
–port and –baud are set to default /dev/ttyUSB0 and 9600 respectively.
###Upload Uploading a number of files. Supports multiple files. If you want an alternate destination name, just add a colon «:» and the new destination filename.
./nodemcu-uploader.py upload init.lua README.md nodemcu-uploader.py [--compile] [--restart]
Uploading a number of files, but saving with a different file name.
./nodemcu-uploader.py upload init.lua:new_init.lua README.md:new_README.md [--compile] [--restart]
Uploading a number of files and verify successful uploading.
./nodemcu-uploader.py upload init.lua README.md nodemcu-uploader.py -v
###Download Downloading a number of files. Supports multiple files. If you want an alternate destination name, just add a colon «:» and the new destination filename.
./nodemcu-uploader.py download init.lua README.md nodemcu-uploader.py
Downloading a number of files, but saving with a different file name.
./nodemcu-uploader.py download init.lua:new_init.lua README.md:new_README.md
###List files
./nodemcu-uploader.py --port com1 file list
###Format filesystem
./nodemcu-uploader.py file format
###Remove specific files
./nodemcu-uploader.py file remove foo.lua
To solve «ImportError: No module named serial», install the pyserial module:
python easy_install pyserial
This is almost an implementation of xmodem protocol for the upload part.
SOH, size, data[128]
This gives a total 130 bytes per block.
The block size was decided for…