Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filepath can't exceed 31 characters #81

Closed
sleeply4cat opened this issue May 9, 2018 · 6 comments
Closed

Filepath can't exceed 31 characters #81

sleeply4cat opened this issue May 9, 2018 · 6 comments

Comments

@sleeply4cat
Copy link

sleeply4cat commented May 9, 2018

$ nodemcu-uploader --port /dev/ttyUSB0 --baud 115200 upload "/home/kirill/111/progr/lua/Washer-small/*"
opening port /dev/ttyUSB0 with 115200 baud
Preparing esp for transfer.
Transferring /home/kirill/111/progr/lua/Washer-small/relay_task.lua as /home/kirill/111/progr/lua/Washer-small/relay_task.lua
Bad chunk response "ANIC: unprotected error in call to Lua API (stdin:6: open a file first)

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

������o��;��o|��l�lld`��c���

NodeMCU custom build by frightanic.com
	branch: master
	commit: 5073c199c01d4d7bbbcd0ae1f761ecc4687f7217
	SSL: false
	modules: file,gpio,http,i2c,net,node,spi,tmr,uart,wifi,wps
 build 	built on: 2018-03-25 16:29
 powered by Lua 5.1.4 on SDK 2.1.0(116b762)
lua: cannot open init.lua
nodemcu-uploader --version
nodemcu-uploader 0.4.3 (serial 3.4)
@sleeply4cat sleeply4cat changed the title Upload filed for new NodeMCU builds Upload filed for new NodeMCU builds (I guess) May 9, 2018
@bazooka07
Copy link

Hello,
in the nodemcu-firmware repository:
https://github.com/nodemcu/nodemcu-firmware/blob/master/app/include/user_config.h
You can find that :

// maximum length of a filename
#define FS_OBJ_NAME_LEN 31

The length of filename can't exceed 31 characters by default.
54 letters are too enough.

@sleeply4cat
Copy link
Author

But file name length is only 12 chars.

@bazooka07
Copy link

Not in Nodemcu. There is not any folder. No pathname.
the filename is "/home/kirill/111/progr/lua/Washer-small/relay_task.lua" without folder separator.
Read the doc :
https://nodemcu.readthedocs.io/en/master/en/modules/file/

@sleeply4cat
Copy link
Author

Omg, I know how SPIFS works.
In this case, why does download tool use a full path as a file name?

@kmpm
Copy link
Owner

kmpm commented Dec 11, 2018

This tool should use the relative path from where you run it so that you can maintain a local folder structure that have matching filenames after you upload.
If that doesn't work for you, it might be a bug.

@kmpm
Copy link
Owner

kmpm commented Dec 11, 2018

This issue is related to #24

@kmpm kmpm changed the title Upload filed for new NodeMCU builds (I guess) Filepath can't exceed 31 characters Dec 11, 2018
@kmpm kmpm closed this as completed in 3d125a8 Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants