hybridgroup / cylon

JavaScript framework for robotics, drones, and the Internet of Things (IoT)
https://cylonjs.com
Other
4.2k stars 360 forks source link

Windows 10 Connection #310

Closed vincent-leonardo closed 9 years ago

vincent-leonardo commented 9 years ago

I'm currently on Windows 10. Attempting to connect a Sphero but it always returns:

events.js:85
    throw er; // Unhandled 'error' event

Error: Opening \\.\COM*: Unknown error code 121
    at Error (native)

and in some case the error code is 1168.

I tried to connect to the Sphero using https://github.com/eelcocramer/node-bluetooth-serial-port, it could connect to it, but it uses MacAddress with Channel instead of COM port. Is there a solution to it? Or anyway i could setup the connetion through node-bluetooth-serial-port and utilize the functions of Cylon.

edgarsilva commented 9 years ago

Hi @vincent-leonardo ,

I don't have a windows 10 platform to test yet, it is probable that the Bluetooth dev stack changed and the connections or libraries we use for BT do not work there yet.

This looks like it is an issue with the serialport connection, you can test if node-serialport works by following the steps in their readme: https://github.com/voodootikigod/node-serialport

If serial port does not work then cylon interfaces that use it won't work, if it does work then we can follow the rabbit hole and fix it.

I will take a look when I have a chance, thanks for the heads up.

Edgar Silva

vincent-leonardo commented 9 years ago

I forgot to mention it, I did test it out on node-serialport as well after I realize that cylon uses it as its dependency, I got the similar error message.

Thanks a lot, in the meantime I'll also try to find the possible solution.

vincent-leonardo commented 9 years ago

I've managed to solve the problem. All the modifications I've done are on the original sphero.js modules, so I'll just notify them if they want to incorporate the changes. In the meantime if there's anyone interested in the solution, you could fork the sphero.js from my repository (https://github.com/vincent-leonardo/sphero.js).