kmpm 3864c861bd some more work and lint | 8 年之前 | |
---|---|---|
lib | 8 年之前 | |
.gitignore | 8 年之前 | |
.pylintrc | 8 年之前 | |
LICENSE | 8 年之前 | |
README.md | 8 年之前 | |
run.py | 8 年之前 | |
setup.cfg | 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.
Should be installable by PyPI (prefered) but there might be packaging issues still.
pip install nodemcu-uploader
nodemcu-uploader
Otherwise clone from github and run directly from there
git clone https://github.com/kmpm/nodemcu-uploader
cd nodemcu-uploader
./run.py
Create a issue in github, https://github.com/kmpm/nodemcu-uploader/issues
THE SOFTWARE IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
–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…