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

Bluetooth issue on High Sierra preventing takeoff after landing. #103

Open
pchinjr opened this issue Jan 17, 2018 · 4 comments
Open

Bluetooth issue on High Sierra preventing takeoff after landing. #103

pchinjr opened this issue Jan 17, 2018 · 4 comments

Comments

@pchinjr
Copy link

pchinjr commented Jan 17, 2018

Hi hi hi!
I'm using MacOS High Sierra 10.13.2
Noble does not work currently from the master branch for High Sierra. To work around this, there is a pull request open with High Sierra support: noble/noble#689
This is working ok to control the drone and take off, however, after landing, it will not take off again. It seems that the Noble High Sierra pull request does not register notifications correctly.

I have confirmed that isNotification being passed to .getCharacteristic is always false on the High Sierra Pull Request. When isNotification is always false, node-rolling-spider will not emit flyingStatusChange on lines 285-291. This keeps the state of flying to false after it lands and prevents take off. When I comment out lines 287-290, or manually set this.status.flying = false in the land function, then it will take off and land and take off again.
https://github.com/voodootikigod/node-rolling-spider/blob/master/lib/drone.js#L285-L291

I don't know enough about how bluetooth works inside the Noble library to fix this registration of notifications. I also don't understand what the isNotification check is used for and why I can comment it out and it seems to be ok?

Thanks everyone!

@vvo
Copy link

vvo commented Jan 26, 2018

@pchinjr I have the exact same issue, the lines you outlined are never reached and I have no way to understand why.

Maybe @N-Bz you can give a hand here, or @jacobrosenthal? Thanks!

@jacobrosenthal
Copy link

This is presumably the line you're having problems with.
https://github.com/jacobrosenthal/noble/blob/highsierra/lib/mac/highsierra.js#L522

Id put a console.log(args) here on a high sierra machine https://github.com/jacobrosenthal/noble/blob/highsierra/lib/mac/highsierra.js#L520

and here on a mavericks+ machine https://github.com/jacobrosenthal/noble/blob/highsierra/lib/mac/mavericks.js#L385

and see what apple changed in args.kCBMsgArgIsNotification

@vvo
Copy link

vvo commented Feb 2, 2018

Ok it seems like we need to update the lib but it should work: https://github.com/sandeepmistry/noble#characteristic-1

cc @jacobrosenthal do you confirm? Thanks!

@jacobrosenthal
Copy link

node rolling spider needs to update to noble@^1.9 and not rely on the isnotification flag anymore

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

3 participants