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

Discovery doesn’t work (OS X 10.11, iOS 9) #9

Open
sander opened this issue Oct 19, 2015 · 4 comments
Open

Discovery doesn’t work (OS X 10.11, iOS 9) #9

sander opened this issue Oct 19, 2015 · 4 comments

Comments

@sander
Copy link

sander commented Oct 19, 2015

The library used to work well between my MacBook and iPhone, but a few months later (with an iOS reinstallation and OS X upgrade in between) it doesn’t. I’m trying it this way:

  1. Install ANCSExample on iOS.
  2. Run DEBUG=* node test.js on OS X.
  3. Run ANCSExample on iOS.

Expected: Node recognizes the phone advertisement (with device name ‘testje’) and displays a sequence ‘discovered’, ‘connected’, ‘services and characteristics discovered’.

Instead: Node just outputs all advertisements it finds, and doesn’t handle the ‘testje’ one differently. No connection etc. See the relevant output lines below:

yosemite-bindings xpcEvent: {
  "kCBMsgId": 37,
  "kCBMsgArgs": {
    "kCBMsgArgAdvertisementData": {
      "kCBAdvDataIsConnectable": 1
    },
    "kCBMsgArgRssi": -41,
    "kCBMsgArgDeviceUUID": {
      "type": "Buffer",
      "data": [
        120,
        176,
        230,
        29,
        235,
        205,
        64,
        36,
        164,
        236,
        13,
        228,
        189,
        1,
        255,
        113
      ]
    },
    "kCBMsgArgName": "testje"
  }
} +611ms
  yosemite-bindings peripheral 78b0e61debcd4024a4ec0de4bd01ff71 discovered +0ms

I’ve tried both with and without the devices being paired using Bluetooth Settings. ANCS from the same phone to Linux works, using https://github.com/robotastic/ble-ancs.

Am I missing a step? Should node-ancs still be working with this combination of OS versions?

@sandeepmistry
Copy link
Owner

@sander please provide a full debug log.

Also, I'm wondering if CoreBluetooth/blued is not reporting the ANCS GATT service anymore in OS X 10.11. Would you be able to get a screenshot from the LightBlue OS X app connected to an iOS 9 peripheral?

@sander
Copy link
Author

sander commented Oct 27, 2015

@sandeepmistry
Copy link
Owner

@sander thanks

From the logs looks like no services are discovered:

Tue, 27 Oct 2015 08:25:13 GMT yosemite-bindings xpcEvent: {
  "kCBMsgId": 56,
  "kCBMsgArgs": {
    "kCBMsgArgServices": [],
    "kCBMsgArgDeviceUUID": {
      "type": "Buffer",
      "data": [
        124,
        73,
        31,
        4,
        26,
        90,
        70,
        93,
        186,
        56,
        126,
        81,
        246,
        6,
        11,
        42
      ]
    },
    "kCBMsgArgResult": 0
  }
}

node-ancs is looking for the following service UUID when it discovers services: 7905f431b5ce4e99a40f4b1e122d00d0

Here's a screenshot from my OS X 10.10 (Yosemite) Mac connecting to an iOS 9 iPhone:

screen shot 2015-10-27 at 7 21 26 pm

Again, no service UUID 7905f431b5ce4e99a40f4b1e122d00d0 seen for whatever reason ...

@sander
Copy link
Author

sander commented Oct 28, 2015

Thank you @sandeepmistry. I’ve asked about this on the Apple dev forums:

ANCS service on iOS 9 not discovered in OS X 10.11 (pending mod approval)

This post about Mac/iOS listening to iOS’s ANCS suggests that ANCS may be filtered out indeed in CoreBluetooth.

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