trippwill / OctoPrint-MarlinBft

Upload files using Marlin Binary File Transfer Mark II
11 stars 5 forks source link

Bft - Long file name support? #9

Open GeminiServer opened 4 years ago

GeminiServer commented 4 years ago

I like this feature and plugin and every thing works as aspected. Firmware file is copied successfull to SD card. Unfortuatly the file name is converted to 8+3 filename. But i need to copy a long file name to the SD card. Is this a limitation of the MarlinBft protocol or the plugin? Don't wanted to deep dive into the protocoll. In Marlin, also long file name support is enabled.

Backgroud: The BTT Display needs a long firmware filename. There aren't boot loader source code, so i can't fix or adapt it there.

Cheers, Erkan

akamensky commented 4 years ago

That is most likely done not by plugin, but by Marlin binary transfer protocol implementation. Marlin (despite having option for long filenames display on LCD) everywhere under the hood uses short names implementation.

GeminiServer commented 4 years ago

I thought that marlin had the sd 8+3 limitation. I coded now a work around, since i can rename with tft firmware the sd card files to long files. Has now to restart/trigger: first for renaming to long name and second the real update of the tft.

It would be great if you can add a rename option/function in settings. Like rename firmware to 8+3 file before upload. I.e.: SuperDuperLongFirmware.bin/cur/new to custom firmware name "shrtfw"--> shrtfw.bin/cur/new

p.s.: If it will be implement, let the user decide which ending the filename has to be.

trippwill commented 4 years ago

The plugin shortens the filename before doing the transfer. During development, using long filenames would not work. Some investigation of the protocol would be required to determine if long filename support is possible. Alternatively, a post-transfer action of renaming the short filename back to a long filename could be added to the plugin.