How to access files on the printer's SD card


#1

When an external drive is connected to a USB port, it appears as a folder in /media/pi/
Does the SD card appear somewhere in Linux file structure as a mounted drive?


#2

No, it doesn't. The SD card is connected to the printer, the printer is not a card-reader.


#3

It depends on what firmware and control board you have. For instance running Marlin on a 32 bit LPC176x based board, or Smoothieware on a similar board can make the SD card available as a USB drive. However it may not be visible directly. Under Marlin if the card is in use by the firmware (which it probably will be) then it is not available directly via USB as a drive (but you can issue an M22 to unmount the card from Marlin which will then make it available as a USB drive, you may then need to mount the drive under Linux (there are ways to automate this). If you are running smoothieware then this https://github.com/foosel/OctoPrint/wiki/Setup-OctoPrint-with-Smoothie covers it much better than I probably can.


#4

You are asking about an SD card in your printer, and not the one from which you booted your Pi, right?


#5

Yes, the card in the printer. Am trying to understand the way things work (limitations) so I can form a file management strategy.


#6

An M20 gcode command lists the files on the SD card that's inserted into the printer's controller (assuming that your firmware supports that). If OctoPrint's default settings are in place then it will attempt to do that upon connecting to your printer so that those files would be displayed in the side panel Files widget.

In theory, one might be able to purchase an expensive SD card with wifi built in. And then, house elves could magic up some means of connecting to the wifi hotspot and then do an accio lima command. Or maybe read this entire thread.


#7

@gtaylor828 it would probably help if you told us what control board and firmware you are planning to use as the answer to your question may be different depending upon the configuration.