Skip to content
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 Hotplug: connection-callback implementation for MacOS #653

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

k1-801
Copy link

@k1-801 k1-801 commented Dec 2, 2023

This is a MOCK-UP of a finalized but untested hotplug implementation for Mac OS. It has the entire structure already set up (callback list management, device cache, mutex - everything copied straight from Linux version), but may still have some issues with RunLoop and event processing, which I will not be able to resolve myself because of a total lack of any meaningful documentation.

@k1-801 k1-801 mentioned this pull request Dec 2, 2023
@mcuee mcuee added enhancement New feature or request macOS Related to macOS backend labels Dec 5, 2023
@mcuee
Copy link
Member

mcuee commented Dec 5, 2023

github action builds failed for macOS (automake and cmake)

@k1-801
Copy link
Author

k1-801 commented Dec 5, 2023

github action builds failed for macOS (automake and cmake)

I managed to set up a build environment two days ago and it showed me parts that I had not considered, currently trying to understand their API.

Welp, this was just a mock-up, after all :)

@Youw Youw marked this pull request as draft December 14, 2023 11:01
@Youw
Copy link
Member

Youw commented Dec 14, 2023

it showed me parts that I had not considered

convertin into draft for now

@k1-801
Copy link
Author

k1-801 commented Mar 5, 2024

Found an example implementation that should aid in finishing this code
https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/ios/iosdevice.cpp?h=master

@mcuee
Copy link
Member

mcuee commented Mar 6, 2024

libusb macOS supports hotplug. Maybe that can be a reference as well.
https://github.com/libusb/libusb/blob/master/libusb/os/darwin_usb.c

@k1-801
Copy link
Author

k1-801 commented Mar 6, 2024

It took me a while to understand that the approach I took was in a completely wrong direction (thanks, bad documentation!), and the example I linked - as well as the example in libusb - are not suitable for hidapi. The reason is that hidapi relies on IOHIDDeviceRef's to get info on usage pages - and we can't get said info from io_object_t that we get from the callbacks in all of those examples.

The right approach would be to:

  1. Keep a IOHIDManager in the hotplug context object
  2. use IOHIDManagerRegisterDeviceMatchingCallback and IOHIDManagerRegisterDeviceRemovalCallback to track events

I will, of course, try to make a fresh mock-up within the next few days. I do have a functional build environment now, so I will be able to check if it builds - but I will not be able to check if it reacts to the events as expected.

