Skip to content

Conversation

Youw
Copy link
Member

@Youw Youw commented Jul 23, 2023

To be consistent with Windows/macOS (OS-level implementations).

Fixes: #298
Fixes: #454

@Youw Youw marked this pull request as draft July 23, 2023 12:25
@Youw
Copy link
Member Author

Youw commented Jul 23, 2023

I haven't tested it properly yet, but at least the PR should give an idea what's wrong/what the fix is.

@Youw Youw force-pushed the hidraw-usage-parse branch from 988e3cc to 3ef6cf4 Compare July 23, 2023 12:27
@Youw
Copy link
Member Author

Youw commented Jul 23, 2023

@haata I'd appreciate if you could check/review it as the original author of this routine.

To be consistent with Windows/macOS (OS-level implementations).

Fixes: #298
@Youw Youw force-pushed the hidraw-usage-parse branch from 8edfc52 to 78c6ade Compare July 23, 2023 12:32
@mcuee mcuee added the hidraw Related to Linux/hidraw backend label Jul 23, 2023
@mcuee
Copy link
Member

mcuee commented Jul 23, 2023

This seems to help comparied to git main.

If we ignore the two Windows pseudo HID devices (path: \\?\HID#ConvertedDevice&xxxxxxx) and Acer Airplane Mode Controller and Portable Device Control device with path: \\?\HID#INTC816#3&d2322f2&0&0000, this PR seems to be good for the 2.4G Mouse and the track-pad.

Please take note that I did not connect the bluetooth mouse to Linux so that one is correct.

Output from Ubuntu 20.04 Linux (not using sudo to print the report descriptors)

mcuee@UbuntuSwift3:~/build/hid/hidapi_pr601$ ./hidtest/hidtest-hidraw 
hidapi test/example tool. Compiled with hidapi version 0.14.0, runtime version 0.14.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x1 (0xffb5)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x5 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0xe (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
unable to open device

mcuee@UbuntuSwift3:~/build/hid/hidapi$ ./hidtest/hidtest-hidraw 
hidapi test/example tool. Compiled with hidapi version 0.14.0, runtime version 0.14.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x1 (0xffb5)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x1 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x5 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0xe (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x22 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 3 (I2C)

  Report Descriptor: Unable to open device by path
unable to open device

Windows 11 output from git main (dual boot laptop, so the devices should be the same).

MINGW64 /c/work/hid/hidapi
$ ./hidtest/hidtest.exe
hidapi test/example tool. Compiled with hidapi version 0.14.0, runtime version 0.14.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 045e 0916
  path: \\?\HID#{00001812-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0916_REV&0110_f338080e09c4&Col01#9&1937f32c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: f338080e09c4
  Manufacturer: Microsoft
  Product:      BluetoothMouse3600
  Release:      110
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (100 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x09, 0x02, 0xa1, 0x02,
0x09, 0x01, 0xa1, 0x00, 0x85, 0x1a, 0x05, 0x09, 0x19, 0x01,
0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x05,
0x81, 0x02, 0x75, 0x03, 0x95, 0x01, 0x81, 0x03, 0x05, 0x01,
0x09, 0x30, 0x09, 0x31, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f,
0x75, 0x10, 0x95, 0x02, 0x81, 0x06, 0x09, 0x00, 0xa1, 0x02,
0x09, 0x38, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x75, 0x10,
0x95, 0x01, 0x81, 0x06, 0xc0, 0x09, 0x00, 0xa1, 0x02, 0x05,
0x0c, 0x0a, 0x38, 0x02, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f,
0x75, 0x10, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0,
Device Found
  type: 045e 0916
  path: \\?\HID#{00001812-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0916_REV&0110_f338080e09c4&Col02#9&1937f32c&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: f338080e09c4
  Manufacturer: Microsoft
  Product:      BluetoothMouse3600
  Release:      110
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (58 bytes)
0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x27, 0x06, 0x00,
0xff, 0x0a, 0x0a, 0xfa, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75,
0x08, 0x95, 0x13, 0x81, 0x02, 0x85, 0x22, 0x0a, 0x0a, 0xfa,
0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x13, 0xb1,
0x02, 0x85, 0x24, 0x0a, 0x0a, 0xfa, 0x15, 0x00, 0x26, 0xff,
0x00, 0x75, 0x08, 0x95, 0x13, 0xb1, 0x02, 0xc0,
Device Found
  type: 045e 0916
  path: \\?\HID#{00001812-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0916_REV&0110_f338080e09c4&Col03#9&1937f32c&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: f338080e09c4
  Manufacturer: Microsoft
  Product:      BluetoothMouse3600
  Release:      110
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (78 bytes)
0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02,
0xa1, 0x02, 0x85, 0x1f, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x16,
0x01, 0x80, 0x26, 0xff, 0x7f, 0x75, 0x10, 0x95, 0x01, 0x81,
0x06, 0x85, 0x17, 0x06, 0x00, 0xff, 0x0a, 0x0f, 0xff, 0x15,
0x00, 0x25, 0x01, 0x35, 0x01, 0x45, 0x10, 0x75, 0x02, 0x95,
0x02, 0xb1, 0x02, 0x0a, 0x04, 0xff, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x01, 0x35, 0x00, 0x45, 0x00, 0xb1, 0x02,
0x75, 0x03, 0x95, 0x01, 0xb1, 0x03, 0xc0, 0xc0,
Device Found
  type: 8087 0a1e
  path: \\?\HID#INTC816#3&d2322f2&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer:
  Product:
  Release:      200
  Interface:    -1
  Usage (page): 0xd (0x1)
  Bus type: 0 (Unknown)

  Report Descriptor: (50 bytes)
0x05, 0x01, 0x09, 0x0d, 0xa1, 0x01, 0x09, 0x0d, 0xa1, 0x02,
0x85, 0x1c, 0x09, 0x81, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01,
0x95, 0x01, 0x81, 0x02, 0x75, 0x07, 0x95, 0x01, 0x81, 0x03,
0x09, 0xcb, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01,
0xb1, 0x02, 0x75, 0x07, 0x95, 0x01, 0xb1, 0x03, 0xc0, 0xc0,
Device Found
  type: 06cb cd40
  path: \\?\HID#SYNA7DAB&Col01#5&2f64dfea&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: 9999
  Manufacturer: Microsoft
  Product:      HIDI2C Device
  Release:      501
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: (52 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x09, 0x01, 0xa1, 0x00,
0x85, 0x02, 0x05, 0x09, 0x19, 0x01, 0x29, 0x02, 0x15, 0x00,
0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x75, 0x06,
0x95, 0x01, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31,
0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06,
0xc0, 0xc0,
Device Found
  type: 06cb cd40
  path: \\?\HID#SYNA7DAB&Col02#5&2f64dfea&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: 9999
  Manufacturer: Microsoft
  Product:      HIDI2C Device
  Release:      501
  Interface:    -1
  Usage (page): 0x5 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: (610 bytes)
0x05, 0x0d, 0x09, 0x05, 0xa1, 0x01, 0x09, 0x22, 0xa1, 0x02,
0x85, 0x03, 0x09, 0x47, 0x09, 0x42, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x09, 0x51, 0x15, 0x00,
0x25, 0x05, 0x75, 0x03, 0x95, 0x01, 0x81, 0x02, 0x75, 0x03,
0x95, 0x01, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x15, 0x00,
0x26, 0xc8, 0x04, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x55, 0x0e,
0x65, 0x11, 0x75, 0x10, 0x95, 0x01, 0x81, 0x02, 0x09, 0x31,
0x15, 0x00, 0x26, 0xe8, 0x02, 0x35, 0x00, 0x46, 0x6c, 0x02,
0x75, 0x10, 0x95, 0x01, 0x81, 0x02, 0xc0, 0x05, 0x0d, 0x09,
0x22, 0xa1, 0x02, 0x09, 0x47, 0x09, 0x42, 0x15, 0x00, 0x25,
0x01, 0x75, 0x01, 0x95, 0x02, 0x45, 0x00, 0x55, 0x00, 0x65,
0x00, 0x81, 0x02, 0x09, 0x51, 0x15, 0x00, 0x25, 0x05, 0x35,
0x00, 0x46, 0x6c, 0x02, 0x55, 0x0e, 0x65, 0x11, 0x75, 0x03,
0x95, 0x01, 0x81, 0x02, 0x75, 0x03, 0x95, 0x01, 0x81, 0x03,
0x05, 0x01, 0x09, 0x30, 0x15, 0x00, 0x26, 0xc8, 0x04, 0x35,
0x00, 0x46, 0xfc, 0x03, 0x75, 0x10, 0x95, 0x01, 0x81, 0x02,
0x09, 0x31, 0x15, 0x00, 0x26, 0xe8, 0x02, 0x35, 0x00, 0x46,
0x6c, 0x02, 0x75, 0x10, 0x95, 0x01, 0x81, 0x02, 0xc0, 0x05,
0x0d, 0x09, 0x22, 0xa1, 0x02, 0x09, 0x47, 0x09, 0x42, 0x15,
0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x45, 0x00, 0x55,
0x00, 0x65, 0x00, 0x81, 0x02, 0x09, 0x51, 0x15, 0x00, 0x25,
0x05, 0x35, 0x00, 0x46, 0x6c, 0x02, 0x55, 0x0e, 0x65, 0x11,
0x75, 0x03, 0x95, 0x01, 0x81, 0x02, 0x75, 0x03, 0x95, 0x01,
0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x15, 0x00, 0x26, 0xc8,
0x04, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x75, 0x10, 0x95, 0x01,
0x81, 0x02, 0x09, 0x31, 0x15, 0x00, 0x26, 0xe8, 0x02, 0x35,
0x00, 0x46, 0x6c, 0x02, 0x75, 0x10, 0x95, 0x01, 0x81, 0x02,
0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x09, 0x47, 0x09,
0x42, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x45,
0x00, 0x55, 0x00, 0x65, 0x00, 0x81, 0x02, 0x09, 0x51, 0x15,
0x00, 0x25, 0x05, 0x35, 0x00, 0x46, 0x6c, 0x02, 0x55, 0x0e,
0x65, 0x11, 0x75, 0x03, 0x95, 0x01, 0x81, 0x02, 0x75, 0x03,
0x95, 0x01, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x15, 0x00,
0x26, 0xc8, 0x04, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x75, 0x10,
0x95, 0x01, 0x81, 0x02, 0x09, 0x31, 0x15, 0x00, 0x26, 0xe8,
0x02, 0x35, 0x00, 0x46, 0x6c, 0x02, 0x75, 0x10, 0x95, 0x01,
0x81, 0x02, 0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x09,
0x47, 0x09, 0x42, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95,
0x02, 0x45, 0x00, 0x55, 0x00, 0x65, 0x00, 0x81, 0x02, 0x09,
0x51, 0x15, 0x00, 0x25, 0x05, 0x35, 0x00, 0x46, 0x6c, 0x02,
0x55, 0x0e, 0x65, 0x11, 0x75, 0x03, 0x95, 0x01, 0x81, 0x02,
0x75, 0x03, 0x95, 0x01, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30,
0x15, 0x00, 0x26, 0xc8, 0x04, 0x35, 0x00, 0x46, 0xfc, 0x03,
0x75, 0x10, 0x95, 0x01, 0x81, 0x02, 0x09, 0x31, 0x15, 0x00,
0x26, 0xe8, 0x02, 0x35, 0x00, 0x46, 0x6c, 0x02, 0x75, 0x10,
0x95, 0x01, 0x81, 0x02, 0xc0, 0x05, 0x0d, 0x09, 0x56, 0x15,
0x00, 0x27, 0xff, 0xff, 0x00, 0x00, 0x35, 0x00, 0x47, 0xff,
0xff, 0x00, 0x00, 0x55, 0x0c, 0x66, 0x01, 0x10, 0x75, 0x10,
0x95, 0x01, 0x81, 0x02, 0x09, 0x54, 0x15, 0x00, 0x25, 0x7f,
0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 0x05, 0x09, 0x09, 0x01,
0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x45, 0x00,
0x55, 0x00, 0x65, 0x00, 0x81, 0x02, 0x75, 0x07, 0x95, 0x01,
0x81, 0x03, 0x85, 0x08, 0x05, 0x0d, 0x09, 0x55, 0x09, 0x59,
0x15, 0x00, 0x25, 0x0f, 0x35, 0x00, 0x47, 0xff, 0xff, 0x00,
0x00, 0x55, 0x0c, 0x66, 0x01, 0x10, 0x75, 0x04, 0x95, 0x02,
0xb1, 0x02, 0x85, 0x0d, 0x09, 0x60, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x01, 0x45, 0x00, 0x55, 0x00, 0x65, 0x00,
0xb1, 0x02, 0x75, 0x07, 0x95, 0x01, 0xb1, 0x03, 0x85, 0x07,
0x06, 0x00, 0xff, 0x09, 0xc5, 0x15, 0x00, 0x26, 0xff, 0x00,
0x35, 0x00, 0x47, 0xff, 0xff, 0x00, 0x00, 0x55, 0x0c, 0x66,
0x01, 0x10, 0x75, 0x08, 0x96, 0x00, 0x01, 0xb1, 0x02, 0xc0,
Device Found
  type: 06cb cd40
  path: \\?\HID#SYNA7DAB&Col03#5&2f64dfea&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: 9999
  Manufacturer: Microsoft
  Product:      HIDI2C Device
  Release:      501
  Interface:    -1
  Usage (page): 0xe (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: (71 bytes)
0x05, 0x0d, 0x09, 0x0e, 0xa1, 0x01, 0x09, 0x22, 0xa1, 0x02,
0x85, 0x04, 0x09, 0x52, 0x15, 0x00, 0x25, 0x0a, 0x35, 0x00,
0x47, 0xff, 0xff, 0x00, 0x00, 0x55, 0x0c, 0x66, 0x01, 0x10,
0x75, 0x08, 0x95, 0x01, 0xb1, 0x02, 0xc0, 0x09, 0x22, 0xa1,
0x00, 0x85, 0x06, 0x09, 0x57, 0x09, 0x58, 0x15, 0x00, 0x25,
0x01, 0x75, 0x01, 0x95, 0x02, 0x45, 0x00, 0x55, 0x00, 0x65,
0x00, 0xb1, 0x02, 0x75, 0x06, 0x95, 0x01, 0xb1, 0x03, 0xc0,
0xc0,
Device Found
  type: 06cb cd40
  path: \\?\HID#SYNA7DAB&Col04#5&2f64dfea&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: 9999
  Manufacturer: Microsoft
  Product:      HIDI2C Device
  Release:      501
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 3 (I2C)

  Report Descriptor: (110 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x0b, 0x09,
0x04, 0x15, 0x00, 0x26, 0xff, 0x00, 0x35, 0x00, 0x47, 0xff,
0xff, 0x00, 0x00, 0x55, 0x0c, 0x66, 0x01, 0x10, 0x75, 0x08,
0x95, 0x3d, 0x81, 0x02, 0x85, 0x0c, 0x09, 0x05, 0x15, 0x00,
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x3d, 0x81, 0x02, 0x85,
0x09, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08,
0x95, 0x14, 0x91, 0x02, 0x85, 0x0a, 0x09, 0x03, 0x15, 0x00,
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x14, 0x91, 0x02, 0x85,
0x0f, 0x09, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08,
0x95, 0x03, 0xb1, 0x02, 0x85, 0x0e, 0x09, 0x07, 0x15, 0x00,
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x01, 0xb1, 0x02, 0xc0,
Device Found
  type: 045e 0000
  path: \\?\HID#ConvertedDevice&Col02#5&32cf90e6&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer:
  Product:
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 0 (Unknown)

  Report Descriptor: (32 bytes)
0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x02, 0x09, 0xe9,
0x09, 0xea, 0x0a, 0x21, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75,
0x01, 0x95, 0x03, 0x81, 0x02, 0x75, 0x05, 0x95, 0x01, 0x81,
0x03, 0xc0,
Device Found
  type: 045e 0000
  path: \\?\HID#ConvertedDevice&Col03#5&32cf90e6&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer:
  Product:
  Release:      0
  Interface:    -1
  Usage (page): 0x80 (0x1)
  Bus type: 0 (Unknown)

  Report Descriptor: (27 bytes)
0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x03, 0x09, 0x81,
0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02,
0x75, 0x07, 0x95, 0x01, 0x81, 0x03, 0xc0,
Device Found
  type: deed feed
  path: \\?\HID#10251229#3&9d5d338&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer: Acer Inc
  Product:      Acer Airplane Mode Controller
  Release:      101
  Interface:    -1
  Usage (page): 0xc (0x1)
  Bus type: 0 (Unknown)

  Report Descriptor: (27 bytes)
0x05, 0x01, 0x09, 0x0c, 0xa1, 0x01, 0x85, 0x01, 0x09, 0xc6,
0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x06,
0x75, 0x07, 0x95, 0x01, 0x81, 0x03, 0xc0,
Device Found
  type: 045e 0000
  path: \\?\HID#ConvertedDevice&Col01#5&32cf90e6&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\KBD
  serial_number:
  Manufacturer:
  Product:
  Release:      0
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 0 (Unknown)

  Report Descriptor: (37 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x05, 0x07,
0x09, 0x69, 0x09, 0x6a, 0x09, 0x6b, 0x09, 0x6c, 0x09, 0xe3,
0x09, 0x4c, 0x09, 0xe2, 0x09, 0xe0, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x08, 0x81, 0x02, 0xc0,
Device Found
  type: 1ea7 0064
  path: \\?\HID#VID_1EA7&PID_0064&Col01#6&1bdfd61d&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer: (Standard system devices)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x1 (0xffb5)
  Bus type: 1 (USB)

  Report Descriptor: (36 bytes)
0x06, 0xb5, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xb5, 0x09,
0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x07,
0x81, 0x02, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75,
0x08, 0x95, 0x07, 0x91, 0x02, 0xc0,
Device Found
  type: 1ea7 0064
  path: \\?\HID#VID_1EA7&PID_0064&Col02#6&1bdfd61d&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number:
  Manufacturer: (Standard system devices)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (75 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x09, 0x01, 0xa1, 0x00,
0x85, 0x02, 0x05, 0x09, 0x19, 0x01, 0x29, 0x08, 0x15, 0x00,
0x25, 0x01, 0x75, 0x01, 0x95, 0x08, 0x81, 0x02, 0x05, 0x01,
0x09, 0x30, 0x09, 0x31, 0x16, 0x01, 0xf8, 0x26, 0xff, 0x07,
0x75, 0x0c, 0x95, 0x02, 0x81, 0x06, 0x09, 0x38, 0x15, 0x81,
0x25, 0x7f, 0x75, 0x08, 0x95, 0x01, 0x81, 0x06, 0x05, 0x0c,
0x0a, 0x38, 0x02, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95,
0x01, 0x81, 0x06, 0xc0, 0xc0,
unable to open device

More detailed Linux output using Ubuntu 23.04, using sudo to dump the report descriptors.

click for the details
ubuntu@ubuntu:~/build/libusb/hidapi_pr601$ sudo ./hidtest/hidtest-hidraw 
hidapi test/example tool. Compiled with hidapi version 0.14.0, runtime version 0.14.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x1 (0xffb5)
  Bus type: 1 (USB)

  Report Descriptor: (105 bytes)
0x06, 0xb5, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xb5, 0x09, 
0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x07, 
0x81, 0x02, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 
0x08, 0x95, 0x07, 0x91, 0x02, 0xc0, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x08, 0x15, 0x00, 0x25, 0x01, 0x95, 0x08, 
0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x81, 0x06, 0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 
0x95, 0x01, 0x81, 0x06, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x95, 
0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 1ea7 0064
  path: /dev/hidraw1
  serial_number: 
  Manufacturer: (null)
  Product:      2.4G Mouse
  Release:      200
  Interface:    0
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (105 bytes)
0x06, 0xb5, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xb5, 0x09, 
0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x07, 
0x81, 0x02, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 
0x08, 0x95, 0x07, 0x91, 0x02, 0xc0, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x08, 0x15, 0x00, 0x25, 0x01, 0x95, 0x08, 
0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x81, 0x06, 0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 
0x95, 0x01, 0x81, 0x06, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x95, 
0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 3 (I2C)

  Report Descriptor: (665 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x95, 0x06, 
0x81, 0x01, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81, 
0x25, 0x7f, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06, 0xc0, 0xc0, 
0x05, 0x0d, 0x09, 0x05, 0xa1, 0x01, 0x85, 0x03, 0x05, 0x0d, 
0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x47, 
0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 0x01, 
0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 0xc8, 
0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 0x35, 
0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 0x6c, 
0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 0x05, 
0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 
0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 
0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 
0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 
0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 
0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 
0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 
0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 
0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 
0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 
0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 
0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 
0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 
0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 
0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 
0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 
0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 
0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 
0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 
0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 
0x02, 0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 
0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 
0x81, 0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 
0x15, 0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 
0x11, 0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 
0x81, 0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 
0x81, 0x02, 0xc0, 0x05, 0x0d, 0x55, 0x0c, 0x66, 0x01, 0x10, 
0x47, 0xff, 0xff, 0x00, 0x00, 0x27, 0xff, 0xff, 0x00, 0x00, 
0x75, 0x10, 0x95, 0x01, 0x09, 0x56, 0x81, 0x02, 0x09, 0x54, 
0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x81, 0x02, 0x05, 0x09, 
0x09, 0x01, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 
0x95, 0x07, 0x81, 0x03, 0x05, 0x0d, 0x85, 0x08, 0x09, 0x55, 
0x09, 0x59, 0x75, 0x04, 0x95, 0x02, 0x25, 0x0f, 0xb1, 0x02, 
0x85, 0x0d, 0x09, 0x60, 0x75, 0x01, 0x95, 0x01, 0x15, 0x00, 
0x25, 0x01, 0xb1, 0x02, 0x95, 0x07, 0xb1, 0x03, 0x85, 0x07, 
0x06, 0x00, 0xff, 0x09, 0xc5, 0x15, 0x00, 0x26, 0xff, 0x00, 
0x75, 0x08, 0x96, 0x00, 0x01, 0xb1, 0x02, 0xc0, 0x05, 0x0d, 
0x09, 0x0e, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x22, 0xa1, 0x02, 
0x09, 0x52, 0x15, 0x00, 0x25, 0x0a, 0x75, 0x08, 0x95, 0x01, 
0xb1, 0x02, 0xc0, 0x09, 0x22, 0xa1, 0x00, 0x85, 0x06, 0x09, 
0x57, 0x09, 0x58, 0x75, 0x01, 0x95, 0x02, 0x25, 0x01, 0xb1, 
0x02, 0x95, 0x06, 0xb1, 0x03, 0xc0, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x01, 0xa1, 0x01, 0x85, 0x09, 0x09, 0x02, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x14, 0x91, 0x02, 0x85, 
0x0a, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x14, 0x91, 0x02, 0x85, 0x0b, 0x09, 0x04, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x3d, 0x81, 0x02, 0x85, 
0x0c, 0x09, 0x05, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x3d, 0x81, 0x02, 0x85, 0x0f, 0x09, 0x06, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x03, 0xb1, 0x02, 0x85, 
0x0e, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x01, 0xb1, 0x02, 0xc0, 
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x5 (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: (665 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x95, 0x06, 
0x81, 0x01, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81, 
0x25, 0x7f, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06, 0xc0, 0xc0, 
0x05, 0x0d, 0x09, 0x05, 0xa1, 0x01, 0x85, 0x03, 0x05, 0x0d, 
0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x47, 
0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 0x01, 
0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 0xc8, 
0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 0x35, 
0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 0x6c, 
0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 0x05, 
0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 
0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 
0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 
0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 
0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 
0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 
0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 
0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 
0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 
0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 
0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 
0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 
0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 
0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 
0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 
0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 
0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 
0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 
0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 
0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 
0x02, 0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 
0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 
0x81, 0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 
0x15, 0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 
0x11, 0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 
0x81, 0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 
0x81, 0x02, 0xc0, 0x05, 0x0d, 0x55, 0x0c, 0x66, 0x01, 0x10, 
0x47, 0xff, 0xff, 0x00, 0x00, 0x27, 0xff, 0xff, 0x00, 0x00, 
0x75, 0x10, 0x95, 0x01, 0x09, 0x56, 0x81, 0x02, 0x09, 0x54, 
0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x81, 0x02, 0x05, 0x09, 
0x09, 0x01, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 
0x95, 0x07, 0x81, 0x03, 0x05, 0x0d, 0x85, 0x08, 0x09, 0x55, 
0x09, 0x59, 0x75, 0x04, 0x95, 0x02, 0x25, 0x0f, 0xb1, 0x02, 
0x85, 0x0d, 0x09, 0x60, 0x75, 0x01, 0x95, 0x01, 0x15, 0x00, 
0x25, 0x01, 0xb1, 0x02, 0x95, 0x07, 0xb1, 0x03, 0x85, 0x07, 
0x06, 0x00, 0xff, 0x09, 0xc5, 0x15, 0x00, 0x26, 0xff, 0x00, 
0x75, 0x08, 0x96, 0x00, 0x01, 0xb1, 0x02, 0xc0, 0x05, 0x0d, 
0x09, 0x0e, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x22, 0xa1, 0x02, 
0x09, 0x52, 0x15, 0x00, 0x25, 0x0a, 0x75, 0x08, 0x95, 0x01, 
0xb1, 0x02, 0xc0, 0x09, 0x22, 0xa1, 0x00, 0x85, 0x06, 0x09, 
0x57, 0x09, 0x58, 0x75, 0x01, 0x95, 0x02, 0x25, 0x01, 0xb1, 
0x02, 0x95, 0x06, 0xb1, 0x03, 0xc0, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x01, 0xa1, 0x01, 0x85, 0x09, 0x09, 0x02, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x14, 0x91, 0x02, 0x85, 
0x0a, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x14, 0x91, 0x02, 0x85, 0x0b, 0x09, 0x04, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x3d, 0x81, 0x02, 0x85, 
0x0c, 0x09, 0x05, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x3d, 0x81, 0x02, 0x85, 0x0f, 0x09, 0x06, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x03, 0xb1, 0x02, 0x85, 
0x0e, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x01, 0xb1, 0x02, 0xc0, 
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0xe (0xd)
  Bus type: 3 (I2C)

  Report Descriptor: (665 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x95, 0x06, 
0x81, 0x01, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81, 
0x25, 0x7f, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06, 0xc0, 0xc0, 
0x05, 0x0d, 0x09, 0x05, 0xa1, 0x01, 0x85, 0x03, 0x05, 0x0d, 
0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x47, 
0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 0x01, 
0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 0xc8, 
0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 0x35, 
0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 0x6c, 
0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 0x05, 
0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 
0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 
0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 
0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 
0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 
0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 
0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 
0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 
0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 
0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 
0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 
0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 
0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 
0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 
0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 
0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 
0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 
0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 
0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 
0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 
0x02, 0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 
0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 
0x81, 0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 
0x15, 0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 
0x11, 0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 
0x81, 0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 
0x81, 0x02, 0xc0, 0x05, 0x0d, 0x55, 0x0c, 0x66, 0x01, 0x10, 
0x47, 0xff, 0xff, 0x00, 0x00, 0x27, 0xff, 0xff, 0x00, 0x00, 
0x75, 0x10, 0x95, 0x01, 0x09, 0x56, 0x81, 0x02, 0x09, 0x54, 
0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x81, 0x02, 0x05, 0x09, 
0x09, 0x01, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 
0x95, 0x07, 0x81, 0x03, 0x05, 0x0d, 0x85, 0x08, 0x09, 0x55, 
0x09, 0x59, 0x75, 0x04, 0x95, 0x02, 0x25, 0x0f, 0xb1, 0x02, 
0x85, 0x0d, 0x09, 0x60, 0x75, 0x01, 0x95, 0x01, 0x15, 0x00, 
0x25, 0x01, 0xb1, 0x02, 0x95, 0x07, 0xb1, 0x03, 0x85, 0x07, 
0x06, 0x00, 0xff, 0x09, 0xc5, 0x15, 0x00, 0x26, 0xff, 0x00, 
0x75, 0x08, 0x96, 0x00, 0x01, 0xb1, 0x02, 0xc0, 0x05, 0x0d, 
0x09, 0x0e, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x22, 0xa1, 0x02, 
0x09, 0x52, 0x15, 0x00, 0x25, 0x0a, 0x75, 0x08, 0x95, 0x01, 
0xb1, 0x02, 0xc0, 0x09, 0x22, 0xa1, 0x00, 0x85, 0x06, 0x09, 
0x57, 0x09, 0x58, 0x75, 0x01, 0x95, 0x02, 0x25, 0x01, 0xb1, 
0x02, 0x95, 0x06, 0xb1, 0x03, 0xc0, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x01, 0xa1, 0x01, 0x85, 0x09, 0x09, 0x02, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x14, 0x91, 0x02, 0x85, 
0x0a, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x14, 0x91, 0x02, 0x85, 0x0b, 0x09, 0x04, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x3d, 0x81, 0x02, 0x85, 
0x0c, 0x09, 0x05, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x3d, 0x81, 0x02, 0x85, 0x0f, 0x09, 0x06, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x03, 0xb1, 0x02, 0x85, 
0x0e, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x01, 0xb1, 0x02, 0xc0, 
Device Found
  type: 06cb cd40
  path: /dev/hidraw0
  serial_number: 
  Manufacturer: 
  Product:      SYNA7DAB:01 06CB:CD40
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 3 (I2C)

  Report Descriptor: (665 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x75, 0x01, 0x95, 0x02, 0x81, 0x02, 0x95, 0x06, 
0x81, 0x01, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81, 
0x25, 0x7f, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06, 0xc0, 0xc0, 
0x05, 0x0d, 0x09, 0x05, 0xa1, 0x01, 0x85, 0x03, 0x05, 0x0d, 
0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x47, 
0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 0x01, 
0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 0xc8, 
0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 0x35, 
0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 0x6c, 
0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 0x05, 
0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 
0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 0x95, 
0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 0x75, 
0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 0x26, 
0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 0x30, 
0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 0x46, 
0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 0xc0, 
0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 0x01, 
0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 0x02, 
0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 0x02, 
0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 0x00, 
0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 0x09, 
0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 0x02, 
0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 0x02, 
0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 0x25, 
0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 0x81, 
0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 0x15, 
0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 0x11, 
0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 0x81, 
0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 0x81, 
0x02, 0xc0, 0x05, 0x0d, 0x09, 0x22, 0xa1, 0x02, 0x15, 0x00, 
0x25, 0x01, 0x09, 0x47, 0x09, 0x42, 0x95, 0x02, 0x75, 0x01, 
0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x25, 0x05, 0x09, 0x51, 
0x81, 0x02, 0x75, 0x01, 0x95, 0x03, 0x81, 0x03, 0x05, 0x01, 
0x15, 0x00, 0x26, 0xc8, 0x04, 0x75, 0x10, 0x55, 0x0e, 0x65, 
0x11, 0x09, 0x30, 0x35, 0x00, 0x46, 0xfc, 0x03, 0x95, 0x01, 
0x81, 0x02, 0x46, 0x6c, 0x02, 0x26, 0xe8, 0x02, 0x09, 0x31, 
0x81, 0x02, 0xc0, 0x05, 0x0d, 0x55, 0x0c, 0x66, 0x01, 0x10, 
0x47, 0xff, 0xff, 0x00, 0x00, 0x27, 0xff, 0xff, 0x00, 0x00, 
0x75, 0x10, 0x95, 0x01, 0x09, 0x56, 0x81, 0x02, 0x09, 0x54, 
0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x81, 0x02, 0x05, 0x09, 
0x09, 0x01, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 
0x95, 0x07, 0x81, 0x03, 0x05, 0x0d, 0x85, 0x08, 0x09, 0x55, 
0x09, 0x59, 0x75, 0x04, 0x95, 0x02, 0x25, 0x0f, 0xb1, 0x02, 
0x85, 0x0d, 0x09, 0x60, 0x75, 0x01, 0x95, 0x01, 0x15, 0x00, 
0x25, 0x01, 0xb1, 0x02, 0x95, 0x07, 0xb1, 0x03, 0x85, 0x07, 
0x06, 0x00, 0xff, 0x09, 0xc5, 0x15, 0x00, 0x26, 0xff, 0x00, 
0x75, 0x08, 0x96, 0x00, 0x01, 0xb1, 0x02, 0xc0, 0x05, 0x0d, 
0x09, 0x0e, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x22, 0xa1, 0x02, 
0x09, 0x52, 0x15, 0x00, 0x25, 0x0a, 0x75, 0x08, 0x95, 0x01, 
0xb1, 0x02, 0xc0, 0x09, 0x22, 0xa1, 0x00, 0x85, 0x06, 0x09, 
0x57, 0x09, 0x58, 0x75, 0x01, 0x95, 0x02, 0x25, 0x01, 0xb1, 
0x02, 0x95, 0x06, 0xb1, 0x03, 0xc0, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x01, 0xa1, 0x01, 0x85, 0x09, 0x09, 0x02, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x14, 0x91, 0x02, 0x85, 
0x0a, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x14, 0x91, 0x02, 0x85, 0x0b, 0x09, 0x04, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x3d, 0x81, 0x02, 0x85, 
0x0c, 0x09, 0x05, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x3d, 0x81, 0x02, 0x85, 0x0f, 0x09, 0x06, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x03, 0xb1, 0x02, 0x85, 
0x0e, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 
0x95, 0x01, 0xb1, 0x02, 0xc0, 
unable to open device

@Youw Youw marked this pull request as ready for review July 24, 2023 10:46
@Youw
Copy link
Member Author

Youw commented Jul 24, 2023

06cb cd40 is a perfect device to test this change, thanks.

Yeap, all looks good.

@Youw Youw changed the title hidraw: report only Top-Level Usage_page/Usage pairs for Collections hidraw: report only Top-Level Usage_page/Usage pairs as 'unique' devices Jul 24, 2023
@JoergAtGithub
Copy link
Contributor

In general this is an improvements, but the HID standard does not define something like a usage pair. While there must be always a Usage Page and a Usage defined (due to the clause on top of page 25 of the class specification), only the Usage is relevant for the collection.
The sole purpose of the Usage Page item is to to conserve space in a report descriptor by setting the high order 16 bits of a subsequent usages. But this is only one variant. The report descriptor can also contain the 'Extended Usage' of 32Bit, in this case, the usage page has no meaning for the collection.
Example:

Usage Page                        05 01
Usage                             09 06
Collection                        A1 01
End Collection                    C0

The same meaning for the collection with extended 32Bit Usage:

Usage                             0B 06 00 01 00,
Collection                        A1 01
End Collection                    C0

And you could also do this - than the Usage Page item influences only the second collection:

Usage Page                        05 01
Usage                             0B 99 99 99 99,
Collection                        A1 01
End Collection                    C0
Usage                             09 06
Collection                        A1 01
End Collection                    C0

To implement this correct, the Usage Page should only be use in

hidapi/linux/hid.c

Lines 361 to 364 in 78c6ade

case 0x8: /* Usage 6.2.2.8 (Local) */
*usage = get_hid_report_bytes(report_descriptor, size, data_len, *pos);
usage_found = 1;
break;

here the 32 Bit extended usage value has to be defined. Depending on the size of the Usage 0, 1, 2, or 4 Bytes of the Usage Page value have to be used to fill the missing bytes of the 32Bit usage value, which defines the nature of the following collection.

Copy link
Contributor

@haata haata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good.

@mcuee do you know if that device is HID compliant? You can only run this on windows, but https://www.usb.org/compliancetools has USB3CV (that's usually what you want). The hid test can be quite useful in this case.

@mcuee
Copy link
Member

mcuee commented Jul 25, 2023

I think this looks good.

@mcuee do you know if that device is HID compliant? You can only run this on windows, but https://www.usb.org/compliancetools has USB3CV (that's usually what you want). The hid test can be quite useful in this case.

The device 06cb:cd40 is not a USB HID device, but rather I2C-HID (touch pad).

@Youw
Copy link
Member Author

Youw commented Jul 25, 2023

Thanks @JoergAtGithub.

The same meaning for the collection with extended 32Bit Usage:

Usage                             0B 06 00 01 00,
Collection                        A1 01
End Collection                    C0

To support this case I'd need to have access to at least one device that implements 32-bit usage in the descriptor. I'll keep a support of that to #454 for now.

And you could also do this - than the Usage Page item influences only the second collection:

Usage Page                        05 01
Usage                             0B 99 99 99 99,
Collection                        A1 01
End Collection                    C0
Usage                             09 06
Collection                        A1 01
End Collection                    C0

I suspected something like that might be the case but wasn't sure. I'll try to implement that case as part of this PR.

@mcuee
Copy link
Member

mcuee commented Jul 25, 2023

@JoergAtGithub

Do you have such a device with 32bit usage? Would you please post the HID Report Descriptor of that device? I will see if I can find one or change my test device to have that.

@Youw
Copy link
Member Author

Youw commented Jul 25, 2023

I will see if I can find one or change my test device to have that.

Oh, we could craft/change any descriptor for that.

@Youw Youw force-pushed the hidraw-usage-parse branch from 0b59f25 to 5d4cd2d Compare July 29, 2023 17:27
@Youw
Copy link
Member Author

Youw commented Jul 29, 2023

I'll keep a support of that to #454 for now.

It was easier than I thought.

Copy link
Contributor

@haata haata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Looks good!

@Youw Youw merged commit 8a4de63 into master Aug 26, 2023
@Youw Youw deleted the hidraw-usage-parse branch August 26, 2023 08:02
@Youw
Copy link
Member Author

Youw commented Aug 26, 2023

If any issues - will fix those later in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hidraw Related to Linux/hidraw backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

32bit Usage items are not supported by get_usage of libusb backend hid_enumerate with hidraw backend returns lots of duplicate hid_device_infos
4 participants