USB device interface has been blocked

杀马特。学长 韩版系。学妹 提交于 2019-12-10 18:26:52

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/54289929/usb-device-interface-has-been-blocked

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!