tunneling
tunneling

Reputation: 527

Unable to load Lua Scripts to NodeMCU: Invalid node.chipid()

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

F:\Development\NodeMCU\helloworld>nodemcu-tool -p COM3 upload init.lua 
[NodeMCU-Tool]~ Unable to establish connection 
[NodeMCU-Tool]~ Invalid node.chipid() Response: 6935962

Observations

9/6/2019 - created first firmware to start development

9/7/2019 - created a new firmware to use adc and other goodies

9/8/2019 - built firmware with minimal modules

Platform & Tools

Upvotes: 2

Views: 434

Answers (2)

Shawn Q
Shawn Q

Reputation: 1

I cached the same issue from the recent cloud build(https://nodemcu-build.com/). It works when i switch back to the old ones. It looks like a problem of the build system or recent source code. You can switch to other build method and try use the older code.

Upvotes: 0

Marcel Stör
Marcel Stör

Reputation: 23535

fetchDeviceInfo() 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.

Upvotes: 1

Related Questions