This is an experimental technologyCheck 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- A
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
andUSBDevice.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
andUSBDevice.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
andUSBDevice.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
andUSBDevice.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
andUSBDevice.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
andUSBDevice.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 aUSBTransferInResult
when a command or status operation has been transmitted to the USB device. USBDevice.controlTransferOut()
- Returns a
Promise
that resolves with aUSBTransferOutResult
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 aUSBIsochronousInTransferResult
when time sensitive information has been transmitted to the USB device. USBDevice.isochronousTransferOut()
- Returns a
Promise
that resolves with aUSBIsochronousOutTransferResult
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 aUSBTransferInResult
when bulk or interrupt data is received from the USB device. USBDevice.transferOut()
- Returns a
Promise
that resolves with aUSBTransferOutResult
when bulk or interrupt data is sent to the USB device.
Specifications
Specification | Status | Comment |
WebUSBThe definition of 'USBDevice' in that specification. | Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 | |
Chrome
Full support 61 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 48 |
Safari
No support No |
WebView Android
No support No |
Chrome Android
Full support 61 |
Firefox Android
No support No |
Opera Android
Full support 45 |
Safari iOS
No support No |
Samsung Internet Android
Full support 8.0 |
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.
USBDevice by Mozilla Contributors is licensed under CC-BY-SA 2.5.