All Projects → kmpm → Nodemcu Uploader

kmpm / Nodemcu Uploader

Licence: mit
Upload files to your esp8266 running nodeMcu

Programming Languages

python
139335 projects - #7 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to Nodemcu Uploader

Openmqttgateway
MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility, SMS & LORA.
Stars: ✭ 2,413 (+732.07%)
Mutual labels:  nodemcu, esp8266
Nodemcu Tool
🔧 Upload + Manage Lua files on NodeMCU
Stars: ✭ 248 (-14.48%)
Mutual labels:  nodemcu, esp8266
Lorawangateway
A LoRaWan Gateway in LUA
Stars: ✭ 197 (-32.07%)
Mutual labels:  nodemcu, esp8266
Swifitch
Swifitch is ESP8266 based relay board that could be used to turn any light or any wall socket into smart one!
Stars: ✭ 117 (-59.66%)
Mutual labels:  nodemcu, esp8266
blynk-sketch-generator
This repository is for generating Blynk sketches.
Stars: ✭ 20 (-93.1%)
Mutual labels:  esp8266, nodemcu
Configmanager
ESP8266 Wifi connection and configuration manager.
Stars: ✭ 149 (-48.62%)
Mutual labels:  nodemcu, esp8266
Esp Lisp
Beta: A small fast lisp interpeter for a ESP8266 as alternative to lua on the nodemcu.
Stars: ✭ 236 (-18.62%)
Mutual labels:  nodemcu, esp8266
Openwifidetectoresp8266
MASLOW: an Open WiFi Detector with ESP8266
Stars: ✭ 15 (-94.83%)
Mutual labels:  nodemcu, esp8266
n2d
An easy to use ESP8266 flash tool with built-in support for the Deauther Project.
Stars: ✭ 136 (-53.1%)
Mutual labels:  esp8266, nodemcu
thingspeak-esp-examples
ESP8266 / NodeMCU Examples for https://ThingSpeak.com
Stars: ✭ 76 (-73.79%)
Mutual labels:  esp8266, nodemcu
Esp8266
ESP8266 NodeMCU Workshop
Stars: ✭ 109 (-62.41%)
Mutual labels:  nodemcu, esp8266
nodemcu-shell
UNIX-like ultra-lightweight Shell for NodeMCU supported devices (ESP8266, ESP32, Raspberry Pi, NanoPi, Orange Pi) written in Lua
Stars: ✭ 25 (-91.38%)
Mutual labels:  esp8266, nodemcu
Esp8266scheduler
ESP8266 Co-operative Multitasking
Stars: ✭ 93 (-67.93%)
Mutual labels:  nodemcu, esp8266
Esp8266 wifi captive portal
🔑 WiFi captive portal for ESP8266 for phishing WiFi passwords
Stars: ✭ 165 (-43.1%)
Mutual labels:  nodemcu, esp8266
Easyntpclient
Library to read time from Network Time Protocol (NTP) servers.
Stars: ✭ 20 (-93.1%)
Mutual labels:  nodemcu, esp8266
Awesome Esp
📶 A curated list of awesome ESP8266/32 projects and code
Stars: ✭ 212 (-26.9%)
Mutual labels:  nodemcu, esp8266
Esp Mqtt Json Digital Leds
(OBSOLETE) ESP8266 MQTT JSON Digital LEDs for Home Assistant
Stars: ✭ 503 (+73.45%)
Mutual labels:  nodemcu, esp8266
Nodemcu Firmware
Lua based interactive firmware for ESP8266, ESP8285 and ESP32
Stars: ✭ 6,884 (+2273.79%)
Mutual labels:  nodemcu, esp8266
Jarolift MQTT
Controlling Jarolift TDEF 433MHZ radio shutters via ESP8266 and CC1101 Transceiver Module in asynchronous mode
Stars: ✭ 43 (-85.17%)
Mutual labels:  esp8266, nodemcu
swifitch-software
Software for SWIFITCH HW
Stars: ✭ 12 (-95.86%)
Mutual labels:  esp8266, nodemcu

nodemcu-uploader.py

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, and OS X; and with any type of file that fits the filesystem, binary or text.

master
Build Status

Please note that these tests is not complete and it might be the tests themselves that are having issues.

Call for maintainers

Hi, This project is in need of maintenance and I (kmpm) do not have the time the project deserves. Look at https://github.com/kmpm/nodemcu-uploader/issues/90 for more information on what to do about it or email [email protected]

Installation

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
python ./nodemcu-uploader.py

Note that pip would install pyserial >= 2.7. The terminal command (using miniterm from pyserial) might not work depending on version used. This is a known issue.

Notes for Windows

There might be some significant issues with Windows.

Notes for OS X

To solve "ImportError: No module named serial", install the pyserial module:

python easy_install pyserial

Usage

Download NodeMCU firmware from http://nodemcu-build.com/ .

Since version v0.4.0 of the tool you will need a recent (june/july 2016) version of the firmware for nodemcu. The default baudrate was changed in firmware from 9600 to 115200 and this tool was changed as well.

If you are using an older firmware you MUST use the option --start-baud 9600 to the device to be recognized. Otherwise you will get a Device not found or wrong port error.

For more usage details see USAGE.md in doc

Issues

When reporting issues please provide operating system (windows, mac, linux etc.), version of this tool nodemcu-uploader --version and version of the firmware on you device. If you got the firmware from http://nodemcu-build.com/ please tell if it was the dev or master branch and at what date it was created.

As for firmware version I would like to have a dump of the details you get when connected using a terminal to the device at boot time. It would look something like this...

NodeMCU custom build by frightanic.com
        branch: master
        commit: b580bfe79e6e73020c2bd7cd92a6afe01a8bc867
        SSL: false
        modules: crypto,file,gpio,http,mdns,mqtt,net,node,tmr,uart,wifi
 build  built on: 2016-07-29 11:08
 powered by Lua 5.1.4 on SDK 1.5.1(e67da894)

When you have as much of that as possible, create a issue in github, https://github.com/kmpm/nodemcu-uploader/issues

Technical Details

This almost uses a implementation of xmodem protocol for the up-/download part. The main missing part is checksum and retransmission.

This is made possible by first preparing the device by creating a set of helper functions using the ordinary terminal mode. These function utilize the built in uart module for the actual transfer and cuts up the transfers to a set of manageable blocks that are reassembled in the receiving end.

Upload

  1. Client calls the function recv()
  2. NodeMCU disables echo and send a 'C' to tell that it's ready to receive data
  3. Client sends a filename terminated with 0x00
  4. NodeMCU sends ACK
  5. Client send block of data according to the definition.
  6. NodeMCU sends ACK
  7. Step 5 and 6 are repeated until NodeMCU receives a block with 0 as size.
  8. NodeMCU enables normal terminal again with echo

Download

  1. Client calls the function send().
  2. NodeMCU disables echo and waits for start.
  3. Client send a 'C' to tell that it's ready to receive data
  4. NodeMCU sends a filename terminated with 0x00
  5. Client sends ACK
  6. NodeMCU send block of data according to the definition.
  7. Client sends ACK
  8. Step 5 and 6 are repeated until client receives a block with 0 as size.
  9. NodeMCU enables normal terminal again with echo.

Data Block Definition

SOH, size, data[128]

  • SOH = 0x01
  • Single byte telling how much of the 128 bytes data that are actually used.
  • Data padded with random bytes to fill out the 128 bytes frame.

This gives a total 130 bytes per block.

The block size was decided for...

  1. Being close to xmodem from where the inspiration came
  2. A fixed size allow the use of the uart.on('data') event very easy.
  3. 130 bytes would fit in the receive buffer.
  4. It would not waste that much traffic if the total size uploaded was not a even multiple of the allowed datasize.

Disclaimer

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].