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. Interface a USB HID device frow Qt (Windows)
Forum Updated to NodeBB v4.3 + New Features

Interface a USB HID device frow Qt (Windows)

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 20.2k Views 2 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.
  • C Offline
    C Offline
    CarlStenquist
    wrote on last edited by
    #1

    Is there anyone who knows if there is any way to interface to a HID device (e.g. mouse, keyboard) via Qt in Windows?
    THANKS

    P.S. I'm not really a "lab rat". Just an applications engineer.

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Your question is a bit vague, what do you mean by "interface to a HID device" ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CarlStenquist
        wrote on last edited by
        #3

        I'd like to know if there is a USB host HID driver (source package or DLL ?) available which Qt can use to interface with a mouse, keyboard, or other PC HID peripheral.

        P.S. I'm not really a "lab rat". Just an applications engineer.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          But what for ? If you're running Qt with Windows (like you said in your first post) the device will already be handled for you thus usable with your Qt application.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            CarlStenquist
            wrote on last edited by
            #5

            The idea is to create a board with specific VID and PID with which the Qt app would be able to connect to. It would be the only PC application talking to the HID device. (It should not enumerate as standard mouse or a keyboard.) I want to be able to read and write to its endpoints. How can I go about doing this? In this case, I cannot use CDC (QtSerialPort) for other reasons.

            P.S. I'm not really a "lab rat". Just an applications engineer.

            1 Reply Last reply
            1
            • Q Offline
              Q Offline
              qxoz
              wrote on last edited by
              #6

              Hi.
              You can try following API's:
              "HID Api":http://www.signal11.us/oss/hidapi/
              "libusb-win32":http://sourceforge.net/apps/trac/libusb-win32/wiki
              "http://libusbx.org/ - its a fork of libusb":http://libusbx.org/

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

                LibUSB is great. I used it to create a USB host and target MCU solution titled "Create A Solution Without the Class Struggle", available from Renesas as download "r01an0492ej_usb". This comes with host and target code templates using Python and PyUSB. I used LibUSBwin32 ( libusb0_x86.dll), never had success with the libUSBx.

                But for this I do need HID, for other reasons.
                I will check out http://www.signal11.us/oss/hidapi
                Thanks!
                Carl Stenquist

                P.S. I'm not really a "lab rat". Just an applications engineer.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DeepakJAdon
                  wrote on last edited by
                  #8

                  Hey Carl evening I am facing the same problem! If you got the solution so, please reply.

                  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