Hi,

On 02/13/2013 10:58 AM, Kustaa Nyholm wrote:
> On 12.2.2013 12.29, "Hans de Goede" <hdego...@redhat.com> wrote:
> <snip>
>> On 02/12/2013 12:54 AM, Pete Batard wrote:
>>>
>>> Personally, the first thing I want out of hotplug from a libusbx/Windows
>>> standpoint is to provide applications with the ability to notify users
> <snip>
>>
>> We can simply add:
>>
>> LIBUSB_HOTPLUG_EVENT_DRIVERLESS_DEVICE_ARRIVED
>> LIBUSB_HOTPLUG_EVENT_DRIVERLESS_DEVICE_LEFT
>
> Why is necessary or beneficial to have different events for
> device plug in/out for driverless devices?

To detect transitions between the 2 states, ie a device
gets plugged in, windows loads the standard driver for it,
so from libusb pov it is driverless (as it does not have
a driver which allows its use in libusb) this generates a
LIBUSB_HOTPLUG_EVENT_DRIVERLESS_DEVICE_ARRIVED

Some apps may respond to this by uninstalling the standard
driver and attaching a libusb usable driver, ie the winusb
driver, then the following 2 events are generated:
LIBUSB_HOTPLUG_EVENT_DRIVERLESS_DEVICE_LEFT
LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED

Note that this very closely matches what exactly happens,
when you uninstall the standard driver, windows will
report this as the device having go away. And when you
install the other driver it will report this as a
new device being available.

> In my thinking weather there is a driver or not is
> logically a property of libusb_device and should
> be queried from that handle and result in corresponding
> error (LIBUSB_ERROR_NO_DRIVER) if passed to libusb_open().

Apps which are actually interested in this will want an
event on the transitions from driverless to non-driverless
too, so that they will know that the windows-device-manager
is done with the driver installation.

Regards,

Hans

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to