Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You must have bluetooth enabled and be connected to a drone" error #84

Closed
remzinho opened this issue Mar 27, 2017 · 12 comments
Closed

Comments

@remzinho
Copy link

Not sure if this repo is active but giving this a try:
I'm running this in Ubuntu 16.04 64.
Installed all pre-reqs.
connected ubuntu to the Maclane drone
then ran the discover.js with sudo in a terminal
got noble: unknown peripheral <addr> connected
immediately after got noble: unknown peripheral <addr> disconnected
then i ran sudo node reconnect.js in a different terminal (reconnect.js is a bit modified to just do the take off and landing)

i get the following error:

Prepare for take off!  Maclan_033049
/home/remzi/Desktop/workspace/node-rolling-spider/lib/drone.js:342
      throw e;
      ^

Error: You must have bluetooth enabled and be connected to a drone before executing a command. Please ensure Bluetooth is enabled on your machine and you are connected.
    at Drone.writeTo (/home/remzi/Desktop/workspace/node-rolling-spider/lib/drone.js:338:13)
    at Drone.flatTrim (/home/remzi/Desktop/workspace/node-rolling-spider/lib/drone.js:631:8)
    at /home/remzi/Desktop/workspace/node-rolling-spider/eg/reconnect.js:17:9
    at Drone.<anonymous> (/home/remzi/Desktop/workspace/node-rolling-spider/lib/drone.js:144:11)
    at Peripheral.<anonymous> (/home/remzi/Desktop/workspace/node-rolling-spider/node_modules/noble/lib/peripheral.js:38:7)
    at Peripheral.g (events.js:291:16)
    at emitOne (events.js:96:13)
    at Peripheral.emit (events.js:188:7)
    at Noble.onConnect (/home/remzi/Desktop/workspace/node-rolling-spider/node_modules/noble/lib/noble.js:151:16)
    at emitTwo (events.js:106:13)

Am i missing something?

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

@remzi-e is this still an issue?

@remzinho
Copy link
Author

remzinho commented Apr 5, 2017

i still get the unknown peripheral <addr> connected error when running the discover.js example
don't get the error though.
should we close this and open a different issue?

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

Which Parrot drone is this? That unknown error is likely because the Maclan_ prefix isn't in the list of drones that are supported. I can add that and try to provide a more information in the case of unknown drones.

@remzinho
Copy link
Author

remzinho commented Apr 5, 2017

i get this with both Airborne Night Maclane and the Mambo models.

@remzinho
Copy link
Author

remzinho commented Apr 5, 2017

should this issue be renamed?

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

Did you already run this:

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

@remzinho
Copy link
Author

remzinho commented Apr 5, 2017

of course. i can get the drones moving (1 by 1) using the index.js script but the discover.js script throws that unknown output everytime i run it after connecting to the drone from the OS.

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

Are you pairing the drone with Bluetooth through Ubuntu before running discover.js? If that's the case, then you only want to do it through this application since noble does the pairing.

@remzinho
Copy link
Author

remzinho commented Apr 5, 2017

yeah, i thought that was the normal workflow.
if i don't do that before, there is not output from discover.js.
index.js is successful in connecting and doing what it does, though.

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

Can you console.log peripheral here: https://github.com/voodootikigod/node-rolling-spider/blob/master/eg/discover.js#L17? I suspect it's not making it past that conditional check.

Also, make sure you're using version 1.7.0. We just published that today.

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 8, 2017

@remzi-e can we close this one?

@remzinho
Copy link
Author

remzinho commented Apr 8, 2017

Yes.

@remzinho remzinho closed this as completed Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants