vpelletier / python-libusb1

Python ctype-based wrapper around libusb1
GNU Lesser General Public License v2.1
168 stars 65 forks source link

usb1.USBErrorNotSupported: LIBUSB_ERROR_NOT_SUPPORTED [-12] #8

Closed RiceeeChang closed 8 years ago

RiceeeChang commented 9 years ago

Hello,

I got some new problems. I try this package with android device(Samsung S5) when I try to get the usb serial number,

File "C:\Python27\lib\site-packages\usb1.py", line 1870, in getSerialNumber self.device_descriptor.iSerialNumber) File "C:\Python27\lib\site-packages\usb1.py", line 1845, in _getASCIIStringDescriptor temp_handle = self.open() File "C:\Python27\lib\site-packages\usb1.py", line 1898, in open mayRaiseUSBError(result) File "C:\Python27\lib\site-packages\usb1.py", line 106, in mayRaiseUSBError raiseUSBError(value) File "C:\Python27\lib\site-packages\usb1.py", line 102, in raiseUSBError raise STATUS_TO_EXCEPTION_DICT.get(value, USBError)(value) usb1.USBErrorNotSupported: LIBUSB_ERROR_NOT_SUPPORTED [-12]

I guess that the problem is caused by driver or the libusb1 library I use libusb-1.0.19 and ADB Interface's is libusb0 v1.2.6.0 May the library is not support this driver or not ?

vpelletier commented 9 years ago

AFAIK, on Windows it is required to install a special driver instead of the default one for libusb to do anything with the device. This also means that until you uninstall that driver, the device will only be usable through libusb. I used Zadig a bit (years ago), and IIRC it makes it easy to (un)install this driver, so it shouldn't be more than a slight annoyance for developing - but may be a more serious issue if you want to distribute your program (one extra step, needing admin rights, and if not undone user's android device will seem unusable from the computer).

vpelletier commented 8 years ago

Closing as this is now inactive, and likely not a python-libusb1 issue.