2

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

  • Can reset the board using nodemcu-tool. Leads me to assume the baud rate is fine.
  • Can see the file system being created from PuTTy after loading any of the firmware. Leads me to assume the firmware is OK.
  • Have tried multiple dev boards, same results
  • Found the source of the error message device-info.js. either line 45 or 49
  • I have no idea what "Response: 6935962" means. Is that my chip id or an error code?
  • A new commit was made to the firmware source during the last couple of days. No idea if this is relevant.
  • Was hoping to get this resolved before I go down the Docker rabbit hole. Lazy. I know.

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

  • Built a firmware using https://nodemcu-build.com/ with these modules (cron, file, gpio, i2c, mdns, mqtt, net, node, sjson, tmr, uart, wifi)
  • Uploaded the firmare using NodeMCU-PyFlasher-4.0
  • No issues with this firmware. I've been able to upload lua scripts and test them successfully. Even now, I can revert back to this firmware and use it without issues. I've even redownloaded this firmware from the original link, and it works fine.

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

  • Built a firmware using https://nodemcu-build.com/ with these modules (adc, cron, file, gpio, i2c, mdns, mqtt, net, node, rtctime, sjson, tmr, uart, wifi)
  • Uploaded the firmare using NodeMCU-PyFlasher-4.0
  • Having the problem described above.

9/8/2019 - built firmware with minimal modules

Platform & Tools

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
tunneling
  • 527
  • 6
  • 21
  • 1
    I removed the firmware download links as they're dead (only available for 24h). [PR #2886](https://github.com/nodemcu/nodemcu-firmware/pull/2886) that you also linked to concluded our multi-month upgrade to SDK 3.0. You can see all PRs that went into this at [the milestone](https://github.com/nodemcu/nodemcu-firmware/milestone/13?closed=1). Also note that NodeMCU-Tool has [no "official" support](https://github.com/AndiDittrich/NodeMCU-Tool#compatibility) for NodeMCU beyond 1.5.4. – Marcel Stör Sep 08 '19 at 20:49
  • Follow https://github.com/AndiDittrich/NodeMCU-Tool/issues/65 – Marcel Stör Sep 09 '19 at 08:10

2 Answers2

1

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.

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
0

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.

  • Please read the comments of the OP. I was able to solve the problem by downloading the most recent source for nodemcu-tool from the repo. – tunneling Sep 25 '19 at 15:34