Reputation: 45
I am trying to use USB RFID reader in our website. by using navigator.usb.getDevices() i am selecting my device.
open() and selectConfiguration(1) is working. but device.claimInterface(0); is giving me following error.
An attempt to claim a USB device interface has been blocked because it implements a protected interface class.
Upvotes: 4
Views: 2217
Reputation: 566
Chrome prevents certain interfaces from being accessed for security reasons. These interfaces are the following:
These are detailed in the following Chrome web test: https://cs.chromium.org/chromium/src/third_party/blink/web_tests/usb/protected-interface-classes.html?q=usb+protected+interface&sq=package:chromium&dr=C&l=9
There is a proposal for WebHID in progress, however: https://discourse.wicg.io/t/human-interface-device-hid-api/3070
Upvotes: 3