gandhimonik / DroneJS

A Node.js based library for controlling a Parrot minidrone. This library also provides the feature to take pictures from the drone, download them all at a time and delete them whenever required.
Apache License 2.0
20 stars 5 forks source link

Error: LIBUSB_ERROR_NOT_SUPPORTED #1

Closed moe-the-fabber closed 7 years ago

moe-the-fabber commented 7 years ago

hey gandhimonik,

maybe you remember we wrote back on the parrot sdk board. I dropped my attempt. I'd like to use yours but i keep getting this error when i try to connect. Do you have any idea why this keeps happening?

C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs>node main.js
C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\node_modules\usb\usb.js
:33
        this.__open()
             ^

Error: LIBUSB_ERROR_NOT_SUPPORTED
    at Error (native)
    at Device.usb.Device.open (C:\Users\usr\AppData\Roaming\npm\node_modules\
dronejs\node_modules\usb\usb.js:33:7)
    at BluetoothHciSocket.bindUser (C:\Users\usr\AppData\Roaming\npm\node_mod
ules\dronejs\node_modules\bluetooth-hci-socket\lib\usb.js:73:19)
    at BluetoothHciSocket.bindRaw (C:\Users\usr\AppData\Roaming\npm\node_modu
les\dronejs\node_modules\bluetooth-hci-socket\lib\usb.js:28:8)
    at Hci.init (C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\node_m
odules\noble\lib\hci-socket\hci.js:101:35)
    at NobleBindings.init (C:\Users\usr\AppData\Roaming\npm\node_modules\dron
ejs\node_modules\noble\lib\hci-socket\bindings.js:82:13)
    at new Noble (C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\node_
modules\noble\lib\noble.js:50:18)
    at Object.<anonymous> (C:\Users\usr\AppData\Roaming\npm\node_modules\dron
ejs\node_modules\noble\index.js:4:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs>

regards moe-the-fabber

gandhimonik commented 7 years ago

Hey moe-the-fabber,

Can you attach the project you have created to use the library?

moe-the-fabber commented 7 years ago

sure here you go: (using win7)

 const Drone = require('parrot-minidrone');
const drone = new Drone({
    autoconnect: true,
});

drone.on('connected', () => drone.takeOff());
drone.on('flightStatusChange', (status) => {
    if (status === 'hovering') {
        drone.land();
        process.exit();
    }
});
gandhimonik commented 7 years ago

I believe you are using some other library because your require expression is trying to fetch 'parrot-minidrone' instance which in case of DroneJS is 'dronejs'.

Can you check out the examples I have in the documentation and try them out?

moe-the-fabber commented 7 years ago

i tried out several of the exampels all with similar errors: :( `C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\node_modules\usb\usb.js :33 this.__open() ^

Error: LIBUSB_ERROR_NOT_SUPPORTED at Error (native) at Device.usb.Device.open (C:\Users\usr\AppData\Roaming\npm\node_modules\ dronejs\node_modules\usb\usb.js:33:7) at BluetoothHciSocket.bindUser (C:\Users\usr\AppData\Roaming\npm\node_mod ules\dronejs\node_modules\bluetooth-hci-socket\lib\usb.js:73:19) at BluetoothHciSocket.bindRaw (C:\Users\usr\AppData\Roaming\npm\node_modu les\dronejs\node_modules\bluetooth-hci-socket\lib\usb.js:28:8) at Hci.init (C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\node_m odules\noble\lib\hci-socket\hci.js:101:35) at NobleBindings.init (C:\Users\usr\AppData\Roaming\npm\node_modules\dron ejs\node_modules\noble\lib\hci-socket\bindings.js:82:13) at new Noble (C:\Users\usr\AppData\Roaming\npm\nodemodules\dronejs\node modules\noble\lib\noble.js:50:18) at Object. (C:\Users\usr\AppData\Roaming\npm\node_modules\dron ejs\node_modules\noble\index.js:4:18) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10)

C:\Users\usr\AppData\Roaming\npm\node_modules\dronejs\examples>`

moe-the-fabber commented 7 years ago

OK mistery SOLVED : Windows users got to exchange their usb driver with this:

https://sourceforge.net/projects/libwdi/files/zadig/

found this link in a readme of a library i downloaded with this command:

npm install usb -g

gandhimonik commented 7 years ago

Good to know moe-the-fabber. I believe we can close this issue now.

moe-the-fabber commented 7 years ago

Solved

CLOSED

gandhimonik commented 7 years ago

Thanks moe-the-fabber!