Am 07.09.2011 11:25, schrieb Xiaofan Chen: > 2011/9/7 Cornelius Kölbel <cornelius.koel...@lsexperts.de>: >> Hello Wander, >> >> I just stumbled upon this thread. >> >> >> http://www.mail-archive.com/pyusb-users@lists.sourceforge.net/msg00839.html >> >> I am using pyusb and python-yubico to program yubikeys on linux and on >> windows. >> We realized that it will not work on windows due to the >> detach_kernel_driver thing. So the question is, if the upper library >> should take into account, on which operation system it is running and >> either call detach_kernel or not or if the underlying module should take >> care. If I could I would vote for the underlying ;-) >> >> What are your plans regarding this one? > Just want to check which backend you are using? If you use > libusb-1.0 backend, then the kernel driver call does exist > in libusb-1.0 Windows backend, it just return > LIBUSB_ERROR_NOT_SUPPORTED for both Windows. > Same for libusb-1.0 under Mac OS X. > > But if you use libusb-win32 backend, then you are right > that call is not implemented. > Hi, I used the zadig tool to install the libusb 1.0 driver.
Well, using >>> import usb >>> usb.core.finde() tells me, that I can see the device. Unfortunately now I get another error like this: Traceback (most recent call last): File "yubikey.py", line 140, in <module> main() File "yubikey.py", line 120, in main otpkey, serial = enrollYubikey( debug= True ) File "yubikey.py", line 38, in enrollYubikey YK = yubico.yubikey.find_key(debug=debug) File "build\bdist.win32\egg\yubico\yubikey.py", line 143, in find_key File "build\bdist.win32\egg\yubico\yubikey_usb_hid.py", line 83, in __init__ File "build\bdist.win32\egg\yubico\yubikey_usb_hid.py", line 368, in _open File "build\bdist.win32\egg\yubico\yubikey_usb_hid.py", line 395, in _get_usb_ device File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\legacy.py", line 330 , in busses return (Bus(),) File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\legacy.py", line 326 , in __init__ self.devices = [Device(d) for d in core.find(find_all=True)] File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\legacy.py", line 311 , in __init__ self.configurations = [Configuration(c) for c in dev] File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\core.py", line 706, in __iter__ yield Configuration(self, i) File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\core.py", line 407, in __init__ configuration File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\_debug.py", line 52, in do_trace return f(*args, **named_args) File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\backend\libusb10.py" , line 423, in get_configuration_descriptor config, byref(cfg))) File "C:\Programme\LinOTP2\python26\lib\site-packages\usb\backend\libusb10.py" , line 357, in _check raise USBError(_str_error[retval.value]) usb.core.USBError: Entity not found Obviously a "simple" usb.busses() fails. Sill using pyusb 1.0.0 a1 Kind regards Cornelius
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users