How to send data to USB device in node.js using libusb
I have try to get data from device (USB thermometer), following this docs https://www.npmjs.org/package/usb , but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term = usb.findByIds(65535, 2); term.open(); var endpoints = term.interfaces[0].endpoints, inEndpoint = endpoints[0], outEndpoint = endpoints[1]; inEndpoint.transferType = 2; inEndpoint.startStream(1, 64); inEndpoint.transfer(64, function (error, data) { if (!error) { console.log(data); } else { console.log(error); } }); inEndpoint.on(