UPD: it would have been nice if we at least had any kind of documentation regarding the state of structures provided by macos in the disconnect callback :(
It's like navigating through fog

@k1-801 k1-801 marked this pull request as ready for review March 7, 2024 21:48
@k1-801 k1-801 changed the title Draft: Hotplug implementation for MacOS (Majorly WIP) RFC: Hotplug implementation for MacOS Mar 7, 2024
@k1-801
Copy link
Author

k1-801 commented Mar 7, 2024

It took a while, but the implementation is finished and ready for a review.
This is my first time ever writing code for MacOS, so it might contain non-optimal solutions or straight up incorrect understanding of the API - the official documentation turned out to be garbage and the code had to be written half-intuitively.

It might require some adjustment regarding the RunLoop for the hotplug event processing (I couldn't find any reliable information to ensure it would work as expected with the current state of the implementation).

@k1-801
Copy link
Author

k1-801 commented Mar 7, 2024

Checked the failed build, there were warnings treated as errors. Fixed them.

@k1-801 k1-801 marked this pull request as draft March 8, 2024 20:21
@k1-801
Copy link
Author

k1-801 commented Mar 8, 2024

Ran some simple tests in a VM, all the initialization seems to work, but the events are not fired. Currently investigating how to fix runloops, should be done with that tomorrow. Converting to draft until I'm done with it.

@mcuee
Copy link
Member

mcuee commented Mar 9, 2024

@Youw
Windows-cmake github action failed but it is not related to this PR. Strange.

RefreshEnv.cmd does not work when run from this process. If you're in PowerShell, please 'Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1' and try again.
Error: Process completed with exit code 1.

@mcuee
Copy link
Member

mcuee commented Mar 9, 2024

Ran some simple tests in a VM, all the initialization seems to work, but the events are not fired. Currently investigating how to fix runloops, should be done with that tomorrow. Converting to draft until I'm done with it.

Great.

I see the same thing under my Mac Mini M1 2020 (latest macOS 14.3.1) -- no events fired. So it is good your VM behaves the same.

@k1-801
Copy link
Author

k1-801 commented Mar 9, 2024

I just rebased this branch onto the fresh master and squashed all the commits so as not to clog the history. This should fix the issue with Windows CI failing and also make it easier to merge when it's all finished. It might be a good idea to rebase the connection-callback branch itself.

I added some code for the background event thread, going to test that before doing anything else with the PR.

@k1-801
Copy link
Author

k1-801 commented Mar 9, 2024

@mcuee Ran tests on the new fixed implementation.
It successfully receives the connection events and processes them (seemingly) as expected.
The internal callback for disconnection events is also called, but so far it is unable to match the disconnected device with the cached ones, it is unable to generate a path for the disconnected device, need to find another way to match them.

IORegistryEntryGetRegistryEntryID returns 268435459, which isn't even a valid return code for a kern_return_t.
I will try to somehow store io_service_t values with the hid_device_info in the cache, they seem to work.

So far, it's all good news.

@k1-801
Copy link
Author

k1-801 commented Mar 9, 2024

It worked. I'm gonna need confirmation that this is an allowed method to store io_service_t (I made the create_device_info_with_usage always allocate an "extended" structure), but it all works perfectly. If it's not the right solution to store additional data, I'm gonna need advice on what is the preferred method.

hidtest output AFTER enumeration
Handle 1: New device is connected: DevSrvsID:4294967949.
type: 80ee 0021
  serial_number: 
  Manufacturer: VirtualBox
  Product:      USB Tablet
  Release:      100
  Interface:    0
  Usage (page): 0x2 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294967949.
type: 80ee 0021
  serial_number: 
  Manufacturer: VirtualBox
  Product:      USB Tablet
  Release:      100
  Interface:    0
  Usage (page): 0x1 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294967970.
type: 80ee 0010
  serial_number: 
  Manufacturer: VirtualBox
  Product:      USB Keyboard
  Release:      100
  Interface:    0
  Usage (page): 0x6 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969223.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x2 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969223.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x1 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969229.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xc)
​
Handle 1: New device is connected: DevSrvsID:4294969229.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xffa0)
​
Handle 1: New device is connected: DevSrvsID:4294969225.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    1
  Usage (page): 0x6 (0x1)
​
Handle 1: Device was disconnected: DevSrvsID:4294969229.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xc)
​
Handle 1: Device was disconnected: DevSrvsID:4294969229.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xffa0)
​
Handle 1: Device was disconnected: DevSrvsID:4294969225.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    1
  Usage (page): 0x6 (0x1)
​
Handle 1: Device was disconnected: DevSrvsID:4294969223.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x2 (0x1)
​
Handle 1: Device was disconnected: DevSrvsID:4294969223.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x1 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969287.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x2 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969287.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x1 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969289.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    1
  Usage (page): 0x6 (0x1)
​
Handle 1: New device is connected: DevSrvsID:4294969293.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xc)
​
Handle 1: New device is connected: DevSrvsID:4294969293.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xffa0)
​
Handle 1: Device was disconnected: DevSrvsID:4294969293.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xc)
​
Handle 1: Device was disconnected: DevSrvsID:4294969293.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    2
  Usage (page): 0x1 (0xffa0)
​
Handle 1: Device was disconnected: DevSrvsID:4294969289.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    1
  Usage (page): 0x6 (0x1)
​
Handle 1: Device was disconnected: DevSrvsID:4294969287.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x2 (0x1)
​
Handle 1: Device was disconnected: DevSrvsID:4294969287.
type: 04d9 fc38
  serial_number: 
  Manufacturer: 
  Product:      USB Gaming Mouse
  Release:      110
  Interface:    0
  Usage (page): 0x1 (0x1)

@k1-801 k1-801 marked this pull request as ready for review March 9, 2024 08:29
@k1-801
Copy link
Author

k1-801 commented Mar 10, 2024

@mcuee may I ask to re-test on a real Mac with the latest changes?
I believe the code to be ready for that now

@mcuee
Copy link
Member

mcuee commented Mar 11, 2024

@k1-801

It seems to work fine under my Mac Mini M1 2020 (macOS 14.3.1).

  1. Plug out and plug back in Logitech USB Receiver (USB Composite Device)
  2. Plug in and plug out USBAsp programmer (USB Composite Device)
  3. Plug in and plug out Plantronics USB headset.
mcuee@mcuees-Mac-mini hidapi_hotplug_mac % ./hidtest/hidtest
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: 1915 1025
  path: DevSrvsID:4294971599
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (131 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x03, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x05, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x03, 
0x81, 0x06, 0xc0, 0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 
0x85, 0x01, 0x75, 0x10, 0x95, 0x01, 0x15, 0x00, 0x26, 0xff, 
0x03, 0x19, 0x00, 0x2a, 0xff, 0x03, 0x81, 0x00, 0xc0, 0x05, 
0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x02, 0x75, 0x01, 0x95, 
0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x81, 0x09, 0x82, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x0e, 0x81, 0x03, 0xc0, 0x06, 0x00, 
0xff, 0x09, 0x00, 0xa1, 0x01, 0x85, 0x06, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x75, 0x08, 0x95, 0x1f, 0x09, 0x00, 0xb1, 0x02, 
0xc0, 
Device Found
  type: 1915 1025
  path: DevSrvsID:4294971599
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x1 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (131 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x03, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x05, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x03, 
0x81, 0x06, 0xc0, 0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 
0x85, 0x01, 0x75, 0x10, 0x95, 0x01, 0x15, 0x00, 0x26, 0xff, 
0x03, 0x19, 0x00, 0x2a, 0xff, 0x03, 0x81, 0x00, 0xc0, 0x05, 
0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x02, 0x75, 0x01, 0x95, 
0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x81, 0x09, 0x82, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x0e, 0x81, 0x03, 0xc0, 0x06, 0x00, 
0xff, 0x09, 0x00, 0xa1, 0x01, 0x85, 0x06, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x75, 0x08, 0x95, 0x1f, 0x09, 0x00, 0xb1, 0x02, 
0xc0, 
Device Found
  type: 1915 1025
  path: DevSrvsID:4294971599
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x1 (0xc)
  Bus type: 1 (USB)

  Report Descriptor: (131 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x03, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x05, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x03, 
0x81, 0x06, 0xc0, 0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 
0x85, 0x01, 0x75, 0x10, 0x95, 0x01, 0x15, 0x00, 0x26, 0xff, 
0x03, 0x19, 0x00, 0x2a, 0xff, 0x03, 0x81, 0x00, 0xc0, 0x05, 
0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x02, 0x75, 0x01, 0x95, 
0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x81, 0x09, 0x82, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x0e, 0x81, 0x03, 0xc0, 0x06, 0x00, 
0xff, 0x09, 0x00, 0xa1, 0x01, 0x85, 0x06, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x75, 0x08, 0x95, 0x1f, 0x09, 0x00, 0xb1, 0x02, 
0xc0, 
Device Found
  type: 1915 1025
  path: DevSrvsID:4294971599
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x80 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (131 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x03, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x05, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x03, 
0x81, 0x06, 0xc0, 0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 
0x85, 0x01, 0x75, 0x10, 0x95, 0x01, 0x15, 0x00, 0x26, 0xff, 
0x03, 0x19, 0x00, 0x2a, 0xff, 0x03, 0x81, 0x00, 0xc0, 0x05, 
0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x02, 0x75, 0x01, 0x95, 
0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x81, 0x09, 0x82, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x0e, 0x81, 0x03, 0xc0, 0x06, 0x00, 
0xff, 0x09, 0x00, 0xa1, 0x01, 0x85, 0x06, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x75, 0x08, 0x95, 0x1f, 0x09, 0x00, 0xb1, 0x02, 
0xc0, 
Device Found
  type: 1915 1025
  path: DevSrvsID:4294971599
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x0 (0xff00)
  Bus type: 1 (USB)

  Report Descriptor: (131 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x04, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x03, 0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 
0x75, 0x05, 0x81, 0x03, 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 
0x09, 0x38, 0x15, 0x81, 0x25, 0x7f, 0x75, 0x08, 0x95, 0x03, 
0x81, 0x06, 0xc0, 0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 
0x85, 0x01, 0x75, 0x10, 0x95, 0x01, 0x15, 0x00, 0x26, 0xff, 
0x03, 0x19, 0x00, 0x2a, 0xff, 0x03, 0x81, 0x00, 0xc0, 0x05, 
0x01, 0x09, 0x80, 0xa1, 0x01, 0x85, 0x02, 0x75, 0x01, 0x95, 
0x02, 0x15, 0x00, 0x25, 0x01, 0x09, 0x81, 0x09, 0x82, 0x81, 
0x02, 0x75, 0x01, 0x95, 0x0e, 0x81, 0x03, 0xc0, 0x06, 0x00, 
0xff, 0x09, 0x00, 0xa1, 0x01, 0x85, 0x06, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x75, 0x08, 0x95, 0x1f, 0x09, 0x00, 0xb1, 0x02, 
0xc0, 
Device Found
  type: 1915 1025
  path: DevSrvsID:4294971593
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    2
  Usage (page): 0x6 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (65 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x05, 0x07, 0x19, 0xe0, 
0x29, 0xe7, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x08, 
0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x01, 0x95, 0x03, 
0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x03, 0x91, 0x02, 
0x95, 0x05, 0x75, 0x01, 0x91, 0x01, 0x95, 0x06, 0x75, 0x08, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 0x00, 0x2a, 
0xff, 0x00, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970412
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970412
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970412
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x80 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970412
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970412
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x2 (0xff00)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294970082
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294970082
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294970082
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294970082
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 0000 0000
  path: DevSrvsID:4294969336
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)
  Bus type: 0 (Unknown)

  Report Descriptor: (20 bytes)
0x06, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xa1, 0x01, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 0xc0, 
Device Found
  type: 0000 0000
  path: DevSrvsID:4294969082
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)
  Bus type: 0 (Unknown)

  Report Descriptor: (50 bytes)
0x06, 0x00, 0xff, 0x0a, 0x48, 0x00, 0xa1, 0x01, 0x06, 0x29, 
0xff, 0x85, 0x01, 0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x09, 
0x01, 0xb1, 0x02, 0x09, 0x02, 0xb1, 0x02, 0x09, 0x25, 0xa1, 
0x03, 0x85, 0x02, 0x24, 0x76, 0x98, 0x3e, 0x09, 0x03, 0x81, 
0x22, 0x09, 0x04, 0x76, 0x18, 0x04, 0xb1, 0x02, 0xc0, 0xc0, 
Device Found
  type: 0000 0000
  path: DevSrvsID:4294968826
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 0 (Unknown)

  Report Descriptor: (29 bytes)
0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x05, 0x0c, 0x09, 0xcd, 
0x09, 0xea, 0x09, 0xe9, 0x15, 0x00, 0x25, 0x01, 0x95, 0x03, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x05, 0x81, 0x05, 0xc0, 
Handle 1: New device is connected: DevSrvsID:4294971599.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971599.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971599.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971599.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971599.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    3
  Usage (page): 0x0 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971593.
type: 1915 1025
  serial_number: 
  Manufacturer: ZY.Ltd
  Product:      ZY Control Mic
  Release:      173
  Interface:    2
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970412.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970412.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294970412.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970412.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294970412.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

Handle 1: New device is connected: DevSrvsID:4294969336.
type: 0000 0000
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)

Handle 1: New device is connected: DevSrvsID:4294969082.
type: 0000 0000
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294968826.
type: 0000 0000
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971679.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: New device is connected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971712.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971712.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971712.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971712.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971685.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: Device was disconnected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971683.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: Device was disconnected: DevSrvsID:4294971679.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971744.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971751.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971751.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971751.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971751.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971751.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: New device is connected: DevSrvsID:4294971748.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971748.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971748.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971777.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971777.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971812.
type: 16c0 05dc
  serial_number: 0001
  Manufacturer: www.fischl.de
  Product:      USBasp
  Release:      110
  Interface:    1
  Usage (page): 0x1 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971812.
type: 16c0 05dc
  serial_number: 0001
  Manufacturer: www.fischl.de
  Product:      USBasp
  Release:      110
  Interface:    1
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x5 (0xb)

Handle 1: New device is connected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x3 (0xffa0)

Handle 1: Device was disconnected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x1 (0xc)

Handle 1: Device was disconnected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x5 (0xb)

Handle 1: Device was disconnected: DevSrvsID:4294971856.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x3 (0xffa0)

^C

@mcuee
Copy link
Member

mcuee commented Mar 11, 2024

Testing with Microsoft Bluetooth Mouse is also good.
Remove battery to simulate unplug and then put back battery to simulate plug back in.

Handle 1: Device was disconnected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294970082.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

Handle 1: New device is connected: DevSrvsID:4294972025.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972025.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972025.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972025.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

@k1-801
Copy link
Author

k1-801 commented Mar 11, 2024

It seems to work fine under my Mac Mini M1 2020

Amazing! Thank you!

Now it just needs to pass the codestyle review, I guess

@mcuee
Copy link
Member

mcuee commented Mar 11, 2024

Now it just needs to pass the codestyle review, I guess

I am more on the testing side. @Youw is the current active developer and he will be reviewing the PRs.

@k1-801
Copy link
Author

k1-801 commented Mar 11, 2024

@Youw I apologize for the PR being a bit messy. The target branch needs a rebase onto the fresh master. I had to do it for this branch to avoid other issues, so the diff includes all the commits that didn't yet make their way into connection-callback. Once that happens, I will rebase this branch onto connection-callback and the diff will clear up.

@Youw
Copy link
Member

Youw commented Mar 11, 2024

The target branch needs a rebase onto the fresh master.

That I can do (if no conflicts)

@k1-801
Copy link
Author

k1-801 commented Mar 11, 2024

(if no conflicts)

I'm afraid there are a few, but they aren't that bad

@Youw
Copy link
Member

Youw commented Mar 11, 2024

I'm afraid there are a few, but they aren't that bad

it looked trivial, I believe I didn't break anything but need to check

@k1-801
Copy link
Author

k1-801 commented Mar 11, 2024

it looked trivial, I believe I didn't break anything but need to check

All done on my side as well 👍

@mcuee
Copy link
Member

mcuee commented Mar 12, 2024

No issue with latest commit.

  1. Plug out and plug back in Logitech USB Receiver
  2. Plug in and plug out Plantronics USB headset
  3. Microsoft Bluetooth Mouse: remove battery to simulate unplug and then put back battery to simulate plug back in.
mcuee@mcuees-Mac-mini hidapi_hotplug_mac % ./hidtest/hidtest
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: 0000 0000
  path: DevSrvsID:4294969137
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)
  Bus type: 0 (Unknown)

  Report Descriptor: (50 bytes)
0x06, 0x00, 0xff, 0x0a, 0x48, 0x00, 0xa1, 0x01, 0x06, 0x29, 
0xff, 0x85, 0x01, 0x25, 0x7f, 0x95, 0x01, 0x75, 0x08, 0x09, 
0x01, 0xb1, 0x02, 0x09, 0x02, 0xb1, 0x02, 0x09, 0x25, 0xa1, 
0x03, 0x85, 0x02, 0x24, 0x76, 0x98, 0x3e, 0x09, 0x03, 0x81, 
0x22, 0x09, 0x04, 0x76, 0x18, 0x04, 0xb1, 0x02, 0xc0, 0xc0, 
Device Found
  type: 0000 0000
  path: DevSrvsID:4294968515
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 0 (Unknown)

  Report Descriptor: (29 bytes)
0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x05, 0x0c, 0x09, 0xcd, 
0x09, 0xea, 0x09, 0xe9, 0x15, 0x00, 0x25, 0x01, 0x95, 0x03, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x05, 0x81, 0x05, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971882
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (59 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x05, 0x07, 0x19, 0xe0, 
0x29, 0xe7, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x08, 
0x81, 0x02, 0x81, 0x03, 0x95, 0x05, 0x05, 0x08, 0x19, 0x01, 
0x29, 0x05, 0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x01, 
0x95, 0x06, 0x75, 0x08, 0x15, 0x00, 0x26, 0xa4, 0x00, 0x05, 
0x07, 0x19, 0x00, 0x2a, 0xa4, 0x00, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971877
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971877
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971877
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)
  Bus type: 1 (USB)

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971877
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971877
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)
  Bus type: 1 (USB)

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294971473
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294971473
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294971473
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 045e 082f
  path: DevSrvsID:4294971473
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (185 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x05, 0x01, 0x09, 0x02, 
0xa1, 0x02, 0x85, 0x01, 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 
0x19, 0x01, 0x29, 0x05, 0x15, 0x00, 0x25, 0x01, 0x95, 0x05, 
0x75, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x01, 
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x75, 0x10, 
0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 0xa1, 0x02, 
0x85, 0x01, 0x09, 0x38, 0x35, 0x00, 0x45, 0x00, 0x95, 0x01, 
0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 0x7f, 0x81, 0x06, 
0x85, 0x01, 0x05, 0x0c, 0x0a, 0x38, 0x02, 0x35, 0x00, 0x45, 
0x00, 0x95, 0x01, 0x75, 0x10, 0x16, 0x01, 0x80, 0x26, 0xff, 
0x7f, 0x81, 0x06, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x01, 0x09, 
0x06, 0xa1, 0x01, 0x85, 0x02, 0x05, 0x07, 0x15, 0x00, 0x25, 
0x01, 0x1a, 0xe0, 0x00, 0x2a, 0xe7, 0x00, 0x75, 0x01, 0x95, 
0x08, 0x81, 0x02, 0x05, 0x07, 0x19, 0x00, 0x2a, 0x91, 0x00, 
0x16, 0x00, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x0a, 
0x81, 0x00, 0xc0, 0x06, 0x07, 0xff, 0x0a, 0x12, 0x02, 0xa1, 
0x01, 0x85, 0x24, 0x09, 0x01, 0x75, 0x08, 0x95, 0x13, 0x15, 
0x00, 0x26, 0xff, 0x00, 0xb1, 0x02, 0x85, 0x27, 0x95, 0x13, 
0x09, 0x02, 0x81, 0x02, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970335
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x6 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970335
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xc)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970335
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x80 (0x1)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970335
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xff00)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d b33d
  path: DevSrvsID:4294970335
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x2 (0xff00)
  Bus type: 2 (Bluetooth)

  Report Descriptor: (270 bytes)
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x85, 0x01, 0x75, 0x01, 
0x95, 0x08, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15, 0x00, 
0x25, 0x01, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08, 0x81, 0x03, 
0x95, 0x05, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x05, 
0x91, 0x02, 0x95, 0x01, 0x75, 0x03, 0x91, 0x03, 0x95, 0x06, 
0x75, 0x08, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 
0x00, 0x29, 0xff, 0x81, 0x00, 0xc0, 0x05, 0x0c, 0x09, 0x01, 
0xa1, 0x01, 0x85, 0x02, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 
0x95, 0x0d, 0x0a, 0x24, 0x02, 0x09, 0x40, 0x0a, 0x23, 0x02, 
0x0a, 0xae, 0x01, 0x0a, 0x21, 0x02, 0x09, 0xb6, 0x09, 0xcd, 
0x09, 0xb5, 0x09, 0xe2, 0x09, 0xea, 0x09, 0xe9, 0x09, 0x30, 
0x09, 0x40, 0x81, 0x02, 0x95, 0x01, 0x75, 0x03, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x05, 
0x01, 0x09, 0x06, 0xa1, 0x02, 0x05, 0x06, 0x09, 0x20, 0x15, 
0x00, 0x26, 0x14, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 
0x06, 0xbc, 0xff, 0x0a, 0xad, 0xbd, 0x75, 0x08, 0x95, 0x06, 
0x81, 0x02, 0xc0, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 
0x09, 0x82, 0x81, 0x02, 0x95, 0x01, 0x75, 0x07, 0x81, 0x03, 
0xc0, 0x05, 0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0xff, 0x05, 
0x06, 0x95, 0x01, 0x75, 0x02, 0x19, 0x24, 0x29, 0x26, 0x81, 
0x02, 0x75, 0x06, 0x81, 0x01, 0xc0, 0x06, 0x00, 0xff, 0x09, 
0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 0x08, 0x95, 0x06, 0x15, 
0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 0x81, 0x00, 0x09, 0x01, 
0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x02, 0xa1, 0x01, 
0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 0x15, 0x00, 0x26, 0xff, 
0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 0x02, 0x91, 0x00, 0xc0, 
Device Found
  type: 0000 0000
  path: DevSrvsID:4294969380
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)
  Bus type: 0 (Unknown)

  Report Descriptor: (20 bytes)
