Results 1 to 8 of 8

Thread: Cross-platform program to handle USB devices of a specific vendor

  1. #1
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Cross-platform program to handle USB devices of a specific vendor

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    What protocol does the device use for communication over USB?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    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.

  4. #4
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    Try to use functions from setupapi.dll. I believe it should work. You need to use OS specific functions.

  5. The following user says thank you to Gokulnathvc for this useful post:

    enrico5th (3rd March 2014)

  6. #5
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    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...

  7. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    If they appear as mass storage devices, can't use simply use file operations to write data onto them?

    Cheers,
    _

  8. #7
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    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.

  9. #8
    Join Date
    Apr 2008
    Posts
    45
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Cross-platform program to handle USB devices of a specific vendor

    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.

Similar Threads

  1. How to handle cross platform font sizes
    By Berryblue031 in forum Qt Programming
    Replies: 2
    Last Post: 27th June 2011, 14:55
  2. Replies: 1
    Last Post: 11th November 2010, 00:31
  3. Vendor and Model Name from USB Devices
    By NoRulez in forum Qt Programming
    Replies: 6
    Last Post: 20th July 2009, 09:01
  4. QT Creator, cross platform program.
    By kazek3018 in forum Newbie
    Replies: 8
    Last Post: 20th December 2008, 23:13
  5. Handle specific URL with QHttp
    By guilugi in forum Qt Programming
    Replies: 2
    Last Post: 9th April 2006, 14:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.