macOS: use IORegistryEntryGetRegistryEntryID to resolve paths #322

Merged
Youw merged 1 commit from macos-path into master 2021-08-23 12:58:13 -05:00
Youw commented 2021-08-14 14:55:50 -05:00 (Migrated from github.com)

With some device connection configurations,
the device paths become over 512 bytes (io_string_t max length)
which makes them unusable with current implementation.

Rather than using ServiceRegistry string path, use its ID,
which is uint64_t and easily serializable/deserializable into a string.

Implementation idea by felix.schwarz@iospirit.com
github.com/flirc/hidapi@8d251c3854

Fixes: #127, #236.

With some device connection configurations, the device paths become over 512 bytes (io_string_t max length) which makes them unusable with current implementation. Rather than using ServiceRegistry string path, use its ID, which is uint64_t and easily serializable/deserializable into a string. Implementation idea by felix.schwarz@iospirit.com https://github.com/flirc/hidapi/commit/8d251c3854c3b1877509ab07a623dafc8e803db5 Fixes: #127, #236.
Youw commented 2021-08-15 03:37:27 -05:00 (Migrated from github.com)

@erikmwerner, @mcuee will you be able to try this out?

@erikmwerner, @mcuee will you be able to try this out?
mcuee commented 2021-08-15 06:42:03 -05:00 (Migrated from github.com)

This seems to work fine.


hidapi_macospath/build on  macos-path [?] via △ v3.21.1 ❯ ./hidtest/hidtest 
hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969658
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969658
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969658
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969658
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969658
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Device Found
  type: 046d 1000
  path: DevSrvsID:4294969745
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d 1000
  path: DevSrvsID:4294969745
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Device Found
  type: 0000 0000
  path: DevSrvsID:4294969106
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)

Device Found
  type: 0000 0000
  path: DevSrvsID:4294968838
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0x1)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0xff00)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x2 (0xff00)

Device Found
  type: 046d b010
  path: DevSrvsID:4294970231
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969655
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969655
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969655
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Device Found
  type: 0000 0000
  path: DevSrvsID:4294968456
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d c52b
  path: DevSrvsID:4294969651
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Device Found
  type: 047f c025
  path: DevSrvsID:4294969649
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x1 (0xc)

Device Found
  type: 047f c025
  path: DevSrvsID:4294969649
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x5 (0xb)

Device Found
  type: 047f c025
  path: DevSrvsID:4294969649
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x1 (0xffa0)

unable to open device

Without this pull request, it is problematic for my setup whhere I have two powered hub (which are nested hub themselves).


hidapi on  master [?] via △ v3.21.1 ❯ ./buildarm64/hidtest/hidtest 
hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Device Found
  type: 0000 0000
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/aop@4A400000/AppleASCWrapV4/iop-aop-nub/RTBuddyV2/AOPEndpoint6/AppleSPU@10000001/wakehint/AppleSPUHIDDevice
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0x1)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x1 (0xff00)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x2 (0xff00)

Device Found
  type: 046d b010
  path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver
  serial_number: 34-88-5d-ab-0c-12
  Manufacturer: Unknown
  Product:      Bluetooth Mouse M557
  Release:      1002
  Interface:    -1
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d 1000
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d 1000
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Device Found
  type: 047f c025
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x1 (0xc)

Device Found
  type: 047f c025
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x5 (0xb)

Device Found
  type: 047f c025
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice
  serial_number: CB13A3E40E8E47D6A40769C27E90A38E
  Manufacturer: Plantronics
  Product:      Plantronics C320-M
  Release:      135
  Interface:    3
  Usage (page): 0x1 (0xffa0)

Device Found
  type: 0000 0000
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/nub-spmi@3D0D9300/AppleT8101SPMIController/btm@F/AppleBTM
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)

Device Found
  type: 0000 0000
  path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/i2c2@35018000/AppleS5L8940XI2CController/audio-codec-output@48/AppleCS42L83Audio/AppleCS42L83Mikey
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Device Found
  type: 046d c52b
  path: 
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

