Peter Stuge wrote:
> Xiaofan Chen wrote:
>> I think the warning message is a bit miss-leading. If libusbx found
>> 0000/0000, then it should probably warn against unrecognized device.
> If Windows says that there is a 0:0 device when there is actually an
> error, and if this case is indistinguishable from an OK device with
> 0:0 in the device descriptor, then the Windows backend should not
> discard the device.

Well, this is a philosophical issue.  The USB spec says there is no such
thing as "an OK device with 0:0 in the device descriptor", because a
device descriptor needs to have a VID from the USB IF.  However, we all
know it's possible to create descriptors that violate the spirit of the
spec and still operate.  That would be the case here.

The issue arises because libusb and libusbx are relying on undocumented
behavior (actually, "explicitly disrecommended behavior") by cracking
and assigning meaning to the fields of the hardware ID.  That makes a
policy decision a bit awkward.  Libusb sees USB\VID_0000&PID_0000 and
assumes this represents a real device with 0000 in the VID and PID
fields, but that is a conclusion based on a faulty assumption.

> However, if Windows always considers a device with 0:0 in the device
> descriptor an error, then the Windows backend should discard them.

I don't think the Windows USB stack does any such thing, although if I
were a real man I would have burned a device with 0000/0000 to test this.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to