0x06, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xa1, 0x01, 0x15, 0x00, 
0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 0xc0, 
Device Found
  type: 046d 1000
  path: DevSrvsID:4294971938
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (69 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 046d 1000
  path: DevSrvsID:4294971938
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)
  Bus type: 1 (USB)

  Report Descriptor: (69 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971879
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)
  Bus type: 1 (USB)

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971879
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)
  Bus type: 1 (USB)

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294971879
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)
  Bus type: 1 (USB)

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Handle 1: New device is connected: DevSrvsID:4294969380.
type: 0000 0000
  serial_number: 
  Manufacturer: Apple
  Product:      
  Release:      0
  Interface:    -1
  Usage (page): 0xff (0xff00)

Handle 1: New device is connected: DevSrvsID:4294969137.
type: 0000 0000
  serial_number: 
  Manufacturer: APPL
  Product:      BTM
  Release:      0
  Interface:    -1
  Usage (page): 0x48 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294968515.
type: 0000 0000
  serial_number: 
  Manufacturer: Apple
  Product:      Headset
  Release:      0
  Interface:    -1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971938.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971938.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

Handle 1: New device is connected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: New device is connected: DevSrvsID:4294970335.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970335.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294970335.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294970335.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294970335.
type: 046d b33d
  serial_number: F4:73:35:4B:C5:AA
  Manufacturer: 
  Product:      Keyboard K480
  Release:      2803
  Interface:    -1
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294971882.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971938.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971938.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971879.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: Device was disconnected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: Device was disconnected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971877.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: Device was disconnected: DevSrvsID:4294971882.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972061.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    0
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972069.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972069.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972069.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294972069.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972069.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)

