noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

Fresh Installation fails with error in crypto.js #403

Open Heite92 opened 6 years ago

Heite92 commented 6 years ago

I'm using a Raspberry Pi 3 with Stretch Lite. I tested several versions of node.js but there is always this error:

TypeError: Cannot read property 'length' of undefined
    at swap (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/crypto.js:60:33)
    at e (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/crypto.js:37:9)
    at Object.c1 (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/crypto.js:22:9)
    at Smp.handlePairingRandom (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/smp.js:130:12)
    at Smp.onAclStreamData (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/smp.js:58:10)
    at emitTwo (events.js:131:20)
    at AclStream.emit (events.js:214:7)
    at AclStream.push (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/acl-stream.js:26:10)
    at BlenoBindings.onAclDataPkt (/home/pi/evothings-examples/examples/rpi3-system-information/rpi3-application/node_modules/bleno/lib/hci-socket/bindings.js:198:21)
    at emitThree (events.js:136:13)

I already had it working once, but I decided to reinstall everything with a fresh installation, but now I can't get it to work again.

this is one tutorial I tried:

https://www.hackster.io/inmyorbit/build-a-mobile-app-that-connects-to-your-rpi-3-using-ble-7a7c2c

I also followed everything from the readme, this is really frustrating.