NodeMCU-Tool | : wrench : Upload Manage Lua files on NodeMCU
kandi X-RAY | NodeMCU-Tool Summary
kandi X-RAY | NodeMCU-Tool Summary
NodeMCU Tool allows you to. directly from the command line.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse debug options .
- Upload a local file to remote server
- Fetches the current device .
- start a file transfer
- Connect to serial serial port .
- upload a file
- connect to serial serial serial port
- Download a remote file
- show filesystem info
- write chunk to file
NodeMCU-Tool Key Features
NodeMCU-Tool Examples and Code Snippets
Community Discussions
Trending Discussions on NodeMCU-Tool
QUESTION
For all of these scenarios, I am able to upload the firmware and monitor via serial usb. But after creating my first firmware, for all new firmware, I can't upload Lua scripts using the nodemcu-tool without getting the following:
Error Message
...ANSWER
Answered 2019-Sep-09 at 08:03fetchDeviceInfo()
first calls node.info()
at https://github.com/AndiDittrich/NodeMCU-Tool/blob/master/lib/connector/device-info.js#L9. Then it does an if-else
to figure out whether it's running on ESP8266 or ESP32.
With the recent upgrade to SDK 3.0 node.info()
was changed in PR #2830. See documentation at https://nodemcu.readthedocs.io/en/latest/modules/node/#nodeinfo. It now returns values the script doesn't consider to be coming from ESP8266. The script then calls node.chipId()
in the else
branch. So, it's getting a chip id from ESP8266 but it is expecting one from ESP32. Hence, the exception.
I have no idea what "Response: 6935962" means. Is that my chip id or an error code?
It's your chip id.
To cut a long story short: NodeMCU-Tool needs to be adjusted as laid out above to work with the current NodeMCU version.
QUESTION
The node
module has a method named compile
that compiles the code and creates .lc files.
Do I use a tool like nodemcu-tool
to connect to the board via the terminal
parameter, and execute node.compile('myfile.lua')
commands to create .lc
files?
If init.lua
is compiled as init.lc
upon reset will the board execute the compiled code?
ANSWER
Answered 2019-Feb-22 at 09:05How do you compile lua code on ESP8266 Board?
That depends on the tools you use. The workflow I'd use is:
- Upload Lua code to NodeMCU using
nodemcu-uploader
- Connect to the NodeMCU using
picocom
- Compile the file using
node.compile()
- (optional) Download the file again using
nodemcu-uploader
Different tools may change the involved steps slightly, but overall the idea will remain the same:
upload -> compile (-> download)
If init.lua is compiled as init.lc upon reset will the board execute the compiled code?
Try it ;)
If it doesn't work, you can always just write a one-line init.lua
that require init.lc
; it's not like that would impact your performance once your chip is booted and running.
Or you could just rename the compiled file to init.lua and it should also work.
But keep in mind, as the documentation says:
[...] compilation is RAM-intensive and hence you will find that you will need to break your application [...]
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NodeMCU-Tool
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page