Handle 1: New device is connected: DevSrvsID:4294972066.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294972066.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294972066.
type: 046d c52b
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)

Handle 1: New device is connected: DevSrvsID:4294972095.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972095.
type: 046d 1000
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x1 (0xc)

Handle 1: New device is connected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x5 (0xb)

Handle 1: New device is connected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x3 (0xffa0)

Handle 1: Device was disconnected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x1 (0xc)

Handle 1: Device was disconnected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x5 (0xb)

Handle 1: Device was disconnected: DevSrvsID:4294972130.
type: 047f c056
  serial_number: D1CEC32927974D5F9BD6B2AEBF2EA8E3
  Manufacturer: Plantronics
  Product:      Plantronics Blackwire 3220 Series
  Release:      210
  Interface:    3
  Usage (page): 0x3 (0xffa0)

Handle 1: Device was disconnected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: Device was disconnected: DevSrvsID:4294971473.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

Handle 1: New device is connected: DevSrvsID:4294972175.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x2 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972175.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x1 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972175.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x6 (0x1)

Handle 1: New device is connected: DevSrvsID:4294972175.
type: 045e 082f
  serial_number: 734762612322
  Manufacturer: Microsoft
  Product:      Microsoft Bluetooth Mouse
  Release:      212
  Interface:    -1
  Usage (page): 0x212 (0xff07)

