Skip to content

Instantly share code, notes, and snippets.

@sebirdman
Created June 28, 2018 19:46
Show Gist options
  • Save sebirdman/0afd11c9184db923345ef70bd6a3d682 to your computer and use it in GitHub Desktop.
Save sebirdman/0afd11c9184db923345ef70bd6a3d682 to your computer and use it in GitHub Desktop.
var usb = require('usb');
var device = usb.findByIds(0x24f0, 0x2020);
device.open();
const dummy = Array.of(64).fill(0xFF);
let dummyBuffer = Buffer(dummy)
device.controlTransfer(0x21, 0x09, 0x03, 0x02, dummyBuffer, (e, data) => {
console.log("ERROR IS:" + e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment