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

TypeError at openBCIGanglion.js:871 #44

Open
csold opened this issue Apr 3, 2018 · 1 comment
Open

TypeError at openBCIGanglion.js:871 #44

csold opened this issue Apr 3, 2018 · 1 comment

Comments

@csold
Copy link

csold commented Apr 3, 2018

I'm running the TL;DR code on windows. Its connecting to the ganglion through the dongle but getting this error

`Bluetooth powered on
Scan started
Found ganglion!
Stopping scan
Device is advertising 'Ganglion-12f6' service.
Scan stopped
C:\Users\COld\node_modules\openbci-ganglion\openBCIGanglion.js:871
this._rfduinoService.once(k.OBCINobleEmitterServiceCharacteristicsDiscover, (characteristics) => {
^

TypeError: Cannot read property 'once' of null
at Peripheral._peripheral.on (C:\Users\COld\node_modules\openbci-ganglion\openBCIGanglion.js:871:27)
at emitOne (events.js:96:13)
at Peripheral.emit (events.js:188:7)
at Noble.onServicesDiscover (C:\Users\COld\node_modules\noble\lib\noble.js:247:16)
at emitTwo (events.js:106:13)
at NobleBindings.emit (events.js:191:7)
at NobleBindings.onServicesDiscovered (C:\Users\COld\node_modules\noble\lib\hci-socket\bindings.js:305:8)
at emitTwo (events.js:106:13)
at Gatt.emit (events.js:191:7)
at Gatt. (C:\Users\COld\node_modules\noble\lib\hci-socket\gatt.js:361:12)`

@KoroNiko
Copy link

KoroNiko commented Jul 1, 2018

Hey maybe I'm a bit late but I just encountered the same problem today. Check the accelerometer.js script on the examples folder. My guess is that you have to include the
ganglion.once(k.OBCIEmitterGanglionFound, (peripheral) => {
event to get it working. Check the script for the full code.

Hope that helps!

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

2 participants