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
Printable View
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
QPrinterInfo::availablePrinters ()
Is there similar command for USB key?
Thanks
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
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.
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
I don't understand the question. What do you mean "how"?
This is an artificial filesystem tree containing (beside other things) information reported by usb devices (like the device name, vendor, etc.).Quote:
or /sys/bus/usb/interface?
You probably looked in the wrong place. Did you look here?Quote:
I didn't found any examples of doing so.
http://www.freedesktop.org/wiki/Software/hal
No, I can't, I don't have time to dig into the structure of HAL.Quote:
Could you please provide me a minimal example on how to do this?
Even the longest journey begins with the single first step. Using dbus is simple, just try the examples.Quote:
I've never worked with QtDBus before.