SBC USB printing
-
Hi,
Is it possible in SBC mode to print from an USB-stick connected to the SBC?
I've tried to plug an USB Stick (SD-card reader in this case) into the Pi and got this result:The USB stick is recognized as SD card 2 in the web interface:
When I try to open it, I get this error message:
I've checked via SSH if the stick is recognized by the Pi itself which was the case:
I am running RRF 3.3.0
Thanks in advance!
-
@chrishamm any ideas in this?
-
@t3p3tony
I wonder if it's a good idea to print from a hotplug device? -
@semi55 I haven't tried external SD card readers yet but I know USB drives can be accessed if an automount utility usbmount is configured (with
uid
set todsf
). If you already have an auto-mount utility configured (which would explain whySD Card 2
shows up), check if thedsf
user or group can access your volume. -
@chrishamm Hey there, thanks for replying.
I work with @semi55 in the team, so I'm replying on behalf of both of us.Our current image runs the desktop version with DuetPi installed. The desktop is logged in as "pi" but "dsf" is used in the background.
I have unmounted the drive in question and ran the following commands to test this theory:
sudo umount D2F1-AD5F
sudo mount -o umask=777,gid=996,uid=996 /dev/sda1 /media/sd
996 is the GID/UID of "dsf".
We now get a different error where I don't know anymore what the answer to that would be:
Thanks a lot in advance
-
@peterwilli Does it help to reload DWC once it's mounted? What does
http://duet3/machine/directory/2:/
output when the drive is mounted? You may have to replace duet3 with the name or IP address of your printer.
-
@o_lampe said in SBC USB printing:
@t3p3tony
I wonder if it's a good idea to print from a hotplug device?Probably not, but many printers come with support for printing from USB port. SD cards are hotplug too if you pull hard enough.
-
@chrishamm said in SBC USB printing:
@peterwilli Does it help to reload DWC once it's mounted? What does
http://duet3/machine/directory/2:/
output when the drive is mounted? You may have to replace duet3 with the name or IP address of your printer.
Hi there,
With the link + mounting the drive manually for dsf we get the following error:
-
@peterwilli That error code means that DWS cannot get the file list from the requested path (even though it should have returned an HTTP error instead; I'll fix that). You could start a shell with the
dsf
user by runningsudo -u dsf bash
and then check if you can enter the mount point of the USB drive and list the files there. I suspect it's a permission problem. -
@chrishamm Hi there
dsf@raspberrypi:/home/pi$ cd /media/sd bash: cd: /media/sd: Permission denied
It indeed seems to break when trying to access the folder. I'm currently in the process of finding out what happened and how to fix this error.
-
Excuse me to revive this thread, but took a long break after really not being able to fix this in a reasonable amount of time without getting too crazy.
We finally solved it. The solution was:
- The desktop was automounting the SD card. I finally unmounted using
umount /media/pi/D2F1-AD5F
- Then, I remounted using
sudo mount -o rw,umask=0000 -t vfat /dev/sda1 /media/sd
. - I also added
dsf
to theusers
group, but that may not be necessary.
The only thing that's left to do is making sure it still auto-mounts, but with the right permissions and configuration.
- The desktop was automounting the SD card. I finally unmounted using
-
-
I have similar / same error but cant see a solution: I want to upload a gcode I have on my usb stick. I plug the USB into the raspi, and I cant see it on the DWC interface.
Im not skill on linux so, can anyobody lauch a hint on how to solve this?
My intention is only load gcode from the USB drive, not printing from it -
I can see my USB being mounted on /media/pi/ but the interface DWC cant show me / find it..
-
@tinchus said in SBC USB printing:
My intention is only load gcode from the USB drive, not printing from it
Then why open it from DWC? Can you copy it on the Pi side?
-
@phaedrux I have the interface, I plug in the usb drive, then I go to files > upload Gcode, shouldnt I see the usb drive in order to look for the gcode and uploaded to the PI? That is what I cant do,
-
@phaedrux It is a permissions problem because USB is mounted and I can see it on /media.
Permissions on /media are:pi@PM8721-3:~ $ ls -all /media/
total 44
drwxr-xr-x 11 root root 4096 Jun 28 17:04 .
drwxr-xr-x 18 root root 4096 Jul 12 2021 ..
drwxr-x---+ 3 root root 4096 Jun 28 19:01 pi
lrwxrwxrwx 1 root root 4 Jun 28 17:04 usb -> usb0
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb0
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb1
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb2
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb3
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb4
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb5
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb6
drwxr-xr-x 2 root root 4096 Jun 28 17:04 usb7The USB is mounted under /media/pi/
I change permisions on /media/pi folder to:
drwxrwxr-x+ 2 root root 4096 Jun 28 19:06 pi
Now I can see the contents of any USB I PLUG, but the interface cant do anything with it, because if I try to aluch a print from it, it says it has no roght.
How can I fix this foreever in order everytime the USB is mounted, the user and group of the USB folder is NOT root?
-
I'm only a rudimentary linux user as well. Will have to see what @chrishamm has to say.
-
@phaedrux is there any othrr way? It was working on 3.3, may be if we replicate permissions fron that version?