ruabmbua / hidapi-rs

Rust bindings for the hidapi C library
MIT License
177 stars 82 forks source link

Linux Native target does not find any devices #157

Open danielhstahl opened 5 months ago

danielhstahl commented 5 months ago

On the minimal example from the README on a Raspberry Pi 3+ (64 bit):

[dependencies.hidapi]
default-features = false
features = ["linux-native"]
version = "2.6.1"

The output is:

Printing all available hid devices:

When using the linux-static-libusb:

[dependencies.hidapi]
default-features = false
features = ["linux-static-libusb"]
version = "2.6.1"

The output is: Printing all available hid devices: 2752:004b

YgorSouza commented 3 months ago

The linux-native backend is equivalent to linux-static-hidraw, so you should probably compare the result to that to see where the problem really is. Did you set the udev rules correctly (as explained in the C library's repo)? I know the hidraw backend doesn't find the devices without it, but I don't know about libusb.