Results 1 to 8 of 8

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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.

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

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

    enrico5th (3rd March 2014)

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

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

  5. #4
    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,
    _

  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

    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.

  7. #6
    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
  •  
Qt is a trademark of The Qt Company.