Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Can't connect to BB-8 (advertisement-discovery.js hangs) #87

Open
@ianbrandt

Description

Greetings,

I'm trying to connect to my BB-8, but when I run advertisement-discovery.js it just hangs and never prints anything.

I can connect with the iOS app. The first time it did a firmware update.

I make sure BB-8 is fully charged. Then I remove him from the charging station, and set him on the floor right next to my MacBook Pro. BB-8 doesn't activate or light up when I do this. The I run advertisement-discovery.js, but nothing prints. I tried moving BB-8 all around in close proximity to the laptop.

I tried resetting BB-8, which wakes him up, and then repeating the above procedure with him active, but no change.

package.json:

[...]
  "dependencies": {
    "noble": "^1.8.1",
    "sphero": "^0.9.2"
  }
}

noble and sphero install:

$ npm install

> [email protected] install /Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/xpc-connection
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/XpcConnection.o
../src/XpcConnection.cpp:143:44: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
      Local<Value> propertyValue = object->GetRealNamedProperty(propertyName->ToString());
                                           ^
/Users/ibrandt/.node-gyp/6.10.3/include/node/v8.h:2923:30: note: 'GetRealNamedProperty' has been explicitly marked
      deprecated here
                Local<Value> GetRealNamedProperty(Local<String> key));
                             ^
1 warning generated.
  SOLINK_MODULE(target) Release/binding.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

> [email protected] install /Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/usb
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/Cellar/node@6/6.10.3_1/bin/node',
node-pre-gyp verb cli   '/Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/usb/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/usb/src/binding/usb_bindings.node" (not found)
node-pre-gyp http GET https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v48-darwin-x64.tar.gz
node-pre-gyp http 200 https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v48-darwin-x64.tar.gz
node-pre-gyp info install unpacking usb_bindings.node
node-pre-gyp info tarball done parsing tarball
node-pre-gyp info validate Running test command: '/usr/local/Cellar/node@6/6.10.3_1/bin/node --eval 'require(\'/Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/usb/src/binding/usb_bindings.node\')''
[usb] Success: "/Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/usb/src/binding/usb_bindings.node" is installed via remote
node-pre-gyp info ok 

> [email protected] install /Users/ibrandt/Development/BrandtAcademy/git/bb8/node_modules/bluetooth-hci-socket
> node-gyp rebuild

  SOLINK_MODULE(target) Release/binding.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
added 295 packages in 12.177s

advertisement-discovery.js with debug, hangs indefinitely at "noble scanStart":

$ DEBUG=* node ./node_modules/noble/examples/advertisement-discovery.js
  noble addressChange 6c:40:08:ba:98:f1 +0ms
  yosemite-bindings sendCBMsg: 1, {
  "kCBMsgArgName": "node-1497250667277",
  "kCBMsgArgOptions": {
    "kCBInitOptionShowPowerAlert": 0
  },
  "kCBMsgArgType": 0
} +3ms
  yosemite-bindings xpcEvent: {
  "kCBMsgId": 6,
  "kCBMsgArgs": {
    "kCBMsgArgState": 5
  }
} +2ms
  yosemite-bindings state change poweredOn +0ms
  noble stateChange poweredOn +0ms
  yosemite-bindings sendCBMsg: 29, {
  "kCBMsgArgOptions": {},
  "kCBMsgArgUUIDs": []
} +1ms
  noble scanStart +0ms
^C

MacBook Pro (Retina, 15-inch, Mid 2014):

Apple Bluetooth Software Version:	5.0.4f18
  Hardware, Features, and Settings:
  Name:	Ian's MacBook Pro
  Address:	6c-40-08-ba-98-f1
  Bluetooth Low Energy Supported:	Yes
  Handoff Supported:	Yes
  Instant Hot Spot Supported:	Yes
  Manufacturer:	Broadcom
  Transport:	USB
  Chipset:	20702B0
  Firmware Version:	v137 c9260
  Bluetooth Power:	On
  Discoverable:	Off
  Connectable:	Yes
  Auto Seek Pointing:	On
  Remote wake:	On
  Vendor ID:	0x05AC
  Product ID:	0x8289
  HCI Version:	4.0 (0x6)
  HCI Revision:	0x242C
  LMP Version:	4.0 (0x6)
  LMP Subversion:	0x4189
  Device Type (Major):	Computer
  Device Type (Complete):	Mac Portable
  Composite Class Of Device:	0x38010C
  Device Class (Major):	0x01
  Device Class (Minor):	0x03
  Service Class:	0x1C0
  Auto Seek Keyboard:	On

OS X Version 10.12.5 (16F73)
Xcode Version 8.3.3 (8E3004b)
Node.js v6.10.3

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions