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. Using USB with QT
Forum Updated to NodeBB v4.3 + New Features

Using USB with QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 4.6k Views
  • 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
    razorqhex
    wrote on 11 May 2017, 11:52 last edited by
    #1

    I have a device MICROCHIP CAN BUS Analyzer, with known to me VID and PID. My task is to read data from it. But for this, I need to find it (identify). I used different libraries, such as: LIBUSB, HIDAPI, some libraries modified for QT. And not one library could not help me. The maximum I have achieved is to find my keyboard. And nothing more. Help me please.
    And sorry for my bad english.

    It's a custom USB devices:
    alt text
    VID: 04D8
    PID: 0A30
    Here is a photo of the device: alt text

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 11 May 2017, 12:09 last edited by
      #2

      First guess: did you install the drivers of the device?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      R 1 Reply Last reply 11 May 2017, 12:13
      0
      • V VRonin
        11 May 2017, 12:09

        First guess: did you install the drivers of the device?

        R Offline
        R Offline
        razorqhex
        wrote on 11 May 2017, 12:13 last edited by razorqhex 5 Nov 2017, 12:27
        #3

        @VRonin said in Using USB with QT:

        First guess: did you install the drivers of the device?

        Of Course

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on 11 May 2017, 12:36 last edited by kuzulis 5 Nov 2017, 12:42
          #4

          Of Course

          Then you should to use its vendor-specific SDK && API documentation (if it is possible) to have access to an analyzer, as I assume (or just to use its viewers software "as is").

          R 1 Reply Last reply 11 May 2017, 12:43
          1
          • K kuzulis
            11 May 2017, 12:36

            Of Course

            Then you should to use its vendor-specific SDK && API documentation (if it is possible) to have access to an analyzer, as I assume (or just to use its viewers software "as is").

            R Offline
            R Offline
            razorqhex
            wrote on 11 May 2017, 12:43 last edited by
            #5

            @kuzulis said in Using USB with QT:

            Of Course

            Then you should to use its vendor-specific SDK && API documentation (if it is possible) to have access to an analyzer, as I assume (or just to use its viewers software "as is").

            Is it possible to find it via VID and PID through Device Manager?
            Or at least make it so that a whole list of all connected USB devices is displayed?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on 11 May 2017, 14:17 last edited by
              #6

              Is it possible to find it via VID and PID through Device Manager?
              Or at least make it so that a whole list of all connected USB devices is displayed?

              What for? Do you have a protocol's API specification of your Analyzer?

              In this situation you have two ways:

              1. Use the Analyzer's device which is created by MICROCHIP CAN BUS driver directly (as it does from vendor-utility). For this purpose, you need in some SDK && API documentation, in which described how to enumerate your Analyzer's device in system, how to open it and how to control/read/write from.. usually it does via CreateFile/ReadFile/WriteFile/DeviceIoControl functions. But, the main problem is in documentation of a protocol (related to the transferred data structures, and ioctrl's on device to configure it).

              For this purpose, you can enumerate your Analyser's system path by class GUID of your Analyser, which can be found in *.inf file of Analyser's driver. Just use Windows Setup Api (SetupDiGetClassDevs and so on functions) to enumerate device system path to opening.

              1. Use the WinUSB functions directly, where are used generic winusb.sys driver for your Analyser, instead of MICROCHIP's vendor-driver. In this case you can read/write control/bulk/isochronous USB requests directly to/from Analyser. But, here also, you need an API documentation about of a formats of messages and so on.

              For this purpose, you can enumerate your Analyser's device, using WinUSB functions.

              PS: Please, do not ask how to do it, as all related information you can found in MSDN and in google.

              1 Reply Last reply
              1

              1/6

              11 May 2017, 11:52

              • Login

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