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/hidraw0
crw-rw---- 1 root plugdev 241, 1 Apr 24 04:40 /dev/hidraw1
I’ve also validated that I am in the plugdev group.
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_DENIED
HIDEvent[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?