How to get OctoPrint to see your SD card files with Sailfish firmware


Sailfish firmware responds to the M20 gcode command to list SD card contents, but it only lists the root of the filesystem. While your actual printer will be able to traverse any directory structure on the card, the firmware won't report any contents that aren't at the root.

This means that, while OctoPrint will get a report of the directories (folders, if you prefer) on the SD card, it will NOT be able to see what is inside of them, nor will it display any files for you to print that are in those directories. The only real solution (other than using a different firmware) is to put your files in the root of the SD card. This is particularly good to know if you're using a FlashAir card and mounting it as a WebDAV share, since you may be tempted to organize your files.

Most other firmware that respond to M20 will either provide a full listing of the card's contents or/and will respond to P arguments in M20 commands that allow for the specification of a directory to list on the card.