Closed bbirand closed 9 years ago
sorry for the delay in looking at this.
@sandeepmistry - any idea as to what's going on?
@bbirand which version of noble
, robosmart
and sensor tag
do you have installed?
Do you have any other BLE devices in range as well?
Thanks for the reply! This is the output of npm list
$ npm list noble
node-steward@1.9.1 /Users/user/tmp/steward/steward
├─┬ lumen@0.0.2
│ └── noble@0.2.8
├── noble@0.3.5 (git://github.com/sandeepmistry/noble.git#4bd9bfb46fb895b3f01b8a2a42d255c62b54267e)
├─┬ robosmart@0.1.1
│ └── noble@0.2.8
└─┬ sensortag@0.1.1
└── noble@0.2.8
I'm only using a single SensorTag, but there are may be a few devices around as well.
Thanks!
Also, when I try to run the advertisement-discovery.js
example in the noble
repo, I get the following output. The "advertised services" array is empty. Is this expected output for the SensorTag?
$ node advertisement-discovery.js
peripheral discovered (c6bf5e348be343a5a861622584cee517):
hello my local name is:
SensorTag
can I interest you in any of the following advertised services:
[]
my TX power level is:
0
@bbirand I think I've figured out what's going on. You have more than one version of noble running 0.2.8 and 0.3.5. This means two XPC connections are created to blued, and both get events. So, when event kCBMsgId70
fires for one noble instance, the other has no knowledge of the peripheral for the event.
Could you please try changing: https://github.com/TheThingSystem/steward/blob/master/steward/package.json#L48
to: "noble": "0.2.8"
and then run npm install
again in the steward
folder.
@mrose17, if this change fixes things for @bbirand I would recommend you make it on master as well.
Here's the line that is crashing: https://github.com/sandeepmistry/noble/blob/b54cd565d5e38447bc7cfa326c4c669e23baa121/lib/mac/mavericks.js#L371
@sandeepmistry - thanks
@bbirand - if this fixes it, please submit a pull request!
Yes, this fixes the problem. Thank you both for the incredible help!
I'm trying to use the TI SensorTag on a MacBook Air. When I turn it on, the steward crashes with the following error.
Any idea what's causing this?
Thanks!