Skip to content

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

Description

@susy11

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions