node-dualshock-controller
node-dualshock-controller copied to clipboard
can read but not write to the controller
Thanks for this cool library! I was getting an error with the README sample code. "cannot write to hid device"
after removing the bits that write to the controller, I was able to read from it. I tried with sudo but still the same. I'm happy with reading events but wonder why cannot write to it. I'm using MacOS (Sierra) if that helps.
Thanks!
hmm, What controller version and plugged in or Bluetooth ?
It's a PS3 original controller using Bluetooth.
I am probably getting the same error. This is the output if this helps?
/home/cncjs/cncjs-pendant-ps3/dualshock-controller/src/controller.js:131
device.write(buff);
^
Error: Cannot write to HID device
at Controller.setExtras (/home/cncjs/cncjs-pendant-ps3/dualshock-controller/src/controller.js:131:16)
at Timeout.updateControllerExtras [as _onTimeout] (/home/cncjs/cncjs-pendant-ps3/index.js:802:15)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
I get this same error. I'm using a PS3 controller clone, but it should be indistinguishable from the original controller. I know node-HID is specified to be 0.5.0. This repo is pretty old and will not build after node 8 it seems. I'm working on updating it to node 10 or higher but I'm pretty new to node.