makerbase-mks / Mks-Robin-Nano-Marlin2.0-Firmware

The firmware of Mks Robin Nano, based on Marlin-2.0.x, adding the color GUI.
GNU General Public License v3.0
261 stars 286 forks source link

8.3 filename format does not supported trough wifi upload #315

Open pagabee opened 2 years ago

pagabee commented 2 years ago

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

If you copy a gcode file trough wifi and if its name is 5 or more characters long the copied filename on SD card will be xxxxx~1.gco. This is not a 8.3 filename format.

The checking of the lengt of the filename happens in the wifi_module.ccp static bool longName2DosName(const char longName, char dosName)

if (i >= 5) {
  strcat_P(dosName, PSTR("~1.GCO"));
  return dosName[0] != '\0';
}

What is the reason for this?

Bug Timeline

Old bug

Expected behavior

8.3 filename support

Actual behavior

qwer.gco --> qwer.gco

qwert.gco --> qwert~1.gco

qwertz.gco --> qwert~1.gco

qwertzu.gco --> qwert~1.gco

qwertzui.gco --> qwert~1.gco

qwertzuio.gco --> qwert~1.gco

Steps to Reproduce

Please upload a file trough wifi to the SD card. I'm currently using ESP3D 3.0 and tested it with the MksWifi.bin firmware.

Version of Marlin Firmware

02000902

Printer model

No response

Electronics

MKS Robin Nano V3

Add-ons

MKS TS35 Display + MKS WIFI modul

Bed Leveling

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

IMG_3754

pagabee commented 2 years ago

I modified the code:

if (i > 8) {
  dosName[6] = '\0';
  dosName[7] = '\0';
  dosName[8] = '\0';
  strcat_P(dosName, PSTR("~1.GCO"));
  return dosName[0] != '\0';
}

It works, but i don't know if it's correct.

MKS-hosiey commented 2 years ago

The character limit of the display interface, currently only so many characters can be displayed

pagabee commented 2 years ago

I copied directly files with long name to the SD card. The TS35 display shows maximum 12 characters after that comes the ~.

Files on SD card IMG_3767 IMG_3768 IMG_3769 IMG_3770 IMG_3771

pagabee commented 2 years ago

Hello,

I modified the code to this. Please search for the “~1.GCO” in the wifi_module.ccp file. There is link in the bug description.

snow79 @.***> (időpont: 2022. máj. 19., Cs, 19:52) ezt írta:

I modified the code:

if (i > 8) { dosName[6] = '\0'; dosName[7] = '\0'; dosName[8] = '\0'; strcat_P(dosName, PSTR("~1.GCO")); return dosName[0] != '\0'; }

It works, but i don't know if it's correct.

Where you have find this code???

— Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315#issuecomment-1132012780, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVGG2E2EB3X3RH54TEU2ITVKZ5ULANCNFSM5P5YLO4A . You are receiving this because you authored the thread.Message ID: <makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315/1132012780@ github.com>

snow79 commented 2 years ago

Hello, I modified the code to this. Please search for the “~1.GCO” in the wifi_module.ccp file. There is link in the bug description. snow79 @.***> (időpont: 2022. máj. 19., Cs, 19:52) ezt írta: I modified the code: if (i > 8) { dosName[6] = '\0'; dosName[7] = '\0'; dosName[8] = '\0'; strcat_P(dosName, PSTR("~1.GCO")); return dosName[0] != '\0'; } It works, but i don't know if it's correct. Where you have find this code??? — Reply to this email directly, view it on GitHub <#315 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVGG2E2EB3X3RH54TEU2ITVKZ5ULANCNFSM5P5YLO4A . You are receiving this because you authored the thread.Message ID: <makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315/1132012780@ github.com>

yes but... you have solved or not??? i try with your solution, but the problem presist... now it's not 5 char but 8 ....

pagabee commented 1 year ago

Hello,

my goal was the dos 8.3 file name format because I use the ESP Wifi modul with the ESP3D 3.0 firmware and it support max 8 characters.

snow79 @.***> (időpont: 2022. jún. 1., Sze, 14:24) ezt írta:

Hello, I modified the code to this. Please search for the “~1.GCO” in the wifi_module.ccp file. There is link in the bug description. snow79 @.***> (időpont: 2022. máj. 19., Cs, 19:52) ezt írta: … <#m7848904293735048411> I modified the code: if (i > 8) { dosName[6] = '\0'; dosName[7] = '\0'; dosName[8] = '\0'; strcat_P(dosName, PSTR("~1.GCO")); return dosName[0] != '\0'; } It works, but i don't know if it's correct. Where you have find this code??? — Reply to this email directly, view it on GitHub <#315 (comment) https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315#issuecomment-1132012780>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVGG2E2EB3X3RH54TEU2ITVKZ5ULANCNFSM5P5YLO4A . You are receiving this because you authored the thread.Message ID: < /issues/315 https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315 /1132012780@ github.com>

yes but... you have solved or not??? i try with your solution, but the problem presist... now it's not 5 char but 8 ....

— Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315#issuecomment-1143540026, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVGG2H4YTUJOSO3YEGA5E3VM5I63ANCNFSM5P5YLO4A . You are receiving this because you authored the thread.Message ID: <makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/issues/315/1143540026@ github.com>