4

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.

devlife
  • 45
  • 1
  • 6

1 Answers1

3

Chrome prevents certain interfaces from being accessed for security reasons. These interfaces are the following:

  • audio
  • HID
  • mass storage
  • smart card
  • video
  • audio/video
  • wireless controller

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

  • Hi, I know that's too old but I'm facing an issue. I tried to access mass storage device and it's blocked by webusb. The weird issue is before two-three months ago I was able to access it. Any idea why? – Or Ben-Yossef Aug 11 '21 at 07:21
  • Probably a bug in the browser @OrBen-Yossef – Herz3h Dec 27 '21 at 13:44