Skip to content

A Windows Node.js native add-on to associate USB devices to the generic WinUSB driver

License

Notifications You must be signed in to change notification settings

balena-io-modules/winusb-driver-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bedce46 · Jul 23, 2024
Jul 22, 2024
Jul 23, 2024
Jun 19, 2024
Feb 13, 2023
Nov 20, 2017
Nov 20, 2017
Nov 30, 2017
Nov 25, 2017
Jul 23, 2024
Nov 25, 2017
Mar 3, 2020
Feb 13, 2023
Nov 30, 2017
Jul 23, 2024
Jul 23, 2024
Nov 25, 2017

Repository files navigation

winusb-driver-generator

Build status

A Windows Node.js native add-on to associate USB devices to the generic WinUSB driver

Installation

Install winusb-driver-generator by running:

npm install --save winusb-driver-generator

Requirements

Building from Source:

Documentation

Object[] .listDriverlessDevices()

Return a list of all driverless devices found on the system.

For example:

winusbDriverGenerator.listDriverlessDevices().forEach((device) => {
  console.log(device)
})

Boolean .hasDriver(Number vendorId, Number productId)

Check if there is a driver associated with a USB device given its vendor and product ID pairs.

For example:

if (!winusbDriverGenerator.hasDriver(0x0a5c, 0x2764)) {
  console.log('There is no driver for this device');
}

Void .associate(Number vendorId, Number productId, String description)

Associate a USB device with the generic WinUSB driver.

For example:

winusbDriverGenerator.associate(0x0a5c, 0x2764, 'Raspberry Pi USB boot');

Support

If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.

Tests

Run the test suite by doing:

npm test

Contribute

Dependencies

Before submitting a PR, please make sure that you include tests, and that linters run without any warning:

npm run lint

License

The project is licensed under the Apache 2.0 license.