PDA

View Full Version : USB for Qt Application



dheeraj
17th May 2008, 19:26
Hi every one. I am using Qt to develop my application. I need to communicate with a remote system and acquire data on USB cable. I found QExtserialport but there is nothing about USB in it. Is it possible to use USB communication in my application. I searched a lot on internet about USB with Qt but din find any.


Thank You

marcel
17th May 2008, 21:17
No support for that in Qt. Depending the platform used, you can either use a library or directly the OS API.
On Win you can dig in the win ddk, or use http://libusb-win32.sourceforge.net/.
libusb is available for linux too.

dheeraj
18th May 2008, 18:27
Hi marcel thankx a lot for the reply. It helped me. I downloaded the libusb-0.1.12.tar.gz file. Hey can you please tell me how i should use this library in the application i am going to make. How do i connect this to my Application. !! This is the first time i am doing something like this so i don't have any idea on how to use it. I am using Window's Xp ,Qt4.3.3 with VS2005.net


Thank You

dheeraj
19th May 2008, 06:52
Hey i am sorry .i downloaded LibUSB-Win32 file now. The previous one libusb-0.1.12.tar.gz which i did was for Linux i realized it only later.

AlphaWolfXV
14th April 2009, 13:43
Have you had any chance to use the libusb-win32? I have downloaded it and would also like to use it for a simple HID application. Please advise if you had any success with it so far. I am running Windows Vista Business (32bit) with QT4.5.0 with QtCreator 1.0.0.
Thanks!

arunpk
7th February 2012, 06:35
hi friends
I am developing qt application for usb Relay board through qt application only i need to control all the 8 relay, but the problem is i am understanding how to approach it. if you guys have any idea regarding these please let me know, and send example application as per these requirment concern.

ChrisW67
7th February 2012, 06:49
Here are some ideas:

Determine how your relays are accessed by reading the documentation that comes with them or their controller board.
Choose a library or programming interface to access them (if one is not provided with the devices). This will involve some research on your part but this thread already contains viable methods.
Write your code


This is not a Qt problem, there is no Qt support for accessing USB devices, and you are very unlikely to have someone write your code for you (even with a less vague specification). If you come across a Qt related question while doing this feel free to come back, but please refrain from resurrecting four-year-old threads to post vague "me too" questions.

arunpk
7th February 2012, 14:44
Thanx Chris...... I have idea about how am going to access...... From thsi forum i got USB Example application...... Now am trying with that application to connect my relay board..... i have given the exact VID & PID but still its not detecting the board..... Now i need clarification regarding this.... Hope you can do..... :) ...