Description
Use the chrome.usb API to interact with connected USB devices. This API provides access to USB operations from within the context of an app. Using this API, apps can function as drivers for hardware devices. Errors generated by this API are reported by setting runtime.lastError and executing the function's regular callback. The callback's regular parameters will be undefined in this case.
Permissions
usbAvailability
Types
ConfigDescriptor
Properties
-
active
boolean
Chrome 47+Is this the active configuration?
-
configurationValue
number
The configuration number.
-
description
string optional
Description of the configuration.
-
extra_data
ArrayBuffer
Extra descriptor data associated with this configuration.
-
interfaces
Available interfaces.
-
maxPower
number
The maximum power needed by this device in milliamps (mA).
-
remoteWakeup
boolean
The device supports remote wakeup.
-
selfPowered
boolean
The device is self-powered.
ConnectionHandle
Properties
-
handle
number
An opaque handle representing this connection to the USB device and all associated claimed interfaces and pending transfers. A new handle is created each time the device is opened. The connection handle is different from
Device.device. -
productId
number
The product ID.
-
vendorId
number
The device vendor ID.
ControlTransferInfo
Properties
-
data
ArrayBuffer optional
The data to transmit (required only by output transfers).
-
direction
The transfer direction (
"in"or"out"). -
index
number
The
wIndexfield, see Ibid. -
length