Cant read USB drive
-
I have not been able to read a USB drive, it is just not recognized. I have a duet3 in SBC mode, do I need a spacial driver or something in order for the USB drives be detected by the raspi so I can load gcodes through a usb drive?
Thanks in advance
-
-
@chrishamm Hello, thanks for the answer. I have installed usbmount :sudo apt install usbmount
ANd Im getting the same result as your answer: usb card 0, 1 and 2. When I try to access usb card 2 I get the same error
Without being a software guy, can you help me on wat Im missing?
The post you mentioned points to a similar / same problem, but my objective is just upload gcode files. I get the same error though. So is there any way I can connect the usb drive and be automatically mounted? in 3.3 version was working on, 3.4 is lacking this option -
More data: the USB is being mou ted OK: I can see it on /media/pi/.
It is the interface DWC not being capable of seeing it
The diretory is: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 18:47 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 usb7 -
@chrishamm 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?
-
@chrishamm any light you could give me here?
-
@tinchus If you have the USB mounted and accessible on the Pi, I think you use M21 to mount it as a directory in DWC. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes/M21
Ian
-
@droftarts That is not the problem. The usb is being mounted, it is just that is being mounted under root provileges, so DWC cant access its contents. All information is above
-
@tinchus DSF services run as
dsf
user, so it cannot accessroot
files unless the "other" (anonymous) flags are set accordingly. You can try out https://pkg.duet3d.com/testing/image_2022-07-28-DuetPi.zip or https://pkg.duet3d.com/testing/image_2022-07-28-DuetPi-lite.zip which feature automatic USB mount support with correct privileges usingusbmount
. -