• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Cant read USB drive

Scheduled Pinned Locked Moved
General Discussion
3
9
393
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Tinchus
    last edited by 28 Jun 2022, 15:33

    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

    undefined 1 Reply Last reply 28 Jun 2022, 15:43 Reply Quote 0
    • undefined
      chrishamm administrators @Tinchus
      last edited by 28 Jun 2022, 15:43

      @tinchus Yes. You need to set up a service like usbmount yourself. It isn't supported out of the box (yet).

      Duet software engineer

      undefined 2 Replies Last reply 28 Jun 2022, 16:19 Reply Quote 1
      • undefined
        Tinchus @chrishamm
        last edited by Tinchus 28 Jun 2022, 16:19

        @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

        1 Reply Last reply Reply Quote 0
        • undefined
          Tinchus
          last edited by 28 Jun 2022, 18:06

          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

          1 Reply Last reply Reply Quote 0
          • undefined
            Tinchus @chrishamm
            last edited by 28 Jun 2022, 18:22

            @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 usb7

            The 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?

            1 Reply Last reply Reply Quote 0
            • undefined
              Tinchus
              last edited by 9 Aug 2022, 13:22

              @chrishamm any light you could give me here?

              undefined 1 Reply Last reply 9 Aug 2022, 14:21 Reply Quote 0
              • undefined
                droftarts administrators @Tinchus
                last edited by 9 Aug 2022, 14:21

                @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

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                undefined 1 Reply Last reply 9 Aug 2022, 14:58 Reply Quote 0
                • undefined
                  Tinchus @droftarts
                  last edited by 9 Aug 2022, 14:58

                  @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

                  undefined 1 Reply Last reply 9 Aug 2022, 15:53 Reply Quote 0
                  • undefined
                    chrishamm administrators @Tinchus
                    last edited by 9 Aug 2022, 15:53

                    @tinchus DSF services run as dsf user, so it cannot access root 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 using usbmount.

                    Duet software engineer

                    1 Reply Last reply Reply Quote 0
                    • undefined Phaedrux referenced this topic 16 Sept 2022, 03:26
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA