Results 1 to 7 of 7

Thread: Vendor and Model Name from USB Devices

  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Vendor and Model Name from USB Devices

    Hey @all,

    is there a way to get the vendor name and the model of a printer?
    If I connect a Printer via USB i see the vendor name and the model in the /var/log/messages. E.g.: Hewlett Packard LaserJet 1600C

    Best Regards NoRulez

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Vendor and Model Name from USB Devices

    QPrinterInfo::availablePrinters ()

  3. #3
    Join Date
    Jul 2008
    Posts
    69
    Thanks
    9
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Vendor and Model Name from USB Devices

    Is there similar command for USB key?

    Thanks

  4. #4
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Vendor and Model Name from USB Devices

    Thanks, but what i must do for USB sticks, mouse, keyboard and so on?
    The Printer was only an example. Maybe i can do so with QtDBus? And when, how?

    Best Regards
    NoRulez

  5. #5
    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: Vendor and Model Name from USB Devices

    You can detect some things through HAL or you can use the /sys/bus/usb/ interface. Of course there is also libusb and lsusb as an example of its use.
    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.


  6. #6
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Vendor and Model Name from USB Devices

    How can I use QtDBUS and HAL or /sys/bus/usb/interface?

    I didn't found any examples of doing so.
    Could you please provide me a minimal example on how to do this?
    I've never worked with QtDBus before.

    Thanks in advance

    Best Regards
    NoRulez

  7. #7
    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: Vendor and Model Name from USB Devices

    Quote Originally Posted by NoRulez View Post
    How can I use QtDBUS and HAL
    I don't understand the question. What do you mean "how"?
    or /sys/bus/usb/interface?
    This is an artificial filesystem tree containing (beside other things) information reported by usb devices (like the device name, vendor, etc.).

    I didn't found any examples of doing so.
    You probably looked in the wrong place. Did you look here?
    http://www.freedesktop.org/wiki/Software/hal

    Could you please provide me a minimal example on how to do this?
    No, I can't, I don't have time to dig into the structure of HAL.
    I've never worked with QtDBus before.
    Even the longest journey begins with the single first step. Using dbus is simple, just try the examples.
    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.


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.