I'm writing an application that works with a USB device. The device
itself is expected to be plugged and unplugged during the lifetime
of the application, so I'm looking for a way to follow the state of
the device. It's a GTK application, I have no problem with using
timers.
I'm considering using libusb, and in my poll routine rerunning:
usb_find_busses();
usb_find_devices();
until my device shows up. I'm then willing to use keep-alive packets
to watch for the device to be unplugged. (I'm writing the device firm-
ware too.) And so on.
These functions do not seem to be behaving, though. Is there a problem
with calling usb_find_* functions repeatedly?
An alternative is to use a hotplug script to locate the device and signal
the application (possibly by writing a file in some known place) when the
device appears. In this case, I can write the /proc/bus/usb/... path and
let the application read that and open the device directly.
Is there a way to get libusb to open a device that I have already found
by external means? i.e. handed to me by hotplug?
--
Steve Williams "The woods are lovely, dark and deep.
[EMAIL PROTECTED] But I have promises to keep,
[EMAIL PROTECTED] and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel