Giter Site home page Giter Site logo

Comments (3)

ianbrandt avatar ianbrandt commented on June 10, 2024

I tried from my iMac, and it works fine. Perhaps this is more an issue with nobel or hardware than it is with sphero?

The install looked a bit different this time:

$ npm install

> [email protected] install /Users/ibrandt/Development/BrandtAcademy/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.2/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] /Users/ibrandt/Development/BrandtAcademy/bb8
├─┬ [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
└─┬ [email protected] 
  ├── [email protected] 
  └── [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@^0.5.1 (node_modules/noble/node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})

iMac (Retina 5K, 27-inch, Late 2014):

 Apple Bluetooth Software Version:	5.0.4f18
  Hardware, Features, and Settings:
  Name:	Ian's iMac
  Address:	88-63-df-c7-01-e4
  Bluetooth Low Energy Supported:	Yes
  Handoff Supported:	Yes
  Instant Hot Spot Supported:	Yes
  Manufacturer:	Broadcom
  Transport:	USB
  Chipset:	20702B0
  Firmware Version:	v137 c9262
  Bluetooth Power:	On
  Discoverable:	Off
  Connectable:	Yes
  Auto Seek Pointing:	On
  Remote wake:	On
  Vendor ID:	0x05AC
  Product ID:	0x828D
  HCI Version:	4.0 (0x6)
  HCI Revision:	0x242E
  LMP Version:	4.0 (0x6)
  LMP Subversion:	0x4189
  Device Type (Major):	Computer
  Device Type (Complete):	Mac Desktop
  Composite Class Of Device:	0x380104
  Device Class (Major):	0x01
  Device Class (Minor):	0x01
  Service Class:	0x1C0
  Auto Seek Keyboard:	On

Same OS X and Xcode version
Node.js v6.10.2

from sphero.js.

scheunemann avatar scheunemann commented on June 10, 2024

Hi @ianbrandt I can confirm that I operate BB-8 successfully with [email protected] and [email protected] on an Arch linux. There was a similar issue #90 (didn't see your's).

You may want to test the following only-noble script and check whether it connects to your sphero (to rule out noble or driver issues ). Should work assuming BB-8's name is kept as BB-XXXX.

var noble = require('noble');

noble.on('stateChange', function(state) {
    console.log(state);
    if (state === 'poweredOn') {
        noble.startScanning();
    } else {
    }
});

noble.on('discover', function(peripheral) {

    var localName = peripheral.advertisement.localName;
    console.log("discover ", localName);

    if(localName !== undefined && localName !== "" && localName.substring(0, "BB-".length) === "BB-") {
        console.log("Connecting ", localName);

        peripheral.on('connect', function() {
            console.log(localName, 'connected');
        });

        peripheral.on('disconnect', function() {
            console.log(localName, 'disconnected');
        });

        noble.stopScanning();
        peripheral.connect(function(error) {
            if(error) {
                console.log(error);
                return;
            }
            console.log(localName, 'connected!'); 
            noble.startScanning();
        return;
        });
    }

});

from sphero.js.

deus42 avatar deus42 commented on June 10, 2024

The issue is reproducible on High Sierra, change your package.json : "noble": "git://github.com/jacobrosenthal/noble.git#highsierra",

from sphero.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.