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

pairing failed: lib/hci-socket/crypto.js:60 TypeError: Cannot read property 'length' of undefined #22

Open
akvadrako opened this issue Nov 11, 2020 · 0 comments

Comments

@akvadrako
Copy link

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)
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