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

[FEATURE REQUEST] Support for long file name in files pannel in 3.0 #221

Closed
bg-master opened this issue Jan 23, 2022 · 12 comments
Closed

[FEATURE REQUEST] Support for long file name in files pannel in 3.0 #221

bg-master opened this issue Jan 23, 2022 · 12 comments

Comments

@bg-master
Copy link

It would be very useful to list the long file name in the files panel, available since Marlin 2.0.9 (M20 L). At the moment to identify a file I manually execute the M20 L command from the terminal panel.

@github-actions
Copy link

Thank your for submiting, please be sure you followed template or your issue may be dismissed. if you deleted the template it is here

@luc-github
Copy link
Owner

Is that working properly now ? before I get ???? most of the time instead of longname

@luc-github
Copy link
Owner

this is my last check : #183

@luc-github luc-github transferred this issue from luc-github/ESP3D Jan 23, 2022
Repository owner deleted a comment from github-actions bot Jan 23, 2022
@bg-master
Copy link
Author

I can confirm that with Marlin 2.0.9.3 it works.

>>> M20
SENDING:M20
Begin file list
CAFA2B~1.GCO 17494
CA394B~1.GCO 60198
CA3603~1.GCO 900266
CALIBR~2.GCO 218439
CALIBR~4.GCO 1847167
End file list
ok P0 B0

>>> M20 L
SENDING:M20 L
Begin file list
CAFA2B~1.GCO 17494 Calibration_FirstLayerCenter.gcode
CA394B~1.GCO 60198 Calibration_ThinWallCube.gcode
CA3603~1.GCO 900266 Calibration_Retraction.gcode
CALIBR~2.GCO 218439 Calibration_StepMmCube.gcode
CALIBR~4.GCO 1847167 Calibration_Jerk.gcode
End file list
ok P0 B0

@luc-github
Copy link
Owner

luc-github commented Jan 24, 2022

does space in long name are supported ? I see you use underscore only

@luc-github luc-github moved this to Todo in ESP3D 3.0 Jan 24, 2022
@bg-master
Copy link
Author

Also spaces are supported.

>>> M20 L
SENDING:M20 L
Begin file list
CA0211~1.GCO 1248145 Calibration Retraction Pyramid Multiple.gcode
CA4FEF~1.GCO 1847167 Calibration Jerk.gcode
End file list
ok P0 B0

@luc-github
Copy link
Owner

luc-github commented Mar 1, 2022

@bg-master I am testing the M20 L

M20 L
Begin file list
CUBE.GCO 210240 CUBE.GCO
CUBE01.GCO 2089832 CUBE01.GCO
SUPPORT2.GCO 4613256 SUPPORT2.GCO
ARCHIVE/CUBE-C~1.GCO 210240 Archive/CUBE - Copy.GCO
NEWFOL~1/SUPPORT2.GCO 4613256 New folder/SUPPORT2.GCO
End file list
ok
M23 Archive/CUBE - Copy.GCO
echo:Now fresh file: Archive/CUBE
open failed, File: CUBE.
ok
M23  ARCHIVE/CUBE-C~1.GCO
echo:Now fresh file: ARCHIVE/CUBE-C~1.GCO
open failed, File: ARCHIVE.

ok

files in sub folder are listed but cannot be printed - is that normal ?
Seems consistent with comment : MarlinFirmware/Marlin#23526 (comment)
But then I do not understand why to list sub folder
I am pretty sure it was working before - am I wrong ? Do I miss something ?

@luc-github
Copy link
Owner

luc-github commented Mar 3, 2022

After more test
1 - long name path cannot work with M23

M23  '/New folder/SUPPORT2.GCO'
echo:Now fresh file: '/New
open failed, File: '.
ok

=> need to use short path for commands

2 - utF8 files cannot be printed in long name
file name listed by webUI /盧克test.GCO
but file name displayed by M20 L

TEST~1.GCO 4613256 __test.GCO

=> cannot use UTF name even the option is enabled

3 - long file name can be printed if on root if not UTF8

4 - utf8 long file name cannot be printed if on root

echo:Now fresh file: /盧克test.GCO
open failed, File: 盧克test.GCO.
ok
echo:Now fresh file: /__test.GCO
open failed, File: __test.GCO.
ok

=>Need to use shortname for UTF8 filename for commands

So long name is still only partially supported - and UTF8 is not

