Skip to content

Physical device ID for Linux/hidraw #417

Closed

Description

@JoergAtGithub

With hid_darwin_get_location_id (#378) and hid_winapi_get_container_id(#379) we have physical device identifiers for Windows and MacOS, but not for Linux.
The Chromium HID implementation uses the same identifiers for Windows and MacOS, but has also an implementation for hidraw. They use the sysfs path of the device node that represents the physical device as physical identifier. They implemented a recursive search to gather this information:
https://chromium.googlesource.com/chromium/src/+/refs/changes/62/3314562/3/services/device/hid/hid_service_linux.cc#138

Activity

  1. added
    enhancementNew feature or request
    hidrawRelated to Linux/hidraw backend
    libusbRelated to libusb backend
    on May 18, 2022
  2. Youw commented on May 18, 2022

    @Youw
    Member
    • hidraw:
      once we have hid_get_path I believe it is enough to identify the physysical device, since paths like /dev/hidraw* are easily mapped to /sys/class/hidraw/hidraw*; that information should be more than enough for the application to get what it needs;
    • libusb:
      having hid_get_path we may say the very similar thing, as the path we generate (libusb backend: stabilize device path, superseeds: #117 #291) is the same as in /sys/bus/usb/devices/
  3. Youw commented on Aug 21, 2022

    @Youw
    Member

    Resolved by #432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthidrawRelated to Linux/hidraw backendlibusbRelated to libusb backend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions