a1ien / rusb

A safe Rust wrapper for libusb.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rusb cannot open USB devices on Windows 11.

lethargy123 opened this issue · comments

I have been using rusb in my project, but after testing, I found that it is not working on the Windows platform. However, it works on Ubuntu. So, I tried running read_device.rs from the examples to test if there is an issue with my code. When I run it, the following error message is outputted:
thread 'main' panicked at 'Device found but failed to open: Operation not supported or unimplemented on this platform', src\main.rs:64:27
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: process didn't exit successfully: target\debug\test_v1.exe 6353 53261 (exit code: 101)

commented

So am I, using rusb::has_hotplug method will return false,This makes it unusable in Win 11

我也是,使用 rusb::has_hotplug 方法会返回 false,这使得它在 Win 11 中无法使用

I tested my code on Windows 7 and Windows 10, and it worked fine in opening USB devices. However, it is not functioning properly on Windows 11. I agree with your observation that using the rusb::has_hotplug method will return false, rendering it unusable in Windows 11.

This driver issues. Check if winusb driver is used for device. Also read this https://github.com/libusb/libusb/wiki/Windows#how-to-use-libusb-on-windows