-->
Page 2 of 3

Re: Load binary file - how would you prefer?

PostPosted: Mon Jan 12, 2015 8:24 am
by kmpm
eLua already have an xmodem implementation that perhaps could be used and there is almost no overhead in the protocol.
Many terminal softwares do have xmodem implemented so that would work as well.
It's very uncomplicated to implement if you would like to.

At https://github.com/kmpm/nodemcu-uploader you can find a python + lua script that almost do xmodem transfer.
The biggest difference is that It supports filenames and skip crc checks.

Re: Load binary file - how would you prefer?

PostPosted: Mon Jan 12, 2015 9:51 am
by Markus Gritsch
Maybe I don't understand the question correctly, but this script viewtopic.php?f=22&t=913#p5755 uploads binary files without any "preparation on the PC".

Re: Load binary file - how would you prefer?

PostPosted: Mon Jan 12, 2015 11:04 am
by Hoksmur
Markus, possible - your method is better. :roll:

Re: Load binary file - how would you prefer?

PostPosted: Tue Jan 13, 2015 12:51 am
by Hoksmur
So, there is the simplest method. Possible, I repeated Markus's method. In attached archive two files. webload.lua and upload.html. At first, you should correct IP address in both files to your own, then copy text from webload.lua to console and run it (or save this one on embedded filesystem for multiple use).
Then open html and select file and send it. It's easy.
UPD: it works correct only up to 840 byte and depends on browser: length of header can be different, but packet size couldn't be more 1460.
UPD2: I'd recommend use script from this post. Thanks a lot ThomasW for tools and Markus for hint.

(929 Bytes) Downloaded 255 times