node-beacon-scanner
node-beacon-scanner copied to clipboard
RangeError: Index out of range on Rasbpi
I'm getting this error every few seconds when running exactly the simple quick-start code from the readme.
`buffer.js:977 throw new RangeError('Index out of range'); ^
RangeError: Index out of range at checkOffset (buffer.js:977:11) at Buffer.readUInt16LE (buffer.js:1023:5) at BeaconParser._detectBeaconType (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/parser.js:102:18) at BeaconParser.parse (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/parser.js:39:25) at BeaconScanner.parse (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/scanner.js:112:23) at Noble.noble.on (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/scanner.js:72:25) at emitOne (events.js:116:13) at Noble.emit (events.js:211:7) at Noble.onDiscover (/home/pi/GitHub/transition/bt-node/node_modules/noble/lib/noble.js:178:10) at emitMany (events.js:147:13)`
This does not happen with the same code on my OS X machine, but does happen on my Raspberry Pi 3 B.
I believe this is an issue with one of the devices in my vincinity broadcasting a wrongly formatted BT advertisement. Unfortunately, it's none of my devices so I can't check which one it is. What can I do? Also, shouldn't this error be caught by the catch in the start scanning function?
Thank you for your feedback. Your feedback is really helpful because I don't have any beacon which broadcasts unexpected packets.
This issue is a bug. This module checked packet size loosely. I updated this module. Try the latest version.
Hello,
just to let you know, i have the same problem.
Thank you for your support ;) Y.
@YoussF, do you have the problem with your beacon even now?
hello sir, Can you or anyone help me with same results of ibeacon packets in python3, i am new to raspberry pi 3b+ and i am not able to do that from past 2 weeks?
#urgent #ibeaconscannerinpython3