@stale stale bot added the stale label Mar 30, 2022
@stale stale bot closed this as completed Apr 16, 2022
Repository owner moved this from Todo to Done in ESP3D 3.0 Apr 16, 2022
@luc-github luc-github reopened this Apr 24, 2022
Repository owner deleted a comment from stale bot Apr 24, 2022
@luc-github
Copy link
Owner

luc-github commented Apr 24, 2022

I am working on long name support and again new bug, any subdirectories are wipped in long name
if directory is DATA at root it disapear, if it is a subdirectory of subdirectory it disapear also

Begin file list
RESOUR~1/GCODE/APPLE~1.GCO 8140 resources//Apple.gcode
RESOUR~1/GCODE/BANANA~1.GCO 7554 resources//Banana.gcode
RESOUR~1/GCODE/CHERRY~1.GCO 6465 resources//Cherry.gcode
RESOUR~1/GCODE/PEACH~1.GCO 8467 resources//Peach.gcode
RESOUR~1/GCODE/PEAR~1.GCO 6010 resources//Pear.gcode
RESOUR~1/DATA/APPLE~1.GCO 8140 resources//Apple.gcode
RESOUR~1/DATA/BANANA~1.GCO 7554 resources//Banana.gcode
RESOUR~1/DATA/CHERRY~1.GCO 6465 resources//Cherry.gcode
RESOUR~1/DATA/PEACH~1.GCO 8467 resources//Peach.gcode
RESOUR~1/DATA/PEAR~1.GCO 6010 resources//Pear.gcode
TESTCUBE.GCO 353194 TESTCUBE.GCO
TEST1.GCO 1143935 TEST1.GCO
GCODE-~1/TESTLO~1.GCO 25 gcode - Copy/testlongname.gcode
GCODE-~1/TESTCUBE.GCO 353194 gcode - Copy/TESTCUBE.GCO
DATA/TESTLO~1.GCO 25 /testlongname.gcode
DATA/TESTCUBE.GCO 353194 /TESTCUBE.GCO
End file list
ok

So long name is working if all files are in root of SD card

The web UI will be able to support old M20 format (filename / no size) , short name format + size, and long name format - but it will not do any sanity check on Marlin output checking if short path is consistent with long path, this is out of scope of webUI
so I will add a settings to allow to customize the SD list (M20) command, in that case if command M20 L output is wrong user can switch back to M20

@luc-github
Copy link
Owner

Implemented - but do not handle Marlin giving wrong output

longName

@github-actions
Copy link

github-actions bot commented May 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
@luc-github
Copy link
Owner

luc-github commented Aug 26, 2022

I tested latest Marlin release (2.1.1) and now M20 L seems correct

20:43:41.223 > PID-PI~1.GCO 1490254 pID-pika2.gco
20:43:41.229 > IGX-PI~1.GCO 1573255 iGX-pika2.gcode
20:43:41.231 > TINYBE~1.GCO 2014025 tinybeev1-Body.gcode
20:43:41.234 > MKSMIN~1.GCO 575334 mksmini12864v3.gco
20:43:41.237 > SUBFOL~1/TINYBE~1.GCO 2014025 SubFolder/tinybeev1-Body.gcode
20:43:41.243 > SUBFOL~1/TINYBE~2.GCO 2014025 SubFolder/tinybee Body.gcode
20:43:41.249 > NEWFOL~1/TINYBE~1.GCO 2014025 New folder/tinybee Body.gcode
20:43:41.254 > NEWFOL~1/TINYBE~2.GCO 2014025 New folder/tinybeev1-Body.gcode
20:43:41.260 > End file list
20:43:41.260 > ok
20:43:42.197 > echo:192.168.2.178
M23 SubFolder/tinybeev1-Body.gcode
20:44:03.392 > echo:Now fresh file: SubFolder/tinybeev1-Body.gcode
20:44:03.400 > File opened: tinybeev1-Body.gcode Size: 2014025
20:44:03.404 > File selected
20:44:03.404 > ok
M23 'SubFolder/tinybee Body.gcode'
20:44:36.966 > echo:Now fresh file: 'SubFolder/tinybee
20:44:36.970 > open failed, File: 'SubFolder.
20:44:36.972 > ok
M23 "SubFolder/tinybee Body.gcode"
20:44:56.087 > echo:Now fresh file: "SubFolder/tinybee
20:44:56.090 > open failed, File: "SubFolder.
20:44:56.092 > ok

But spaces are not allowed - I have check Marlin M23 code and indeed the spaces are replaced by \0 to cut the path, https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/Marlin/src/gcode/sd/M23.cpp#L38
so as workaround I will do #259

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

No branches or pull requests

2 participants