pyusb 需要安装 驱动吗?

在使用pyusb库时,若遇到libusb_open返回'LIBUSB_ERROR_NOT_SUPPORTED'错误,通常意味着需要安装WinUSB驱动。虽然没有该驱动,libusb仍能获取USB设备的基本信息,但无法打开设备进行进一步操作。通过Zadig应用可轻松安装WinUSB或其他libusb支持的驱动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

pyusb 需要安装 驱动吗?

libusb_open returns ‘LIBUSB_ERROR_NOT_SUPPORTED’ on Windows 7

https://stackoverflow.com/questions/17350177/libusb-open-returns-libusb-error-not-supported-on-windows-7

It seems you need to install the winusb driver - libusb can get information about devices without this driver, but it cannot open them.

http://libusb.6.n5.nabble.com/LIBUSB-ERROR-NOT-SUPPORTED-td5617169.html:

On Wed, Apr 4, 2012 at 11:52 PM, Quân Phạm Minh <[hidden email]> wrote:

although I never install winusb driver but I use libusb to get information of my usb (kingston usb, and already recognize by system)

Yes that is possible. But you can not open the device and do further things. That is the confusing part for new users with regard to libusb Windows backend, and similarly for Mac OS X as well. libusb can get some basic information for device with a non-proper driver (e.g.: USB mass storage device), but will not be able to open the device without changing the driver to a supported one.

– Xiaofan

7

You can easily install the WinUSB driver or the other drivers which libusb supports (libusb-win32 and libusbK) through the use of Zadig, an application that was developed just to solve this problem. See https://zadig.akeo.ie.

One thing to keep in mind, though, is that if you replace a Mass Storage driver or HID driver (which Windows installs automatically) with WinUSB, you will only be able to access your device through libusb and won’t be able to access your device as Mass Storage or HID until you uninstall the WinUSB driver.

Finally, if you have control of the firmware for your device, it is also possible to create devices that will automatically install the WinUSB driver on Vista or later, so that users don’t have to go through a manual driver installation (this may require a connection to Windows Update for Windows 7 or earlier, but should work even without an internet connection for Windows 8 or later). See https://github.com/pbatard/libwdi/wiki/WCID-Devices.

[DISCLAIMER] I am the author of Zadig/libwi, the WCID wiki pages as well as a contributor to the libusb Windows backend.

https://github.com/pbatard/libwdi/wiki/WCID-Devices
https://zadig.akeo.ie/

(稍后补充)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值