andrew / node-xbox-controller

:video_game: [UNMAINTAINED] Interface for Xbox 360 game controller into Node.js
http://libraries.io/npm/xbox-controller
MIT License
270 stars 49 forks source link

"cannot open device with path \\?\hid#vid_045e&pid..." #28

Closed lucasfcosta closed 7 years ago

lucasfcosta commented 9 years ago

I've just tried yo run your sample script (described on your README file) and I can't get it to run.

Everytime I try to do so, this appears: error

I've installed everything and the path displayed on the image above is the same as I get for the xbox controller when I run:

var HID = require('node-hid');
var devices = HID.devices();
console.log(devices);

I've tried running my command prompt as admin and the same thing occurs. Is there any solution for this?

Jabbath commented 9 years ago

First thing, do you have the xbox driver running in the background? If you do, kill the process. I've also seen this problem before when node-hid didn't compile correctly. Make sure you have Visual Studio 2012 Express (works well for me, no clue if you'll fare as well with other VS versions) and python 2.7.3 properly installed and in the path. Then try re installing node-hid.

lucasfcosta commented 9 years ago

I do have Visual Studio Express 2012 and Python 2.7.3 properly installed and in the path. I didn't try to kill the driver process, I will try it as soon as I get home.

Thanks @Jabbath !

lucasfcosta commented 9 years ago

@Jabbath , it isn't working yet. I've done everything you said, installed Visual Studio 2012 express, Python 2.7.3 (It's also on the PATH) and I've closed the xbox driver too and ran the command prompt as admin. The same error occurs.

Any ideas on how to fix this?

Jabbath commented 9 years ago

I've no other troubleshooting tips unfortunately. This is probably an upstream bug with node-hid so you may want to ask there. You could also try another version of node-hid. This bug happened with me before but I was never able to properly pin the cause down.

mapaiva commented 9 years ago

Hi Lucas,

Can be a permission problem. Try to run the prompt as administrator and execute your test script.

In node-hid already exists this issue:

https://github.com/node-hid/node-hid/issues/79

lucasfcosta commented 9 years ago

@mapaiva I've already seen this issue and I couldn't get it to work in any way. I did try to run the prompt as admin and the same error occurs.

andrew commented 7 years ago

I'm no longer supporting this library as I don't use it any longer so I'm going to close this issue.