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: Cannot read property 'length' of undefined in smp.js #21

Open
susy11 opened this issue Oct 31, 2020 · 0 comments
Open

TypeError: Cannot read property 'length' of undefined in smp.js #21

susy11 opened this issue Oct 31, 2020 · 0 comments

Comments

@susy11
Copy link

susy11 commented Oct 31, 2020

Hello,

I'm running the latest version of the bleno package and when I'm trying to swtich from a paried phone to another phone i get this error:

/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/crypto.js:60
var output = new Buffer(input.length);
^

TypeError: Cannot read property 'length' of undefined
at swap (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/crypto.js:60:33)
at e (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/crypto.js:37:9)
at Object.c1 (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/crypto.js:22:9)
at Smp.handlePairingRandom (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/smp.js:130:12)
at Smp.onAclStreamData (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/smp.js:58:10)
at AclStream.emit (events.js:327:22)
at AclStream.push (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/acl-stream.js:26:10)
at BlenoBindings.onAclDataPkt (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/bindings.js:194:21)
at Hci.emit (events.js:315:20)
at Hci.onSocketData (/home/pi/NodeBLETest/node_modules/@abandonware/bleno/lib/hci-socket/hci.js:588:14)

Is there a way to bypass the pairing itself or the code that causes this issue?

The code runs on an RPi 4

Thanks!

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