unable to open device
This seems to work fine. ``` hidapi_macospath/build on  macos-path [?] via △ v3.21.1 ❯ ./hidtest/hidtest hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0. Compile-time version matches runtime version of hidapi. Device Found type: 046d c52b path: DevSrvsID:4294969658 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x2 (0x1) Device Found type: 046d c52b path: DevSrvsID:4294969658 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x1 (0x1) Device Found type: 046d c52b path: DevSrvsID:4294969658 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x1 (0xc) Device Found type: 046d c52b path: DevSrvsID:4294969658 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x80 (0x1) Device Found type: 046d c52b path: DevSrvsID:4294969658 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x88 (0xffbc) Device Found type: 046d 1000 path: DevSrvsID:4294969745 serial_number: Manufacturer: Logitech Product: LogiVirtualHIDDevice Release: 1 Interface: 2 Usage (page): 0x2 (0x1) Device Found type: 046d 1000 path: DevSrvsID:4294969745 serial_number: Manufacturer: Logitech Product: LogiVirtualHIDDevice Release: 1 Interface: 2 Usage (page): 0x1 (0x1) Device Found type: 0000 0000 path: DevSrvsID:4294969106 serial_number: Manufacturer: Apple Product: Release: 0 Interface: -1 Usage (page): 0xff (0xff00) Device Found type: 0000 0000 path: DevSrvsID:4294968838 serial_number: Manufacturer: APPL Product: BTM Release: 0 Interface: -1 Usage (page): 0x48 (0xff00) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x2 (0x1) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0x1) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0xc) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0xff00) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x2 (0xff00) Device Found type: 046d b010 path: DevSrvsID:4294970231 serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x6 (0x1) Device Found type: 046d c52b path: DevSrvsID:4294969655 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x1 (0xff00) Device Found type: 046d c52b path: DevSrvsID:4294969655 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x2 (0xff00) Device Found type: 046d c52b path: DevSrvsID:4294969655 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x4 (0xff00) Device Found type: 0000 0000 path: DevSrvsID:4294968456 serial_number: Manufacturer: Apple Product: Headset Release: 0 Interface: -1 Usage (page): 0x1 (0xc) Device Found type: 046d c52b path: DevSrvsID:4294969651 serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 047f c025 path: DevSrvsID:4294969649 serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x1 (0xc) Device Found type: 047f c025 path: DevSrvsID:4294969649 serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x5 (0xb) Device Found type: 047f c025 path: DevSrvsID:4294969649 serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x1 (0xffa0) unable to open device ``` Without this pull request, it is problematic for my setup whhere I have two powered hub (which are nested hub themselves). ``` hidapi on  master [?] via △ v3.21.1 ❯ ./buildarm64/hidtest/hidtest hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0. Compile-time version matches runtime version of hidapi. Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 0000 0000 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/aop@4A400000/AppleASCWrapV4/iop-aop-nub/RTBuddyV2/AOPEndpoint6/AppleSPU@10000001/wakehint/AppleSPUHIDDevice serial_number: Manufacturer: Apple Product: Release: 0 Interface: -1 Usage (page): 0xff (0xff00) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x2 (0x1) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0x1) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0xc) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x1 (0xff00) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x2 (0xff00) Device Found type: 046d b010 path: IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver serial_number: 34-88-5d-ab-0c-12 Manufacturer: Unknown Product: Bluetooth Mouse M557 Release: 1002 Interface: -1 Usage (page): 0x6 (0x1) Device Found type: 046d 1000 path: serial_number: Manufacturer: Logitech Product: LogiVirtualHIDDevice Release: 1 Interface: 2 Usage (page): 0x2 (0x1) Device Found type: 046d 1000 path: serial_number: Manufacturer: Logitech Product: LogiVirtualHIDDevice Release: 1 Interface: 2 Usage (page): 0x1 (0x1) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x1 (0xff00) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x2 (0xff00) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 2 Usage (page): 0x4 (0xff00) Device Found type: 047f c025 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x1 (0xc) Device Found type: 047f c025 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x5 (0xb) Device Found type: 047f c025 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/apcie@90000000/AppleT8103PCIe/pci-bridge1@1/IOPP/pcie-xhci@0/AppleT8103USBXHCIFL1100@02000000/pcie-xhci-hs-port2@02200000/4-Port USB 2.0 Hub@02200000/AppleUSB20Hub@02200000/AppleUSB20HubPort@02210000/4-Port USB 2.0 Hub@02210000/AppleUSB20Hub@02210000/AppleUSB20HubPort@02212000/USB 2.0 Hub [MTT]@02212000/AppleUSB20Hub@02212000/AppleUSB20HubPort@02212600/Plantronics C320-M@02212600/IOUSBHostInterface@3/AppleUserUSBHostHIDDevice serial_number: CB13A3E40E8E47D6A40769C27E90A38E Manufacturer: Plantronics Product: Plantronics C320-M Release: 135 Interface: 3 Usage (page): 0x1 (0xffa0) Device Found type: 0000 0000 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/nub-spmi@3D0D9300/AppleT8101SPMIController/btm@F/AppleBTM serial_number: Manufacturer: APPL Product: BTM Release: 0 Interface: -1 Usage (page): 0x48 (0xff00) Device Found type: 0000 0000 path: IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/i2c2@35018000/AppleS5L8940XI2CController/audio-codec-output@48/AppleCS42L83Audio/AppleCS42L83Mikey serial_number: Manufacturer: Apple Product: Headset Release: 0 Interface: -1 Usage (page): 0x1 (0xc) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x2 (0x1) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x1 (0x1) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x1 (0xc) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x80 (0x1) Device Found type: 046d c52b path: serial_number: Manufacturer: Logitech Product: USB Receiver Release: 2410 Interface: 1 Usage (page): 0x88 (0xffbc) unable to open device ```
mcuee (Migrated from github.com) approved these changes 2021-08-15 06:48:06 -05:00
mcuee commented 2021-08-25 06:14:26 -05:00 (Migrated from github.com)

