Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webusb

thegecko1.7kMITdeprecated2.2.0TypeScript support: included

This package is deprecated, please use the WebUSB API in the 'usb' package instead

Node.js implementation of the WebUSB Specification

web-usb, usb

readme

Node WebUSB

Node.js implementation of the WebUSB Specification

Circle CI npm Licence MIT

Prerequisites

Node.js > v8.14.0, which includes npm.

Installation

$ npm install webusb

Getting Started

See the examples in examples or view the API documentation at:

https://thegecko.github.io/webusb/

Specification

The WebUSB specification can be found here:

https://wicg.github.io/webusb/

Implementation Status

USB

  • <input checked="" disabled="" type="checkbox"> getDevices()
  • <input checked="" disabled="" type="checkbox"> requestDevice()

USBDevice

  • <input checked="" disabled="" type="checkbox"> usbVersionMajor
  • <input checked="" disabled="" type="checkbox"> usbVersionMinor
  • <input checked="" disabled="" type="checkbox"> usbVersionSubminor
  • <input checked="" disabled="" type="checkbox"> deviceClass
  • <input checked="" disabled="" type="checkbox"> deviceSubclass
  • <input checked="" disabled="" type="checkbox"> deviceProtocol
  • <input checked="" disabled="" type="checkbox"> vendorId
  • <input checked="" disabled="" type="checkbox"> productId
  • <input checked="" disabled="" type="checkbox"> deviceVersionMajor
  • <input checked="" disabled="" type="checkbox"> deviceVersionMinor
  • <input checked="" disabled="" type="checkbox"> deviceVersionSubminor
  • <input checked="" disabled="" type="checkbox"> manufacturerName
  • <input checked="" disabled="" type="checkbox"> productName
  • <input checked="" disabled="" type="checkbox"> serialNumber
  • <input checked="" disabled="" type="checkbox"> configuration
  • <input checked="" disabled="" type="checkbox"> configurations
  • <input checked="" disabled="" type="checkbox"> opened
  • <input checked="" disabled="" type="checkbox"> open()
  • <input checked="" disabled="" type="checkbox"> close()
  • <input checked="" disabled="" type="checkbox"> selectConfiguration()
  • <input checked="" disabled="" type="checkbox"> claimInterface()
  • <input checked="" disabled="" type="checkbox"> releaseInterface()
  • <input checked="" disabled="" type="checkbox"> selectAlternateInterface()
  • <input checked="" disabled="" type="checkbox"> controlTransferIn()
  • <input checked="" disabled="" type="checkbox"> controlTransferOut() - bytesWritten always equals the initial buffer length
  • <input checked="" disabled="" type="checkbox"> transferIn()
  • <input checked="" disabled="" type="checkbox"> transferOut() - bytesWritten always equals the initial buffer length
  • <input checked="" disabled="" type="checkbox"> clearHalt()
  • <input checked="" disabled="" type="checkbox"> reset()
  • <input disabled="" type="checkbox"> isochronousTransferIn() - currently unsupported in node-usb
  • <input disabled="" type="checkbox"> isochronousTransferOut() - currently unsupported in node-usb

Events

  • <input checked="" disabled="" type="checkbox"> connect
  • <input checked="" disabled="" type="checkbox"> disconnect

Other

  • <input checked="" disabled="" type="checkbox"> USBDevice.url
  • <input checked="" disabled="" type="checkbox"> Device selector hook
  • <input checked="" disabled="" type="checkbox"> API Documentation
  • <input checked="" disabled="" type="checkbox"> Examples