All,

If you have some interest with regards to libusb-win32 and libusbK 
driver support, you may want to have a look at the new 0K ("zero K") 
branch from the pbatard/libusbx repo on github [1].

I have now pushed a patch that adds libusb0.sys and libusbK.sys support 
there, for testing.

To fetch the branch:

  git clone git://github.com/pbatard/libusbx.git libusbx-pbatard
  cd libusbx-pbatard
  git checkout 0K

Note that because the branch is not off mainline, but off a personal 
libusbx repo, you must go through a new clone.

For testing, you may also want to install the libusb-win32 and libusbK 
drivers, in which case you can use the latest Zadig, released today, and 
that include support for libusb0.sys v1.2.6.0 & libusbK v3.0.5.16 RC 
(Will K 3.0.5 ever go out of RC?).
As usual, Zadig can be downloaded at [2].

For an idea of what the commit entails (patch), have a look at [3].

Basically, if libusbK is installed on the system, we make use of the 
WinUSB-like access provided by the K DLL for libusb0, libusbK as well as 
WinUSB access, which simplifies things quite a bit. And again, I have to 
thank Travis for his effort on providing WinUSB emulation there.
If K is not installed, we just go through the regular WinUSB DLL as usual.

The main major change we had to apply then was the adding of a sub_api 
parameters for the bulk of our driver API calls. But apart from that, I 
would say that the changes are relatively minimal.

I should also point out that the implementation is very dependent on the 
KUSB_FNID definitions from libusbK and their order, which means that 
older versions of the K DLL based, that had a different organization for 
KUSB_FNID may not work (and potential future breakage is also a 
possibility). Maybe we'll try to do something about that is if it 
becomes an issue. And while it may have simplified our implementation a 
bit, we chose not to use lusbk_dynapi.c for the libusbK distro, mostly 
because that would add about 200 KB of source, most of which aren't 
really relevant for our use, and also because we wanted to ensure that 
WinUSB could still be used as standalone (i.e. outside of libusbK.dll 
being present on the system), as it would be an unacceptable regression 
for our users otherwise. Plus there's also the issue of lusbk_dynapi.c 
not using an LGPL v2.1 compatible license.

As Xiaofan and Travis may remember, we also threw in some vague plan of 
trying to merge the K and X libraries in the future, but we'll probably 
need to see what comes out of libusbx v2.0 before we look into that...


So far, early tests against the XBox controller as well as an EZ-USB FX2 
device appear to indicate that device access is working OK, though I 
haven't checked the libusb0.sys as filter driver, and my tests have been 
limited.

The one minor issue I found is that I get the following in xusb when 
trying to fetch the string descriptors of an XBox Controller device, 
when libusb-win32 is used:

Reading string descriptors:
libusbx: error [winusbx_submit_control_transfer] ControlTransfer failed: 
[31] A device attached to the system is not functioning.

That device doesn't have strings, so this is not a major issue, and the 
libusb0 driver doesn't seem to have an issue returning strings for 
devices that have them. It's just in case there are no strings that 
libsusb0 seems to differ from the others and produces an error whereas 
the other drivers don't complain.

Regards,

/Pete


[1] https://github.com/pbatard/libusbx/tree/0K
[2] https://sourceforge.net/projects/libwdi/files/zadig/
[3] 
https://github.com/pbatard/libusbx/commit/8ab3fc618ba90bb14686dcadd34af15a870cf738


------------------------------------------------------------------------------
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