Home > database >  WebUSB access mass storage USB serial number
WebUSB access mass storage USB serial number

Time:01-07

I am trying to access a USB mass storage device using the WebUSB interface. I have read that USB mass storage devices cannot be accessed:

  • "For example, if the device is a USB mass storage device that interface is not claimable and if there are no other interfaces the device will be hidden." (Chrome is recognizing the device

    But when asking for access to a device via WebUSB it is not shown in the list: enter image description here

    My code is pretty straight forward:

    navigator.usb.requestDevice({ filters: [] }).then(e => {console.log(e)});
    

    Is there any way to access the serial number of the USB mass storage device using a browser interface?

    CodePudding user response:

    The short answer is no.

    The internal page about:usb-internals should show you interfaces that are blocked in WebUSB. As you can see in the screenshot below, "Mass Storage" USB devices are indeed not accessible in WebUSB for security reasons.

    screenshot

  •  Tags:  
  • Related