Skip to content

Access to hidraw nodes  #611

Open
Open

Description

Image for: Description

HID is often used as a general purpose protocol, beyond what Human Interface Device might suggest. In USB and bluetooth peripherals, for example, HID is often used to configure sensitivity, macro keys, lighting and other options. The software that is used to tweak these options is often found in user space.

As is described by the widely used hidapi library, there are two options when accessing HID devices on Linux:

  1. Using a general-purpose USB library (in this case libusb) to open a USB node and writing directly to that node
  2. Opening a hidraw node and writing to that. Hidraw nodes are created by the kernel and include bluetooth HID devices in addition to USB HID devices. It also promises to incorporate more interfaces if they incorporate these HID specification.

For applications where HID devices with different hardware interfaces might be used, a hidraw backend makes more sense and offers a simpler implementation. Additionally, the access scope to the device is more limited from the perspective of a sandbox, as the program can't access other aspects of the device that aren't HID interfaces.

It would be nice to have, complementary to a general purpose USB portal (discussed in #559), a portal to access hidraw nodes. This issue is meant as a discussion as to how hidraw would fit into the various interfaces that are being designed, such as the aforementioned portal or the wayland protocol inputfd. Sadly, I don't have the time nor the skills to implement this portal, but I think it might be interesting to some of the developers here.

Metadata

Image for: Metadata

Metadata

Image for: Metadata

Assignees

No one assigned

    Labels

    new portalsThis requires creating a new portal interface

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Image for: Issue actions