Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Ubuntu Snap Chromium can't access WebHID

$
0
0

I'm using Ubuntu 23.10, and trying to use a device with WebHID. I've added all appropriate rules, i.e.

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="d035", GROUP="plugdev", MODE="0660"

to /etc/udev/rules.d/99-oledscope.rules.

And, I can see that hidraw* is correctly configured:

ls -lah /dev/hidraw*crw-rw---- 1 root plugdev 241, 0 Apr 24 04:40 /dev/hidraw0crw-rw---- 1 root plugdev 241, 1 Apr 24 04:40 /dev/hidraw1

I've also validated that I am in the plugdev group.

Here is my report descriptor:

    HID_USAGE_PAGE ( 0xff ), // Vendor-defined page.    HID_USAGE      ( 0x00 ),    HID_REPORT_SIZE ( 8 ),    HID_COLLECTION ( HID_COLLECTION_LOGICAL ),        HID_REPORT_COUNT   ( 254 ),        HID_REPORT_ID      ( 0xaa )        HID_USAGE          ( 0x01 ),        HID_FEATURE        ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,        HID_REPORT_COUNT   ( 63 ), // For use with `hidapitester --vidpid 1209/D003 --open --read-feature 171`        HID_REPORT_ID      ( 0xab )        HID_USAGE          ( 0x01 ),            HID_FEATURE        ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,    HID_COLLECTION_END,

With the above, I can use hidapi.h to access the device and send/receive appropriate reports, but when I use Chrome (124.0.6367.60 from Snap), I get the following error: Could not open; NotAllowedError: Failed to open the device.

Then, if I look in the device log at chrome://device-log/, I have a constant stream of

HIDEvent[04:40:26] Failed to open '/dev/hidraw1': FILE_ERROR_ACCESS_DENIEDHIDEvent[04:40:26] Access denied opening device read-write, trying read-only.

I don't know for sure that this is because I am using the snap package, but, either way, I can't, from Chrome access my WebHID device.

Any ideas what I could do to make sure snap packages have access to hidraw?


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>