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

Issues with acquiring target on macOS #45

Open
danvass opened this issue Oct 9, 2018 · 3 comments
Open

Issues with acquiring target on macOS #45

danvass opened this issue Oct 9, 2018 · 3 comments

Comments

@danvass
Copy link

danvass commented Oct 9, 2018

I've tried installing it on two macbook (macbook pro 2017 and macbook air 2015) and when running the proxy on one and the app on the other it seems to be able to scan for devices just fine. However, when I try to 'acquire target' it throws the following error:

[info] Server listening on port 8000
[info] Client connected
[i] Stopping current proxy.
Configuring proxy ...
[status] Acquiring target 38:89:2c:ae:ac:23
/Users/daniel/.nvm/versions/node/v8.7.0/lib/node_modules/btlejuice/proxy.js:196
    noble._bindings._gap._hci.on(
                         ^

TypeError: Cannot read property '_hci' of undefined
    at Proxy.acquireTarget (/Users/daniel/.nvm/versions/node/v8.7.0/lib/node_modules/btlejuice/proxy.js:196:26)
    at Proxy.configure (/Users/daniel/.nvm/versions/node/v8.7.0/lib/node_modules/btlejuice/proxy.js:169:10)
    at Proxy.<anonymous> (/Users/daniel/.nvm/versions/node/v8.7.0/lib/node_modules/btlejuice/proxy.js:93:12)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at /Users/daniel/.nvm/versions/node/v8.7.0/lib/node_modules/btlejuice/node_modules/socket.io/lib/socket.js:503:12
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Any ideas on why this may be happening? I saw that _bindings doesn't seem to have _gap or _gatts so it errors in other place if I remove that.

@danvass
Copy link
Author

danvass commented Oct 9, 2018

@virtualabs would you happen to know? Thanks

@virtualabs
Copy link
Collaborator

Yes, I've already experienced this behavior: it is usually caused by an onboard Bluetooth adapter that is not compatible with noble such as a 'recent' BLE 4.2 adapter.
Just use a compatible 4.0 BLE USB adapter (e.g. CSR 4.0) and everything should work as expected.

@danvass
Copy link
Author

danvass commented Oct 9, 2018

Thanks, the MacBook Air is running 4.0 but also gave the same error. I tried looking through noble issues about it but couldn’t find much. It only supports external adapters?

What’s the purpose of using noble._bindings? I couldn’t find much in their documentation either about using it like that. Thanks @virtualabs

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