I am trying to run the echo example with the latest version of bleno, but when I attempt to pair it crashes:
node echo/main.js
bleno - echo
on -> stateChange: poweredOn
on -> advertisingStart: success
(node:3716) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/crypto.js:60
var output = new Buffer(input.length);
^
TypeError: Cannot read property 'length' of undefined
at swap (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/crypto.js:60:33)
at e (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/crypto.js:37:9)
at Object.c1 (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/crypto.js:22:9)
at Smp.handlePairingRandom (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/smp.js:130:12)
at Smp.onAclStreamData (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/smp.js:58:10)
at AclStream.emit (events.js:327:22)
at AclStream.push (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/acl-stream.js:26:10)
at BlenoBindings.onAclDataPkt (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/bindings.js:194:21)
at Hci.emit (events.js:315:20)
at Hci.onSocketData (/home/dev/ble-light-js/node_modules/bleno/lib/hci-socket/hci.js:595:14)
bleno 0.5.1-3
nodejs v14.15.0
Linux 5.4.72 armv7l
I am trying to run the echo example with the latest version of bleno, but when I attempt to pair it crashes:
bleno 0.5.1-3
nodejs v14.15.0
Linux 5.4.72 armv7l