Comments (4)
Hi @brianfeister you are on OSX from the looks of it. What version are you running? Also, what node version?
from sphero.js.
WOW! Thanks for the quick reply @deadprogram. I guess it could be noted in the docs that if you clone this repo, sphereo
will fail to install when running npm install sphero noble
because it would be a circular dependency. So, cloning this repo and using it as a sandbox becomes a bit confusing. I created an empty sandbox directory and was able to get running right away with just npm install sphero noble
.
Sorry for the side question, but it seems unusual to me that I was only able to connect via the uuid that I got back from the node ./node_modules/noble/examples/advertisement-discovery.js
command in the docs, but not the MAC address that I got from the details inside the iPhone app... but this one is probably just my own error / misunderstanding.
from sphero.js.
Hi @brianfeister when connecting on OSX, Noble requires that you use the "uuid' instead of the Bluetooth address. I'm not sure why that is the case within the OSX APIs, I suppose due to the "iBeacon" set of wrappers. In any case, we should probably add some separate script to the module, to make it easier to figure out the correct address.
from sphero.js.
hi @deadprogram I was having this same issue, I created an Electron app and added the sphero npm module.
Here is my envoriment on OSX 10.11:
$ node -v
v7.2.0
$ electron -v
v1.4.10
I was getting this error thrown from the initBle function:
function initBLE() {
var isChrome = typeof chrome !== "undefined";
// thanks to https://github.com/jgautier/firmata/blob/master/lib/firmata.js
try {
if (isChrome) {
// browser BLE interface here...
console.error("Browser-based BLE interface is not yet supported.");
} else {
ble = require("noble");
}
} catch (error) {
ble = null;
}
if (ble == null) {
var err = [
"It looks like you want to connect to a Sphero BB-8 or Sphero Ollie,",
"but did not install the 'noble' module.", "",
"To install it run this command:",
"npm install noble", "",
"For more information go to https://github.com/sandeepmistry/noble"
].join("\n");
console.error(err);
throw new Error("Missing noble dependency");
}
}
This meant that the else clause ble = require("noble")
was throwing an error, when I caught this error in console, it was throwing:
Module version mismatch. Expected 50, got 51.
I was able to resolve it by running the following from the Electron documentation
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd
from sphero.js.
Related Issues (20)
- Luminance with color red doesn't work well
- After a few seconds my BB8 connection is failling On Mac OSX HOT 4
- Unable to connect to multiple devices (Ollie and/or BB-8) HOT 2
- Feature Request: Go to a position in a coordination system.
- Unable to connect to Ollie after using sphero.js HOT 2
- Sphero 2.0 Connection fails most of the time HOT 1
- BB-8 command sync response error HOT 5
- Can't connect to BB-8 (advertisement-discovery.js hangs) HOT 3
- Almost impossible connection with BB-8 HOT 6
- Issue an updated release (0.9.3)
- Sphero SPRK controlled via Mac fills up queue and lags with executing commands HOT 2
- Unable to connect to R2D2 HOT 2
- Unable to connect to the Sphero Mini HOT 17
- Support for BB-9E HOT 23
- Is this project dead? HOT 10
- Connection issues... Possible workaround/hack HOT 2
- Cannot turn off sensor streaming
- Unhandled rejection TypeError: Cannot read property 'write' of null HOT 2
- Details about Sphero Mini communications? HOT 5
- Not working with Sphero Bolt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphero.js.