PDA

View Full Version : Cross-platform program to handle USB devices of a specific vendor



enrico5th
26th February 2014, 11:03
Hello,
I need to develop a program which should allow files exchange between a PC and a particular group of USB devices produced by the same vendor. The program should work on MAC OS, Linux and Windows. Does QT provide its own set of classes for this purpose? Otherwise, is there any cross-platform USB library (supporting the hotplug) that can be used or should I handle the system messages (for each different platform) by myself?
Thanks in advance.

wysota
26th February 2014, 11:58
What protocol does the device use for communication over USB?

enrico5th
27th February 2014, 11:00
The devices will be handled as mass storage USB class devices, FAT32 formatted.
As far as I know they don't use a specific USB protocol so I think that only bulk transfer will be implemented.
I know these information are quite approximate, but this is what I've got up to now from the
Chinese partner.

Gokulnathvc
27th February 2014, 11:08
Try to use functions from setupapi.dll. I believe it should work. You need to use OS specific functions.

enrico5th
27th February 2014, 12:11
Functions from setupapi.dll will work only for windows I guess, but I need to make a program that
works on Windows, Linux and Mac. I thought I could use some kind of a cross-platform USB library
(supporting the hotplug), but I don't know which...

anda_skoa
27th February 2014, 12:38
If they appear as mass storage devices, can't use simply use file operations to write data onto them?

Cheers,
_

enrico5th
27th February 2014, 15:35
I don't think so, I need to recognize the device once it is plugged in and then
provide a number of operations including the file exchange.

Scorp2us
28th February 2014, 19:41
When you plug it in, it will either be a block device or a serial device which has to be identified by your kernel. You may need drivers. After that your OS will expose it yo you through the various usb interfaces - either mass storage or serial usually. At which time, you are at least looking at a kernel device. This isn't a Qt issue at all.