Adding support for M20 L?

On my LulzBot TAZ 6 (with LulzBot's Marlin 2.0.9.0.13 firmware), M20 and M20 L return only the 8.3 filenames but M33 returns the long file name. LulzBot probably doesn't have the right options selected.

1 Like

But does Octoprint display long files name by running all the 8.3 results from L20 though M33?

No, OctoPrint doesn't do anything with M33.

OctoPrint reads the results of M33, to update the file list. But it will not send an M33 command for every file in the list from M20, as it would lock up the serial connection for an unspecified length of time. There is however a plugin should you wish for this:

@nophead this does indeed sound like a bug - whether it is easily solvable or not due to the timing of the capabilities, it sounds like a bug and it should be fixed. Could you open a report on the repo? It doesn't have to be very detailed if you want to just reference the comments here. GitHub - OctoPrint/OctoPrint: OctoPrint is the snappy web interface for your 3D printer!

1 Like

yeah, that sounds like a possible race condition.

I have added an issue for the bug The first M20 done on connection is missing the L flag. · Issue #4493 · OctoPrint/OctoPrint · GitHub and also a request to support LFN_WRITE.

1 Like

Looks like the release version of Marlin always adds the ??? long filename unless the file has a long filename. I.e. Even files that have short uppercase names that are 8.3 compatible. So the only files that get a correct name are those with long names that have been written directly to the card.

I am surprised I am the only one to notice this. Does nobody else run the release version of Marlin with LONG_FILENAMES enabled?

I would think the majority of people that use OctoPrint don't use SD card printing, I know I don't.

1 Like

LOL, I do and I need the long file name to be displayed in OctoDash! :smiley:

Do I understand correctly that we'll have to wait for an update to fixt it?

Long filenames could potentially be problematic with OctoDash too. I think it has it's own clipping of filename that will only show the first x characters and then finish out with ellipses IIRC.

If I understand you correctly we have a multiple problem. A bug in both OctoPrint and OctoDash, correct?

Bug in OctoPrint for initial loading issue based on what I've read here, and potential feature request in OctoDash. The file list in OctoDash will display a lot of characters, but if it does go beyond the length available on screen it will truncate, see below example, 4th file down.

If this picture is of OctoDash then mine doesn't show it like this. It shows it in a 8.3 format. If it would show it like this I would have not mentioned it.

Yeah, that's just file listing from local storage, not SD card. I think once the issue with long filenames is resolved on the OctoPrint side for that it will work correctly on the OctoDash side, or is your OctoPrint side now showing full filenames in it's file list?

Ok, I just tested using the virtual printer with extended_m20 enabled and can see that OctoDash still displays the 8.3 name. I suspect it's using name instead of display attribute from API response, so will require a patch to OctoDash...should have something for you by the end of the day.

image

We have success...but requires to press the refresh button in OctoPrint once after connecting due to the current bug in OP. One other caveat is that the name displayed while printing is still the shortened version. Will have to dig deeper to see if that's fixable.

If you want to test it out you can download the custom build from here. Extract the zip file and transfer the octodash_2.3.1_armv7l.deb file to your pi with scp, winscp, or filezilla. I usually just upload to the pi user's home directory /home/pi/. Then run these commands to update in an SSH/terminal session.

sudo dpkg -i /home/pi/octodash_2.3.1_armv7l.deb
sudo service getty@tty1 restart

I finally got everything ready to install the LCD and the Pi onto my printer so I tried your fix.

I installed the armv71.deb file. It doesn't work since I can't refresh OctoPrint. When I boot my Pi it boots directly into Octodash and I never see the OctoPrint and therefor have not the opportunity to refresh.

Any idea what I can/should do?

Open OctoPrint's UI in the browser on another device, and press refresh.

That is not an option since the printer is only connected to the LCD screen. I connect a laptop to it only when it really has to be done, to upgrade the firmware, for example.

Well you will have to wait until the problem is fixed then - that's what this whole conversation above your posts was about.