Hello, I want to control CF 2.0 with aerogle and Cylon.
But both of them have a problem with connection.
I think this is about libusb problem.
This is my problem. and the code is https://github.com/alanshaw/node-crazyf ... r/index.js
and i try Cylon example code, but it also have same error. http://cylonjs.com/documentation/drivers/crazyflie/
-------------------------------------------------------------------------------------------------------------
C:\node\node-crazyflie-keyboard-master\node-crazyflie-keyboard-master>node index.js
hello, this is start point
create CrazyDriver
loaded library & module
C:\node\node-crazyflie-keyboard-master\node-crazyflie-keyboard-master\node_modules\aerogel\lib\usbstreams.js:30
this.endpoint.startStream(3, 64);
^
TypeError: Object #<InEndpoint> has no method 'startStream'
at ReadableUSBStream._read (C:\node\node-crazyflie-keyboard-master\node-craz
yflie-keyboard-master\node_modules\aerogel\lib\usbstreams.js:30:17)
at ReadableUSBStream.Readable.read (_stream_readable.js:340:10)
at ReadableUSBStream.Readable.on (_stream_readable.js:719:14)
at Crazyradio.setupRadio (C:\node\node-crazyflie-keyboard-master\node-crazyf
lie-keyboard-master\node_modules\aerogel\lib\crazyradio.js:120:8)
at CrazyDriver.findCopters (C:\node\node-crazyflie-keyboard-master\node-craz
yflie-keyboard-master\node_modules\aerogel\lib\crazydriver.js:39:20)
at Object.<anonymous> (C:\node\node-crazyflie-keyboard-master\node-crazyflie
-keyboard-master\index.js:9:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
C:\node\node-crazyflie-keyboard-master\node-crazyflie-keyboard-master>
-------------------------------------------------------------------------------------------------------------
Could you help me?
Thank you.
aerogel and Cylon connection problem
-
- Beginner
- Posts: 2
- Joined: Thu Feb 19, 2015 4:28 am
-
- Beginner
- Posts: 2
- Joined: Thu Feb 19, 2015 4:28 am
Re: aerogel and Cylon connection problem
When I'm trying to Cylon example in VM.
The same error occur.
The same error occur.
Re: aerogel and Cylon connection problem
This is because the node-usb npm package has been updated a lot while the 'aerogel' package has not.
In the package.json for aerogel you will notice it says "usb": "*" under "dependencies" which basically means "depend on latest version".
However the latest version as of now is 1.0.6 and has a lot of breaking changes since two years ago when aerogel was last updated.
The quick fix for this is to just change "usb": "*" to "usb": "0.2.0" and then reinstall the packages by deleting the node_modules folder and running
However you will likely run into some more problem because you are using a later version of node and thus a later version of node-gyp. So you will have to downgrade node to 0.10.0 in order to successfully run '$ npm install' on the old node-usb package.
The easiest way to do this is to use node version manager (nvm) and the command
In the package.json for aerogel you will notice it says "usb": "*" under "dependencies" which basically means "depend on latest version".
However the latest version as of now is 1.0.6 and has a lot of breaking changes since two years ago when aerogel was last updated.
The quick fix for this is to just change "usb": "*" to "usb": "0.2.0" and then reinstall the packages by deleting the node_modules folder and running
Code: Select all
$ npm install
The easiest way to do this is to use node version manager (nvm) and the command
Code: Select all
$ nvm install 0.10.0