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

BB-8 losing servies and characteristics #364

Open
Oradim opened this issue Mar 22, 2017 · 0 comments
Open

BB-8 losing servies and characteristics #364

Oradim opened this issue Mar 22, 2017 · 0 comments

Comments

@Oradim
Copy link

Oradim commented Mar 22, 2017

Hi I just started to connect my BB-8 to a Raspberry pi 3.
I used cylon, cylon-ble and cylon-sphero-ble.
Yesterday I was able to execute the standard script for a few times (5-10 times).
But when I tried to use the exact same script today I am not able to connect to the BB-8.
I get the following error:

pi@raspberrypi:~/node_modules/noble/examples $ sudo node Cylontest.js
2017-03-22T08:56:35.341Z : [Robot 1] - Starting connections.
2017-03-22T08:56:35.364Z : [Robot 1] - Starting connection 'bluetooth'.
2017-03-22T08:56:48.661Z : [Robot 1] - Starting devices.
2017-03-22T08:56:48.663Z : [Robot 1] - Starting device 'bb8'.
noble warning: unknown handle 64 disconnected!
/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:404
return this._connectedService(serviceId).characteristics;
^

TypeError: Cannot read property 'characteristics' of null
at Adaptor._connectedCharacteristics (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:404:43)
at Adaptor._connectCharacteristic (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:357:12)
at /home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:302:12
at Adaptor._connectService (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:338:5)
at /home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:300:10
at Adaptor._connectBLE (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:324:5)
at Adaptor.getCharacteristic (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:299:8)
at Adaptor.writeServiceCharacteristic (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:274:8)
at Adaptor.setTXPower (/home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:203:8)
at /home/pi/node_modules/cylon-sphero-ble/node_modules/sphero/lib/adaptors/ble.js:156:10

I then tried the peropheral-explorer.js and got the following output:

pi@raspberrypi:~/node_modules/noble/examples $ sudo node peripheral-explorer.js d846e13d148d
peripheral with ID d846e13d148d found
Local Name = BB-148D
TX Power Level = -10
Manufacturer Data = 3330
Service Data =
Service UUIDs = 22bb746f2ba075542d6f726568705327

services and characteristics:

There are no services and characteristics listed.
I also tried to force a firmwareupdate on the BB-8 what worked perfectly.
I also updated noble, sphero, cylon, cylon-ble, cylon-sphero-ble. but I cannot find the error.
Sometimes I also get the following noble warning:

noble warning: unknown handle 64 disconnected!

Does anyone have an idea what the problem is and how I could fix it?

I also tried to use the standard sperho.js sdk but I get the same error.

I also noticed when I force a firmwareupdate on the BB-8 and than run the peripheral-explorer.js script
I get the following output:
pi@raspberrypi:~/node_modules/noble/examples $ sudo node peripheral-explorer.js D8:46:E1:3D:14:8D
peripheral with ID d846e13d148d found
Local Name = BB-148D
TX Power Level = -10
Manufacturer Data = 3330
Service Data =
Service UUIDs = 22bb746f2ba075542d6f726568705327

services and characteristics:
1800 (Generic Access)
1801 (Generic Attribute)
2a00 (Device Name)
properties read
value | ''
2a01 (Appearance)
properties read
value | ''
2a04 (Peripheral Preferred Connection Parameters)
properties read
value | ''
When I then call then call the script I get the error that the characteristics are null.
After that the peripheral-explorer.js script won't find any services or characteristics until I force a new firmware update on the BB-8.

I hope someone could help me.

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

1 participant