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. How to get service, path, interface parameters for QDBusInterface class ?
Forum Updated to NodeBB v4.3 + New Features

How to get service, path, interface parameters for QDBusInterface class ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 341 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.
  • V Offline
    V Offline
    Van Duong
    wrote on last edited by
    #1

    Hi every body !
    I have an usb device (code : DIO-0808LY-USB) attach to host :
    Laptop - x64 - linux ubuntu 23.04,
    Jetson agx orin - arm64 - linux ubuntu 20.04.

    In old source code (run on an embeded board), they used QDBusInterface to connect and control, and now , I think I will use QDbusInterface too.
    QDBusInterface's constructor need 3 string parameters is service, path and interface but i don't known how to get value of that parameters from my device.

    When I attach that device to host, a file will create on /dev/bus/usb/003/file. File name is a number and will count up after each device attach.
    When I run command "lsusb", it display is :
    Bus 003 Device 005: ID 06ce:a302 Contec DIO-0808LY-USB

    When I run command : usb-devices. It display is :
    T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=06ce ProdID=a302 Rev=ba.ca
    S: Manufacturer=Contec Co.,ltd
    S: Product=DIO-0808LY-USB
    S: SerialNumber=1002121068D0
    C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
    I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

    I think path is /dev/bus/usb/003/file but not sure.

    How to get 3 string parameters from an specific usb device.
    Help me, please !

    sierdzioS 1 Reply Last reply
    0
    • V Van Duong

      Hi every body !
      I have an usb device (code : DIO-0808LY-USB) attach to host :
      Laptop - x64 - linux ubuntu 23.04,
      Jetson agx orin - arm64 - linux ubuntu 20.04.

      In old source code (run on an embeded board), they used QDBusInterface to connect and control, and now , I think I will use QDbusInterface too.
      QDBusInterface's constructor need 3 string parameters is service, path and interface but i don't known how to get value of that parameters from my device.

      When I attach that device to host, a file will create on /dev/bus/usb/003/file. File name is a number and will count up after each device attach.
      When I run command "lsusb", it display is :
      Bus 003 Device 005: ID 06ce:a302 Contec DIO-0808LY-USB

      When I run command : usb-devices. It display is :
      T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
      D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
      P: Vendor=06ce ProdID=a302 Rev=ba.ca
      S: Manufacturer=Contec Co.,ltd
      S: Product=DIO-0808LY-USB
      S: SerialNumber=1002121068D0
      C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
      I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
      E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

      I think path is /dev/bus/usb/003/file but not sure.

      How to get 3 string parameters from an specific usb device.
      Help me, please !

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Van-Duong D-Bus is something completely different than /dev/bus. These two are completely unrelated.

      If you do have some system service which works with your USB device and exposes a D-Bus interface, you need to refer to its documentation, it will tell you the paths.

      Alternatively, try running dbus-monitor when connecting your device. If there is some D-Bus interface handling for it already on your system, you will see some messages there.

      (Z(:^

      V 1 Reply Last reply
      2
      • sierdzioS sierdzio

        @Van-Duong D-Bus is something completely different than /dev/bus. These two are completely unrelated.

        If you do have some system service which works with your USB device and exposes a D-Bus interface, you need to refer to its documentation, it will tell you the paths.

        Alternatively, try running dbus-monitor when connecting your device. If there is some D-Bus interface handling for it already on your system, you will see some messages there.

        V Offline
        V Offline
        Van Duong
        wrote on last edited by
        #3

        @sierdzio
        I have not experience about dbus. I converting source code from old linux embedded board to a new device. String parameters of old device is not compatible with new device and return invalid connection. But now, I cannot contact to old developers and have not documents about it too.
        I will trying with dbus-monitor.
        Have you a tool, trick or other ways to help me find parameters from connected device ?
        Thank you so much !

        sierdzioS 1 Reply Last reply
        0
        • V Van Duong

          @sierdzio
          I have not experience about dbus. I converting source code from old linux embedded board to a new device. String parameters of old device is not compatible with new device and return invalid connection. But now, I cannot contact to old developers and have not documents about it too.
          I will trying with dbus-monitor.
          Have you a tool, trick or other ways to help me find parameters from connected device ?
          Thank you so much !

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @Van-Duong said in How to get service, path, interface parameters for QDBusInterface class ?:

          Have you a tool, trick or other ways to help me find parameters from connected device ?

          No, dbus-monitor is the only thing that comes to my mind.

          (Z(:^

          V 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @Van-Duong said in How to get service, path, interface parameters for QDBusInterface class ?:

            Have you a tool, trick or other ways to help me find parameters from connected device ?

            No, dbus-monitor is the only thing that comes to my mind.

            V Offline
            V Offline
            Van Duong
            wrote on last edited by
            #5

            @sierdzio Thank you so much !

            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