prusa3d / Prusa-Firmware-Buddy

Firmware for the Original Prusa MINI, Original Prusa MK4 and the Original Prusa XL 3D printers by Prusa Research.
Other
1.15k stars 221 forks source link

[FEATURE REQUEST] Treat USB media as SD card for serial control #1076

Open compmstr opened 3 years ago

compmstr commented 3 years ago

It would be nice to be able to use the USB media plugged in to the Prusa Mini as an SD card for use with Octoprint. If nothing else, it seems like it might alleviate issues with https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/739, since you would be able to remotely initiate a USB print, which does appear to properly pause with the filament sensor.

If it makes sense, enter what type of printer or upgrade the feature request applies to. Printer type - [MINI] Optional upgrades - [Filament Runout Sensor]

Is your feature request related to an existing problem? Please describe. I wanted to use up the last of some filament, and so I kicked off a print from OctoPrint. The sensor never triggered the print to pause. Luckily I was watching it, so I was able to manually pause and change the filament. Researching the issue, it seems like printing from the USB is the only way to currently have the filament sensor properly work. I then tried to use the 'SD' commands on octoprint (M20/M21, etc.), and they all appear to do nothing. I'm assuming this is because the hardware doesn't have an SD card. If the USB media storage could be treated like an SD card, this would allow us to remotely kick off and control USB prints from octoprint.

Describe the expected functionality Have the SD card GCODE commands (M20, M21, M24, M25, etc.) use the USB media storage in place of a physical SD card slot.

JohnnyDeer commented 3 years ago

Hi @compmstr fixing this commands is on our to do list.

pickworthi commented 2 years ago

I would like to add another use case, given that the original reason for this issue has potentially been solved by later firmware releases. The use case I am interested in is to use the M20 to M32 commands over the serial link to load/delete files on the Mini+ USB stick. This allows a local operator to fetch gcode files from a remote source, without having to physically walk there and back with the USB stick in his/her hand.

bschollnick commented 2 years ago

I would like to add another use case, given that the original reason for this issue has potentially been solved by later firmware releases. The use case I am interested in is to use the M20 to M32 commands over the serial link to load/delete files on the Mini+ USB stick. This allows a local operator to fetch gcode files from a remote source, without having to physically walk there and back with the USB stick in his/her hand.

I think this is an interesting idea. But, I’m a bit concerned security wise, that this would allow any unvetted gcode file to erase files (or download files) to my system.

Just the loading by itself, could potentially open the system up to bad actors (eg Malware, Virii, etc).

pickworthi commented 2 years ago

The codes already exist in Marlin, and are implemented in other printers than the Mini+. I believe that the I3 supports them for example. A bad actor would need to have access to the serial port of the printer, or the external controller (e.g. Octoprint). Both attack vectors are easily mitigated (e.g. lock on workshop door, isolated LAN sub net for Octoprint and firewalls).

Rose-David commented 2 years ago

Plus, if there is a security concern, just have it default to OFF. I feel like my octoprint is secure, and would love these useful features, but I also totally understand not wanting the risk.

arekm commented 1 year ago

M20 works according to paste here https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/2387#issue-1336615121 (well, partially, no support for "L", not support for "T" option - both supported in MK3, none in MK4).

M23 unfortunately is failing.

Marlin 2 (which Firmware-Buddy is based; but based on quite old version) generally supports all (or most) SD commands also with USB medium, so there is a chance to get that working on Firmware-Buddy, too.

Prusa-Support commented 1 year ago

Thanks for reporting. The issue remains open. However, on a side note, the issue starts looking obsolete now that Prusa Link and Prusa Connect can allow uploading and starting prints from remote - Prusa Connect is enabled for MK4 already and will be enabled for MINI in the near future.

Michele Moramarco Prusa Research

ghost commented 1 year ago

However, on a side note, the issue starts looking obsolete now that Prusa Link and Prusa Connect can allow uploading and starting prints from remote - Prusa Connect is enabled for MK4 already and will be enabled for MINI in the near future.

I'm not sure how wide spread it is, but for many of us that's not functional yet, it'll be nice when it arrives:

3049

Prusa-Support commented 1 year ago

Some work on transmission speed has already been done but issue #3049 remains open as we keep working on it. Improving transmission speed is among our main objectives at this early stage of the Prusa Link/Connect wide adoption.

Michele Moramarco Prusa Research

github-actions[bot] commented 3 months ago

This issue has been flagged as stale because it has been open for 60 days with no activity. The issue will be closed in 7 days unless someone removes the "stale" label or adds a comment.

jagerkin commented 3 months ago

Comment to keep from auto-closing.

github-actions[bot] commented 1 month ago

Thank you for your contribution to our project. This issue has not received any updates for 60 days and may be considered "stale." If this issue is still important to you, please add an update within the next 7 days to keep it open. Administrators can manually reopen the issue if necessary.

danopernis commented 1 month ago

This one is (slowly) being worked on.