-
Notifications
You must be signed in to change notification settings - Fork 36
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
Sphero Bolt Support #20
Comments
Hey! I am sorry but I don't have a Sphero Bolt, so I can't really say what is going on. That msg may not be an issue. That happens when bolt sends a msg to host but the host is not expecting one. |
I am thinking that it may have a different protocol. Maybe you can get a bluetooth dump, using the app, and we can investigate. |
Hey! I am making some progress in making the bolt work! I will update something soon :) |
Hey! I added sphero Bolt! let me know if it works |
I have not been able to get it to work. Here's what I have. spherov2.js const { Scanner, Utils, SpheroBolt } = require('spherov2.js');
async function run() {
var bolt = await Scanner.find(SpheroBolt.advertisement, "SB-EE1B");
bolt.roll(50, 0);
}
run(); pi@Marengo:~ $ sudo node spherov2.js
Scanning devices...
name: Sphero Bolt, uuid: fe5dc988ee1b, mac-address: fe:5d:c9:88:ee:1b
Done scanning devices.
Starting... It just gets stuck here, nothing ever happens after this. The bolt doesn't light up or anything, nothing. |
What platform are you using? |
Oh, raspberry, I can try on mine and let you know |
Correct, I am running a Raspberry Pi 3 B+, with nodejs v8.15.1. |
That might be an issue, can you try with node 10? |
Well, so I upgraded nodejs to v10.15.3 and tried installing noble. However just as before I am met with a huge error message, just like this guy who suggested to downgrade to v8 which worked previously. Attached Error message
pi@Marengo:~/spherov2.js_3 $ nodejs -v
v10.15.3
pi@Marengo:~/spherov2.js_3 $ npm i noble
> [email protected] install /home/pi/spherov2.js_3/node_modules/usb
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/spherov2.js_3/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_usb.cc:99:73: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
../src/node_usb.cc:103:53: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:1001) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
../src/node_usb.cc: In function ‘v8::Local<v8::Value> libusbException(int)’:
../src/node_usb.cc:301:14: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New<String>("errno").ToLocalChecked(), Nan::New<Integer>(errorno));
^
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t*)’:
../src/device.cc:237:64: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:959) [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/transfer.cc:58:47: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
Local<Object> buffer_obj = info[0]->ToObject();
^
../src/transfer.cc: In function ‘void handleCompletion(Transfer*)’:
../src/transfer.cc:126:72: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:959) [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /home/pi/spherov2.js_3/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/spherov2.js_3/node_modules/usb/build'
> [email protected] install /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket
> node-gyp rebuild
make: Entering directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
^
../src/BluetoothHciSocket.cpp:275:72: note: candidates are:
In file included from /home/pi/.node-gyp/10.15.3/include/node/node.h:63:0,
from /home/pi/.node-gyp/10.15.3/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:3993:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/pi/.node-gyp/10.15.3/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided
/home/pi/.node-gyp/10.15.3/include/node/v8.h:3996:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/pi/.node-gyp/10.15.3/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
binding.target.mk:99: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.35-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm WARN spherov2.js_3 No description
npm WARN spherov2.js_3 No repository field.
npm WARN spherov2.js_3 No README data
npm WARN spherov2.js_3 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ [email protected]
added 4 packages from 4 contributors and audited 107 packages in 53.147s
found 3 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details So, further down the comments this solution is suggested which does work given you have a clean directory. Installing noble thereafter. Console log
pi@Marengo:~/spherov2.js_3 $ nodejs -v
v10.15.3
pi@Marengo:~/spherov2.js_3 $ npm install "https://github.com/jrobeson/node-bluetooth-hci-socket/#fix-builds-for-node-10" # worked
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
> [email protected] preinstall /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket
> npm install node-pre-gyp
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm notice created a lockfile as package-lock.json. You should commit this file.
+ [email protected]
added 114 packages from 78 contributors and audited 268 packages in 10.469s
found 8 moderate severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
> [email protected] install /home/pi/spherov2.js_3/node_modules/usb
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/spherov2.js_3/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_usb.cc:99:73: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
../src/node_usb.cc:103:53: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:1001) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
../src/node_usb.cc: In function ‘v8::Local<v8::Value> libusbException(int)’:
../src/node_usb.cc:301:14: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New<String>("errno").ToLocalChecked(), Nan::New<Integer>(errorno));
^
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t*)’:
../src/device.cc:237:64: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:959) [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/transfer.cc:58:47: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
Local<Object> buffer_obj = info[0]->ToObject();
^
../src/transfer.cc: In function ‘void handleCompletion(Transfer*)’:
../src/transfer.cc:126:72: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:959) [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /home/pi/spherov2.js_3/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/spherov2.js_3/node_modules/usb/build'
> [email protected] install /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/0.5.2/binding-0.5.2-node-v64-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/0.5.2/binding-0.5.2-node-v64-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
make: Entering directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:252:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:283:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:396:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:418:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:252:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:283:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:980) [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:396:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:418:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated (declared at /home/pi/.node-gyp/10.15.3/include/node/v8.h:2476): Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
SOLINK_MODULE(target) Release/obj.target/binding.node
SOLINK_MODULE(target) Release/obj.target/binding.node
COPY Release/binding.node
COPY /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/lib/binding/binding.node
COPY Release/binding.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
COPY /home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/lib/binding/binding.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/spherov2.js_3/node_modules/bluetooth-hci-socket/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm WARN spherov2.js_3 No description
npm WARN spherov2.js_3 No repository field.
npm WARN spherov2.js_3 No README data
npm WARN spherov2.js_3 No license field.
+ [email protected]
added 130 packages from 91 contributors and audited 369 packages in 76.389s
found 8 moderate severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
pi@Marengo:~/spherov2.js_3 $ npm i noble
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/spherov2.js_3/package.json'
npm WARN spherov2.js_3 No description
npm WARN spherov2.js_3 No repository field.
npm WARN spherov2.js_3 No README data
npm WARN spherov2.js_3 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
+ [email protected]
added 4 packages from 4 contributors and removed 114 packages in 9.413s However, now running nodejs v10 the results are nothing but the same. Still stuck at starting... and no sign of life from the bolt. pi@Marengo:~/spherov2.js_3 $ nodejs -v
v10.15.3
pi@Marengo:~/spherov2.js_3 $ sudo node ./src/spherov2.js
Scanning devices...
name: Sphero Bolt, uuid: fe5dc988ee1b, mac-address: fe:5d:c9:88:ee:1b
Done scanning devices.
Starting... |
I have been able to repro the issue. I will let you know. |
Hey, looks like it works for a sphero mini but it does not for sphero bolt. it works in a mac computer, but not in the raspberry, maybe something I am missing. I will investigate more. |
Hello all, First of great that you are working on this! We will be doing a university project with Sphero Bolts. Our options for how to connect to the Bolt from outside the Sphero Edu app were looking rather bleak until we found your work :) (We will have to interface them with Python later on, that's why we need to bypass the app). Now as for this issue, I am using very similar test code.
I'm on Windows and I can see the Sphero but unfortunately I am also not getting it to move. I did the following:
Now when I run my test file (connect.js) I get the same result as Wiggyboy
stuck at "starting..." and no sign of life from the bolt. If we can help you in any way with solving this please let us know. |
I tried it again with a supported external USB Bluetooth adapter on the same windows laptop and I get the same results. @igbopie when you said:
Did you mean you can connect to and control a Sphero BOLT from your mac computer? |
Yes, that is correct. There is something going on when noble uses its own hci implementation. On mac, because it is using noblemac and it uses native documented mac apis it works. I have been trying to use different things to see what is going on but no luck. My last go would be using chrome web bluetooth. There are some changes I have to do order to make it work. |
Yes!! Using chrome webbluetooth on ubuntu works!! Tomorrow I will try with the rasp! |
So I just published a new release with Bolt support and Raspberry :) |
First of all, great work on trying to keep the Sphero alive for Node.js. I am trying to connect my Sphero Bolts. As a quick test, I tricked the library by changing the prefix of one of the other types to 'SB'.
However, the examples end up doing:
The text was updated successfully, but these errors were encountered: