Stephen Williams wrote:
> 
> 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?
not that I know of. my libusb code uses them without much trouble.

If you want to be advised when things change, use the usbview code (see 
http://sourceforge.net/projects/usbview/) that Greg K-H wrote as an example. I
think it polls on /proc/bus/usb/devices for changes. You might be able to use
the same thing.

Brad

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to