|Godzil 1170da409b Merge remote-tracking branch 'upstream/master'||4 years ago|
|doc||5 years ago|
|nodemcu_uploader||4 years ago|
|tests||5 years ago|
|.gitignore||5 years ago|
|.travis.yml||6 years ago|
|LICENSE||6 years ago|
|README.md||6 years ago|
|nodemcu-uploader.py||5 years ago|
|pylintrc||6 years ago|
|setup.cfg||6 years ago|
|setup.py||5 years ago|
|test_requirements.txt||5 years ago|
|tox.ini||5 years ago|
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.
Please note that these tests is not complete and it might be the tests themselves that are having issues.
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.
There might be some significant issues with Windows.
To solve «ImportError: No module named serial», install the pyserial module:
python easy_install pyserial
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. Download from http://nodemcu-build.com/ .
If you are using an older firmware you MUST use the option
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
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
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.
SOH, size, data
This gives a total 130 bytes per block.
The block size was decided for…
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.