

Retrieve a list of Capability objects for the Binary Object Store capabilities of the device.interface(interface) getCapabilities(callback(error, capabilities)) Perform a control transfer to retrieve an object with properties for the fields of the Binary Object Store descriptor: getBosDescriptor(callback(error, bosDescriptor)) Perform a control transfer to retrieve a string descriptor. open(false) (which tells it not to auto configure), then before claiming an interface, call this method.getStringDescriptor(index, callback(error, data)) Set the device configuration to something other than the default (0). The data parameter of the callback is always undefined for OUT transfers, or will be passed a Buffer for IN transfers.Ī package is available to calculate bmRequestType if tConfiguration(id, callback(error)) The type must match the direction specified in the MSB of bmRequestType. Parameter data_or_length can be a integer length for an IN transfer, or a Buffer for an out transfer. Perform a control transfer with libusb_control_transfer. All methods below require the device to be open before use.close()Ĭlose the ntrolTransfer(bmRequestType, bRequest, wValue, wIndex, data_or_length, callback(error, data)) If there is no parent this property is set to `null`.

parent Contains the parent of the device, such as a hub. allConfigDescriptors Contains all config descriptors of the device (same structure as. extra (Buffer containing any extra data or additional descriptors).Object with properties for the fields of the configuration descriptor:

Object with properties for the fields of the device descriptor: Set the libusb debug level (between 0 and 4) DeviceĪrray containing the USB device port numbers, or undefined if not supported on this viceDescriptor usb.LIBUSB_*Ĭonstant properties from libusb usb.setDebugLevel(level : int) usb.findByIds(vid, pid)Ĭonvenience method to get the first device with the specified VID and PID, or undefined if no such device is present. Return a list of Device objects for the USB devices attached to the system. Otherwise you will get LIBUSB_ERROR_NOT_SUPPORTED when attempting to open devices.
Udmx node install#
Use Zadig to install the WinUSB driver for your USB device. See the bottom of this page for instructions for building from a git checkout. On Ubuntu/Debian: sudo apt-get install build-essential libudev-dev On Linux, you'll need libudev to build libusb. It's based entirely on libusb's asynchronous API for better efficiency, and provides a stream API for continuously streaming data or events. The API is not compatible (hopefully you find it an improvement). This is a refactoring / rewrite of Christopher Klein's node-usb. Node.JS library for communicating with USB devices in JavaScript / CoffeeScript.
