You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you establish a serial connection WITHOUT Nodemcu-Tool - e.g. with a serial terminal like Putty ?
yes
Does the nodemcu-tool fsinfo command work ?
yes
Environment
Operating System
Arch Linux
ESP Device/Revision
ESP-WROOM-32
NodeMCU-Tool Version 3.2.1
Node.js Version 16.11.1
NodeMCU LUA Firmware Version latest dev-esp32-idf4 with Lua 5.3
Issue Description
Expected Behavior
You can upload files
Current Behavior
You can't upload files
Steps to Reproduce
nodemcu-tool upload something.lua
Detailed Description
The above command works, yet the file does not show up in the filesystem. This is because NodeMCU in the latest dev-esp32 branches moved file IO from the file module to the standard Lua io. The commands fails silently as if it worked, even though file.open is unavailable and returns nil.
Possible Solution
I have modified lib/lua/esp8266-commands.js to use io instead of file and so far it works very well, but of course we'll need some additional code to detect whether file or io is to be used so it works as usual on an ESP8266.
This took a while to figure out from the documentation even though the ESP32 is very unsupported, has preliminary support, the maintainers of this repo might not have an ESP32 to test on, and a casual user might think their ESP32 is broken, it's not, here's the solution :)
The text was updated successfully, but these errors were encountered:
but of course we'll need some additional code to detect whether file or io is to be used so it works as usual on an ESP8266.
I have added --io-module flag in cli to allow to choose whether io or file module is to be used. The branch dev-esp32
The following pull requests also have been applied:
Checklist
Can you establish a serial connection WITHOUT Nodemcu-Tool - e.g. with a serial terminal like Putty ?
yes
Does the
nodemcu-tool fsinfo
command work ?yes
Environment
Arch Linux
ESP-WROOM-32
3.2.1
16.11.1
latest dev-esp32-idf4 with Lua 5.3
Issue Description
Expected Behavior
You can upload files
Current Behavior
You can't upload files
Steps to Reproduce
nodemcu-tool upload something.lua
Detailed Description
The above command works, yet the file does not show up in the filesystem. This is because NodeMCU in the latest dev-esp32 branches moved file IO from the
file
module to the standard Luaio
. The commands fails silently as if it worked, even thoughfile.open
is unavailable and returnsnil
.Possible Solution
I have modified lib/lua/esp8266-commands.js to use
io
instead offile
and so far it works very well, but of course we'll need some additional code to detect whetherfile
orio
is to be used so it works as usual on an ESP8266.This took a while to figure out from the documentation even though the ESP32 is very unsupported, has preliminary support, the maintainers of this repo might not have an ESP32 to test on, and a casual user might think their ESP32 is broken, it's not, here's the solution :)
The text was updated successfully, but these errors were encountered: