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

2.2.9 • 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

  • [x] getDevices()
  • [x] requestDevice()

USBDevice

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

Events

  • [x] connect
  • [x] disconnect

Other

  • [x] USBDevice.url
  • [x] Device selector hook
  • [x] API Documentation
  • [x] Examples

/@koush/webusb/

    Package Sidebar

    Install

    npm i @koush/webusb

    Weekly Downloads

    10

    Version

    2.2.9

    License

    MIT

    Unpacked Size

    756 kB

    Total Files

    82

    Last publish

    Collaborators

    • koush