While running the examples, whenever I try to pair with my phone the program crashes with this error:
bleno - echo
on -> stateChange: poweredOn
on -> advertisingStart: success
/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/crypto.js:60
const output = Buffer.alloc(input.length);
^
TypeError: Cannot read properties of undefined (reading 'length')
at swap (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/crypto.js:60:37)
at e (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/crypto.js:37:9)
at Object.c1 (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/crypto.js:22:9)
at Smp.handlePairingRandom (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/smp.js:127:14)
at Smp.onAclStreamData (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/smp.js:55:12)
at AclStream.emit (node:events:525:35)
at AclStream.push (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/acl-stream.js:20:12)
at BlenoBindings.onAclDataPkt (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/bindings.js:198:23)
at Hci.emit (node:events:513:28)
at Hci.onSocketData (/home/pi/Apps/blue/node_modules/@stoprocent/bleno/lib/hci-socket/hci.js:613:16)
Node.js v18.13.0
It appears that its receiving SMP_PAIRING_RANDOM before SMP_PAIRING_CONFIRM, so this._tk doesn't have a value yet... Any clues?
While running the examples, whenever I try to pair with my phone the program crashes with this error:
It appears that its receiving
SMP_PAIRING_RANDOM
beforeSMP_PAIRING_CONFIRM
, sothis._tk
doesn't have a value yet... Any clues?