USBDevice

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The USBDevice interface of the the WebUSB API provides access to metadata about a paired USB device and methods for controlling it.

Properties

USBDevice.configuration Read only
USBConfiguration object for the currently selected interface for a paired USB device.
USBDevice.configurations Read only
An array of device-specific interfaces for controlling a paired USB device.
USBDevice.deviceClass Read only
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceSubclass and USBDevice.deviceprotocol.
USBDevice.deviceProtocol Read only
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceClass and USBDevice.deviceSubclass.
USBDevice.deviceSubclass Read only
One of three properties that identify USB devices for the purpose of loading a USB driver that will work with that device. The other two properties are USBDevice.deviceClass and USBDevice.deviceProtocol.
USBDevice.deviceVersionMajor Read only
The major version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionMinor Read only
The minor version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionSubminor Read only
The patch version number of the device in a semantic versioning scheme.
USBDevice.manufacturerName Read only
The of the organization that manufactured the USB device.
USBDevice.opened Read only
Indicates whether a session has been started with a paired USB device.
USBDevice.productId Read only
The manufacturer-defined code that identifies a USB device.
USBDevice.productName Read only
The manufacturer-defined name that identifies a USB device.
USBDevice.serialNumber Read only
The manufacturer-defined serial number for the specific USB device.
USBDevice.usbVersionMajor Read only
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMinor and USBDevice.usbVersionSubminor.
USBDevice.usbVersionMinor Read only
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMajor and USBDevice.usbVersionSubminor.
USBDevice.usbVersionSubminor Read only
One of three properties that declare the USB protocol version supported by the device. The other two properties are USBDevice.usbVersionMajor and USBDevice.usbVersionMinor.
USBDevice.vendorId Read only
The official usg.org-assigned vendor ID.

Methods

USBDevice.claimInterface()
Returns a promise that resolves when the requested interface is claimed for exclusive access.
USBDevice.clearHalt()
Returns a promise that resolves when a halt condition is cleared.
USBDevice.controlTransferIn()
Returns a promise that resolves with a USBTransferInResult when a command or status operation has been transmitted to the USB device.
USBDevice.controlTransferOut()
Returns a promise that resolves with a USBTransferOutResult when a command or status operation has been transmitted from the USB device.
USBDevice.close()
Returns a promise that resolves when all open interfaces are released and the device session has ended.
USBDevice.isochronousTransferIn()
Returns a promise that resolves with a USBIsochronousInTransferResult when time sensitive information has been transmitted to the USB device.
USBDevice.isochronousTransferOut()
Returns a promise that resolves with a USBIsochronousOutTransferResult when time sensitive information has been transmitted from the USB device.
USBDevice.open()
Returns a promise that resolves when a device session has started.
USBDevice.releaseInterface()
Returns a promise that resolves when a cliamed interface is released from exclusive access.
USBDevice.reset()
Returns a promise that resolves when the device is reset and all app operations canceled and their promises rejected.
USBDevice.selectAlternateInterface()
Returns a promise that resolves when the specified alternative endpoint is selected.
USBDevice.selectConfiguration()
Returns a promise that resolves when the specified configuration is selected.
USBDevice.transferIn()
Returns a promise that resolves with a USBTransferInResult when bulk or interrupt data is transmitted to the USB device.
USBDevice.transferOut()
Returns a promise that resolves with a USBTransferOutResult when bulk or interrupt data is transmitted from the USB device.

Specifications

Specification Status Comment
WebUSB
The definition of 'USBDevice' in that specification.
Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
usbVersionMajor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
usbVersionMinor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
usbVersionSubminor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceClass
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceSubclass
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceProtocol
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
vendorId
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
productId
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceVersionMajor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceVersionMinor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
deviceVersionSubminor
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
manufacturerName
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
productName
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
serialNumber
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
configuration
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
configurations
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
opened
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
open
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
close
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
selectConfiguration
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
claimInterface
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
releaseInterface
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
selectAlternateInterface
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
controlTransferIn
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
controlTransferOut
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
clearHalt
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
transferIn
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
transferOut
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
isochronousTransferIn
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
isochronousTransferOut
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No
reset
Experimental
Chrome Full support 61Edge No support NoFirefox No support NoIE No support NoOpera Full support 48Safari No support NoWebView Android No support NoChrome Android Full support 61Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 48Safari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

Document Tags and Contributors

Contributors to this page: jpmedley
Last updated by: jpmedley,