^C

@k1-801 k1-801 changed the title RFC: Hotplug implementation for MacOS [Awaiting review] MacOS Hotplug: connection-callback implementation for MacOS Mar 13, 2024
@k1-801 k1-801 changed the title [Awaiting review] MacOS Hotplug: connection-callback implementation for MacOS MacOS Hotplug: connection-callback implementation for MacOS Mar 13, 2024
hidtest/test.c Outdated
// return 1;

return 0;
if (event & HID_API_HOTPLUG_EVENT_DEVICE_ARRIVED)
Copy link
Member

@Youw Youw Apr 6, 2024

Choose a reason for hiding this comment

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

thanks
maybe a separate PR with the fix into master?
if will definitely get there faster as a separate change, than the feature branch

Copy link
Author

Choose a reason for hiding this comment

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

No need - it was done the same way in the Windows Mutex PR (was asked to fix indentation and also had troubles with no fflush()), so this change no longer even pops up in the diff

Copy link
Member

Choose a reason for hiding this comment

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

oh, I only meant replacing spaces with tabs inside of this function

everything else, obviously, is feature/branch-specific

Copy link
Member

@Youw Youw left a comment

Choose a reason for hiding this comment

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

Same deal as with #645 - getting it merged into a feature branch now.

@Youw Youw merged commit 4f73d1f into libusb:connection-callback Apr 6, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macOS Related to macOS backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants