Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. USB connection problem , /dev/sdb1 is mounted error.
Forum Updated to NodeBB v4.3 + New Features

USB connection problem , /dev/sdb1 is mounted error.

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 4.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    ramesn
    wrote on last edited by
    #1

    Dear all, First of all thanking you ALL for the time and support.

    When my Qt project try to read USB data (music file ) through QDBusInterface, QDBusMessage. i am getting following error:
    ErrorName: " Org.freedesktop.UDisks.Error.Busy "
    ErrorMessage: "/dev/sdb1" is mounted.

    I am getting this error , because my Ubuntu system already showing this USB content, But here i want my Qt application to use the USB instead of UBUNTU.

    Could any one kindly suggest me ,as i am very new to this platform.

    -Ramesh.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      What are you trying to do when you get that error? Mount that drive?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ramesn
        wrote on last edited by
        #3

        Tobias Hunger, Thanks for the reply.

        My requirement, If USB device is already connected to Ubuntu system, by that if my Qt application wants to access USB, it should access it.

        Case1: By that time of Plug in ,my Qt app getting control on USB.
        Case2: If USB already connected , in that case it shows Busy and Job is pending message.

        Kindly let us know, how to stop Ubuntu to access USB , i want only my Qt get access USB always.

        Thanks in advance for the time and effor.

        -Ramesh.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          Tobias asked that question because the error message implies that you are trying to mount a USB drive in order to read the content on the device as files. The error indicates that the device is already mounted, so you should be able to just read the content. It doesn't matter who mounted the drive.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            ramesn
            wrote on last edited by
            #5

            Hi ChrisW67 thanks for the time.

            First i want to read "FilesystemMount" path of my USB device . i.e: "/media/KINGSTON"

            I am using folowing to read USB file mounted path.

            devLocation i am getting is "/org/freedesktop/UDisks/devices/sdb1"

            dBus= new QDBusInterface(DISK_SERV,devLocation,"org.freedesktop.UDisks.Device",QDBusConnection::systemBus(),this);

            QDBusMessage msg = dBus->callWithArgumentList(QDBus::AutoDetect,"FilesystemMount",args);

            Here i am getting ErrorName: “ Org.freedesktop.UDisks.Error.Busy “ ErrorMessage: “/dev/sdb1” is mounted.

            After i get File mounted path only i can read files in USB.

            It would be a great help, if someone suggested me the way to proceed.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              ramesn
              wrote on last edited by
              #6

              Someone please suggest me the solution. i am struck with this problem.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                ChrisW67
                wrote on last edited by
                #7

                You are trying to mount a filesystem that is already mounted. Seems simple enough, query the 'DeviceIsMounted' property and don't try to mount it again if it is already mounted. The 'DeviceMountPaths' should tell you where it already mounted.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  ramesn
                  wrote on last edited by
                  #8

                  ChrisWQ67,

                  http://qt-project.org/forums/viewthread/8595 , this link answered my questions. Thanks all.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved