-
Notifications
You must be signed in to change notification settings - Fork 863
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
Added support for MacOS HighSierra #689
Conversation
lib/mac/highsierra.js
Outdated
}.bind(this)); | ||
}; | ||
|
||
nobleBindings.on('kCBMsgId6', function(args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was needed to change from kCBMsgId6 to kCBMsgId4 to catch stateChange event on my MBP running High Sierra.
xpcEvent: {
"kCBMsgId": 4,
"kCBMsgArgs": {
"kCBMsgArgState": 5
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I've missed that one
Thanks
an ETL on this please? |
Works for me, although running with |
Thanks @achingbrain - I've changed these debug messages accordingly to your suggestion |
Okay testing this branch! |
Can also verify that this works 👍 |
Seems to be working good enough, as good enough, still loosing samples and we hope a switch to core Bluetooth could help! |
Can confirm that this is working. However like @aj-ptw mentioned above it appears to be losing a lot of samples. My latency has gone from an average of 30 ms per update to 150 ms. |
I've got some hours to put towards using core bluetooth as the underlying lib with the goal to improve the notifications on select macOS computers. I see @sandeepmistry started more-test looks like where i should pull and work from. |
Any idea when will this get merged? |
This is working for me too, but it's a bit laggy. On simple scripts, it works ok with some minor lag, but with a UI, you can definitely feel it. |
This works for me on macOS High Sierra |
I run peripheral-explorer.js, and I obtained an error on line 376 of highsierra.js:
The line is the following:
I debugged a bit, and serviceStartHandle is undefined, because the args passed to that callback don't contain a kCBMsgArgServiceStartHandle
Am I doing something wrong? |
Works for me on 2017 MacBook pro running high sierra version 10.13.1. Thanks! |
Works on iMac 2015, using 10.13. Also checks out with my MacBook Pro 2017 running 10.13. Could we please merge this? |
Works for me on MacBook Pro (mid 2014) running macOS version 10.13.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever trying to discover descriptors, there's an error.
nobleBindings.on('kCBMsgId87', function(args) { | ||
var deviceUuid = args.kCBMsgArgDeviceUUID.toString('hex'); | ||
var serviceStartHandle = args.kCBMsgArgServiceStartHandle; | ||
var serviceUuid = this._peripherals[deviceUuid].services[serviceStartHandle].uuid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consistently get a TypeError: Cannot read property 'uuid' of undefined
error here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Running examples/peripheral-explorer.js I see the TypeError: Cannot read property 'uuid' of undefined
error. examples/advertisement-discovery.js runs without issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
87 is (correctly) assigned to servicesDiscover above, and duplicated here incorrectly. We need to figure out what includedServicesDiscover's xpc id actually is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its 76.. Try that
I'm testing this PR on When using I've been looking for a dictionary to get more details about all the possible events but I couldn't find any, could you please point me somewhere to get this data?
EDIT3: I just tested this with |
I spent many hours trying to get the library to connect to a device on EDIT: I think it's the BT400 which is causing issues, it works on |
I'm testing this PR on 10.13.1 High Sierra. Log is the following:
What am I doing wrong? |
Bit of a noob. But, how do I apply this specific branch. I installed the more-test branch, but i am getting yosemite-bindings. do I just modify the bindings.js and add the highsierra.js file. I appreciate the help and insight. I am trying to add the bluetooth module for the ceiling fan on 10.13.2 instead of Linux. Thanks! |
@Guzmandius |
when can we expect this to be merged into noble ? |
For anyone with the Descriptor issue, this PR fixed that for me: #727 |
Thanks for doing this @Axadiw, it worked great for me with node-rolling-spider and resolved my issue. I'm on a 2016 Macbook Pro with High Sierra 10.13.2 and Node 8.9.4 |
Hi everyone, I'm back, after further testing. I am running into an issue with notifications on one of the characteristics in Node-Rolling-Spider. voodootikigod/node-rolling-spider#103 So I'm currently bouncing back and forth between rolling-spider and noble, to understand what is going on with the way High Sierra is interacting with Rolling-Spider. Thanks everyone! |
Superceded by #727 |
Changed XPC Id's that are being sent to CoreBluetooth on MacOS HighSierra
Tested everything besides:
discoverIncludedServices
broadcast
writeValue
(on descriptor)readHandle
writeHandle
Additionaly it looks like after registering on notifications, we're CoreBluetooth is sending the same ID as after requesting for characteristic value (single value, not continuous notifications). This may lead to some problems with notification registration on some characteristics.
Fixes #679 and #680