paulcuth/esp8266-cli

Doesn't work on Linux

sej7278 opened this issue · 7 comments

Almost none of the commands work for me on Debian with 0.9.4 nodemcu and v0.10.29 node.js:

$ esp port get
Port: /dev/ttyUSB0

$ esp file list
Aborted

$ touch init.lua
$ esp file write init.lua init.lua
Aborted

$ esp file read init.lua
Aborted

$ file execute init.lua
execute:  cannot open `execute' (No such file or directory)
init.lua: empty

$ esp restart
Aborted

$ esp execute "print 'Mechanisms, not policy.'"
Invalid command. 

Also you have to npm install and set the port as root, you've not documented that.

1am commented

Try running the commands as sudo. It worked for me though the execute command still fails with "Invalid command."

its not a permissions issue, i suspect its only been tested on macosx

1am commented

In my case it is permission issue with access to serial port on Linux Mint working under VirtualBox

You are correct in your assumption that it is only tested on OS X, as that's the only OS available to me at the moment. I'll see if I can get my hands on a Linux machine.

In the meantime, someone told me elsewhere that they get the "Aborted" message after every command on Linux, however the command is actually executed successfully. Could you confirm whether or not this is the case with you?

yes looks like that's the case - it works but says "Aborted" after every command, which is bizarre as none of your source includes the word "Aborted", so may be a serialport@1.4.10 issue, or how you're using it.

you only need to be root to install the software and set the port.

nodemcu-firmware 0.9.5 20150118 compiled using sdk 0.9.5 beta3 on debian sid running node.js v0.10.29 and esp8266-cli 0.0.2

Cool, I'll look into that.

I've also noticed:

  • The README incorrectly says $ esp execute "command" instead of $ esp run "command"
  • In the example you gave, you missed the esp from the file execute command, which is why we didn't notice that the CLI had previously sent the file successfully.

Cheers for the feedback!

This appears to be a node-serialport issue. After updating to the latest version I've started to get error on disconnection on my Mac too.

For now I've suppressed any errors on disconnection. It's not ideal but I'm watching the node-serialport and will remove this if I see it fixed at their end.