Closed jonathan-longe closed 2 years ago
Found the issue. Posting the resolution in case this helps someone else.
Replaced the following udev
rule:
KERNEL=="hiddev*", ATTRS{idVendor}=="0801", ATTRS{idProduct}=="0002", MODE="0666"
With:
KERNEL=="hidraw*" ATTRS{idVendor}=="0801", ATTRS{idProduct}=="0002", MODE="0444"
FYI I'm updating web.dev/hid/ with your findings. Thank you @jonathan-longe! See https://github.com/GoogleChrome/web.dev/pull/7141
Thanks for creating this great API! I'm trying to connect a mag stripe scanner and I'm getting a "NotAllowedError" when calling open() using Chrome (Version 97.0) from Pop!_OS 20.04 LTS.
Here's the steps I'm following from the Chrome console:
let device = await navigator.hid.requestDevice({filters:[{ vendorId: 0x0801, productId: 0x0002}]});
console.log(device[0])
device[0].open()
I tried creating a
udev
rule for the scanner by creating a file with the following line:KERNEL=="hiddev*", ATTRS{idVendor}=="0801", ATTRS{idProduct}=="0002", MODE="0666"
Then running:
$ sudo udevadm control --reload-rules
but that didn't seem to make a difference.I know the hardware works because the same set of commands from Windows using Edge Version 97.0 can successfully read a bar code.
Apologies, I'm a newbie at WebHID.