-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macos: improve USB interface number retrival #534
Conversation
This is not working yet. But I think the approach is good and this is a good start. click for the run log
|
Right. The idea is to detect and correctly report |
8950fb6
to
417b631
Compare
417b631
to
84aef87
Compare
The solution appeared to be a bit different (and simpler) than I though. |
This is working fine now under fully up to date macOS Ventura 13.3.1. Tested on Mac Mini M1 (2020). Full run log with some USB HID devices (Logitech USB receiver and a no-brand remote control) and some Bluetooth HID devices (Microsoft Bluetooth Mouse, Logitech K480 Keyboard). BTW, it is a bit strange that there is no Manufacturer string printed for Logitech K480 bluetooth keyboard. click for the full run log
|
I guess this is normal.
|
In macOS 13.3 the kUSBInterfaceNumber is no longer one of the properties of the IOHIDDevice (even if its transport is USB). In case if kUSBInterfaceNumber property (for USB Interface number) is not available as an IOHIDDevice property - find the value for that property in one of the Parent IORegistry Entries.
This PR is good to me now. @dingsijie-nreal and @pengxianheng-nreal |
@dingsijie-nreal and @pengxianheng-nreal Ping. Please help to try the PR. Thanks. |
just tested and this PR works fine now on our device. Well done and thanks a lot!
|
@dingsijie-nreal @Youw |
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies. Code changes are clippy fixes.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies. Code changes are clippy fixes. libusb dep was changed to libudev, as hidapi-rs switched to the hidraw hidapi backend by default (was libusb backend before) in ruabmbua/hidapi-rs@bbb7f3e.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies. Code changes are clippy fixes. libusb dep was changed to libudev, as hidapi-rs switched to the hidraw hidapi backend by default (was libusb backend before) in ruabmbua/hidapi-rs@bbb7f3e. Docker base image updated from 16.04 to 20.04 as as 16.04 and 18.04 reached end-of-life.
Fixes: #531