Skip to content

buffer.js RangeError in PairingGeneralDataInputOutputCharacteristic onUnsubscribe #2

@ptthisdan

Description

@ptthisdan

Installed simnuki on Raspberry Pi Model 3B, followed instructions from the readme of this repo.

Anyhow every time try to get it work with the iPhone App, it throws 'index out of range' error after onUnsubscribe, like this:

pi@raspberrypi:~/simnuki $ node main.js
Initial configuration saved
Initial user configuration saved
on -> stateChange: poweredOn
on -> advertisingStart: success
on -> accept: 72:99:4d:33:17:ed
Creating new SL key pair...
Nuki is not initialized
on -> servicesSet: success
on -> mtuChange: 185
PairingGeneralDataInputOutputCharacteristic - onSubscribe
don't have more data to notify
UserSpecificDataInputOutputCharacteristic - onSubscribe
don't have more data to notify
Step 4: SL sending PK...
Step 4: SL sending PK...
Step 6: CL sent PK:
Step 7: creating Diffie-Hellman key...
Step 8: deriving long term shared key...
Step 9: creating one time challenge...
Step 12: creating authorization authenticator...
Step 13: CL sent authorization authenticator.
Step 14: verifying authorization authenticator...
Step 14: authenticators verified ok
Step 15: creating one time challenge...
Step 15: sending one time challenge...
Step 15: sending one time challenge...
Step 16: CL sent authorization data.
Step 17: verifying authenticator...
Step 17: authenticator verified ok.
Type is App
App ID: 899219594
Name: p t t his dan
Step 19: creating authorization-id command...
Step 18: new user p t t his dan with authorization id 1 added to configuration
Step 21: CL authorization-id confirmation
Step 22: Sending status complete.
CL sent CMD_REQUEST_DATA
CL requests challenge
NEW nonceK received
CL sent CMD_REQUEST_CONFIG
Nonce <Buffer 56 1c 43 4c fa d8 5f a1 db ae c6 d3 b3 30 b2 82 cf ae 37 ad 49 51 e7 62 d7 2b be a2 b3 fb 89 94> 32
CL sent CMD_REQUEST_DATA
CL sent CMD_NUKI_STATES
PairingGeneralDataInputOutputCharacteristic - onUnsubscribe
buffer.js:613
throw new RangeError('index out of range');
^

RangeError: index out of range
at checkOffset (buffer.js:613:11)
at Buffer.readUInt16LE (buffer.js:659:5)
at Gatt.onAclStreamEnd (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/gatt.js:283:68)
at emitNone (events.js:72:20)
at emit (events.js:166:7)
at AclStream.push (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/acl-stream.js:28:10)
at BlenoBindings.onDisconnComplete (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/bindings.js:161:21)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at Hci.onSocketData (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/hci.js:410:12)

or

pi@raspberrypi:~/simnuki $ node main.js
SL UUID: 29dfe2903aa611e7a700d58d74089f9a
on -> stateChange: poweredOn
on -> advertisingStart: success
on -> accept: 75:12:88:65:9a:dd
Creating new SL key pair...
Nuki is not initialized
on -> servicesSet: success
on -> mtuChange: 185
PairingGeneralDataInputOutputCharacteristic - onSubscribe
don't have more data to notify
UserSpecificDataInputOutputCharacteristic - onSubscribe
don't have more data to notify
CL sent CMD_REQUEST_DATA
CL requests challenge
NEW nonceK received
CL sent CMD_REQUEST_CALIBRATION
PIN 0
Calibrating
locked
unlocking
unlocked
unlatched
locked
CL sent CMD_REQUEST_DATA
CL sent CMD_NUKI_STATES
PairingGeneralDataInputOutputCharacteristic - onUnsubscribe
buffer.js:613
throw new RangeError('index out of range');
^

RangeError: index out of range
at checkOffset (buffer.js:613:11)
at Buffer.readUInt16LE (buffer.js:659:5)
at Gatt.onAclStreamEnd (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/gatt.js:283:68)
at emitNone (events.js:72:20)
at emit (events.js:166:7)
at AclStream.push (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/acl-stream.js:28:10)
at BlenoBindings.onDisconnComplete (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/bindings.js:161:21)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at Hci.onSocketData (/home/pi/simnuki/node_modules/bleno/lib/hci-socket/hci.js:410:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions