Closed dongjian closed 2 years ago
It's strange . after some test . I found that I can open the device use "sudo cargo run"
Some platforms don't let you access keyboard/mouse HID devices as a security precaution. I think this is the expected behaviour on macOS.
Yes, as far as I know certain hid devices on macos can`t be opened directly with raw HID access, only the kernel driver is allowed to access it. You can only get around that with special permissions (sudo will do).
Thanks! Links may be helpful to others who have similar problems: https://github.com/libusb/hidapi/issues/344 https://github.com/libusb/hidapi/pull/397
test code :
It's works fine on Windows with the same code . But can't open device on Mac(Can find but can not open)