@Youw Is it possible to integrate this patch with the branch https://github.com/libusb/hidapi/tree/get-descriptor? Or what is the simple way for me to merge this patch with my local repo? Sorry I am not good at using git. Or maybe the other way around, integrate get-descriptor branch to the main branch.

@Youw Is it possible to integrate this patch with the branch https://github.com/libusb/hidapi/tree/get-descriptor? Or what is the simple way for me to merge this patch with my local repo? Sorry I am not good at using git. Or maybe the other way around, integrate get-descriptor branch to the main branch.
mcuee commented 2021-08-25 06:24:07 -05:00 (Migrated from github.com)

Not so sure if the following is the correct way.

hidapi on  master [?] via △ v3.21.1 ❯ git branch mytest

hidapi on  master [?] via △ v3.21.1 ❯ git checkout mytest
Switched to branch 'mytest'
		
hidapi on  mytest [?] via △ v3.21.1 ❯ wget https://github.com/libusb/hidapi/commit/0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch
...

2021-08-25 19:16:44 (23.1 MB/s) - ‘0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch’ saved [5560/5560]

hidapi on  mytest [?] via △ v3.21.1 ❯ git apply 0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch 
hidapi on  mytest [!?] via △ v3.21.1 took 9s ❯ wget https://github.com/libusb/hidapi/commit/26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch
...
2021-08-25 19:17:52 (2.32 MB/s) - ‘26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch’ saved [592/592]

hidapi on  mytest [!?] via △ v3.21.1 ❯ git apply 26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch 
Not so sure if the following is the correct way. ``` hidapi on  master [?] via △ v3.21.1 ❯ git branch mytest hidapi on  master [?] via △ v3.21.1 ❯ git checkout mytest Switched to branch 'mytest' hidapi on  mytest [?] via △ v3.21.1 ❯ wget https://github.com/libusb/hidapi/commit/0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch ... 2021-08-25 19:16:44 (23.1 MB/s) - ‘0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch’ saved [5560/5560] hidapi on  mytest [?] via △ v3.21.1 ❯ git apply 0db25f9132efaa3dfed3e376ba4cfea5e7c7fed8.patch hidapi on  mytest [!?] via △ v3.21.1 took 9s ❯ wget https://github.com/libusb/hidapi/commit/26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch ... 2021-08-25 19:17:52 (2.32 MB/s) - ‘26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch’ saved [592/592] hidapi on  mytest [!?] via △ v3.21.1 ❯ git apply 26d45bf4272ddcf4c845a5f28e5c451cf7999695.patch
Youw commented 2021-08-25 06:46:25 -05:00 (Migrated from github.com)

Is it possible to integrate this patch with the branch https://github.com/libusb/hidapi/tree/get-descriptor?

Technically we want to "sync get-descriptor branch with master".
I did so by "merge master into get-descriptor.

> Is it possible to integrate this patch with the branch https://github.com/libusb/hidapi/tree/get-descriptor? Technically we want to "sync `get-descriptor` branch with `master`". I did so by "merge `master` into `get-descriptor`.
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!322
No description provided.