AndiDittrich / NodeMCU-Tool

:wrench: Upload + Manage Lua files on NodeMCU
https://www.npmjs.com/package/nodemcu-tool
MIT License
316 stars 54 forks source link

Unable to connect properly to NodeMCU custom build powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32) #25

Closed mohnen closed 7 years ago

mohnen commented 7 years ago

I am running your tool on a Mac. nodemcu-tool devices gives me this

[NodeMCU] Connected Devices | Total: 1
      |- /dev/cu.wchusbserial1420 (undefined, undefined)

Any subsequent command fails, e.g. nodemcu-tool --port /dev/cu.wchusbserial1420 --baud 115200 mkfs

[NodeMCU-Tool] Do you really want to format the filesystem and delete all file ? (no) y
[NodeMCU-Tool] Unable to establish connection - No response detected - is NodeMCU online and the Lua interpreter ready ?

However, I can connect to the terminal nodemcu-tool --port /dev/cu.wchusbserial1420 terminal

[SerialTerminal] Starting Terminal Mode - press ctrl+c to exit

This is the boot log

NodeMCU custom build by frightanic.com
    branch: master
    commit: 81ec3665cb5fe68eb8596612485cc206b65659c9
    SSL: false
    modules: adc,cjson,encoder,file,gpio,http,mdns,mqtt,net,node,rtcfifo,rtcmem,rtctime,sntp,tmr,uart,wifi
 build  built on: 2017-01-12 05:51
 powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
mohnen commented 7 years ago

I got it fixed with --connection-delay 50

AndiDittrich commented 7 years ago

Great! Just for interest: what kind of module (vendor/type) do you use ?

mohnen commented 7 years ago

I used it with two boards, in both cases I needed --connection-delay 50

wolfg1969 commented 7 years ago

I use --connection-delay 1000.

raykin commented 6 years ago

same problems here in mac OS. But the conection-delay option does not work here.

~/Downloads ᐅ nodemcu-tool mkfs -p /dev/cu.SLAB_USBtoUART --connection-delay 1000 --baud 115200
[NodeMCU-Tool] Do you really want to format the filesystem and delete all file ? (no) yes
[NodeMCU-Tool] Unable to establish connection - Timeout, no response detected - is NodeMCU online and the Lua interpreter ready ?

It shows the same error no matter what baud/connection-deplay was set.

What next step should I do to gather more debug message?

raykin commented 6 years ago

Just reread the doc of https://github.com/nodemcu/nodemcu-devkit-v1.0 and reflash the firmware in DIO mode and now it works.