noble / noble-device

A Node.js lib to abstract BLE (Bluetooth Low Energy) peripherals, uses noble
MIT License
97 stars 66 forks source link

first issue... #1

Open mrose17 opened 10 years ago

mrose17 commented 10 years ago

i'm running the latest test.js from https://github.com/TheThingSystem/node-air-air

   mrose% node test.js 
   found b47e52dc92b546e6bdfbc5d5354c976f
   connectAndSetup
   readValues

   buffer.js:582
       throw new RangeError('Trying to access beyond buffer length');
             ^
   RangeError: Trying to access beyond buffer length
       at checkOffset (buffer.js:582:11)
       at Buffer.readUInt16LE (buffer.js:609:5)
       at /Users/mrose/Documents/projects/node-air-air/node_modules/noble-device/lib/noble-device.js:107:19
       at /Users/mrose/Documents/projects/node-air-air/node_modules/noble-device/lib/noble-device.js:69:5
       at Characteristic.<anonymous> (/Users/mrose/Documents/projects/node-air-air/node_modules/noble-device/node_modules/noble/lib/characteristic.js:40:7)
       at Characteristic.g (events.js:180:16)
       at Characteristic.EventEmitter.emit (events.js:98:17)
       at Noble.onRead (/Users/mrose/Documents/projects/node-air-air/node_modules/noble-device/node_modules/noble/lib/noble.js:263:20)
       at EventEmitter.emit (events.js:106:17)
       at nobleBindings.write.sendCBMsg.kCBMsgArgDeviceUUID (/Users/mrose/Documents/projects/node-air-air/node_modules/noble-device/node_modules/noble/lib/mac/mavericks.js:378:12)
sandeepmistry commented 10 years ago

@mrose17 thanks for reporting, I'll add a item on my list to include data range checking in ...