This package has been deprecated

Author message:

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

webusb
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

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

  • getDevices()
  • requestDevice()

USBDevice

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

Events

  • connect
  • disconnect

Other

  • USBDevice.url
  • Device selector hook
  • API Documentation
  • Examples

Readme

Keywords

Package Sidebar

Install

npm i webusb

Weekly Downloads

207

Version

2.2.0

License

MIT

Unpacked Size

925 kB

Total Files

51

Last publish

Collaborators

  • thegecko