This may be a tough one to get to the bottom of since it might only happen once a week (sometimes more sometimes less).
I have a Puck that I use as a Bluetooth "button". Pressing the button causes it to advertise "on" or "off". Then I have a simple NodeRed setup that reacts to the change and turns on/off a light.
However at random intervals on the Node Red RaspberryPi, Noble crashes and takes down EspruinoHub. I've tried updating to latest EspruinoHub master a few times but that hasn't helped. Console output below.
I know it's probably more a bug for the Noble author but I wondered if anything obvious jumped out or if there was more debug output I could generate?
30:e1:37:00:43:1d - ? (RSSI -65)
48:d6:d5:58:3b:db - Office TV (RSSI -64)
fe9f => {"type":"Buffer","data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
fea0 => {"type":"Buffer","data":[3,250,143,202,150,110,139,98,32,32,32,15,255]}
98:7b:f3:96:06:28 - YUNMAI-SIGNAL-H1US (RSSI -82)
c0:28:8d:37:ae:15 - (RSSI -82)
c5:2e:b9:d5:27:a3 - Im On A Call Switch (RSSI -73)
ffff => {"level":0}
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 Gap.onHciLeAdvertisingReport (/home/pi/EspruinoHub/node_modules/noble/lib/hci-socket/gap.js:149:31)
at emitMany (events.js:147:13)
at Hci.emit (events.js:224:7)
at Hci.processLeAdvertisingReport (/home/pi/EspruinoHub/node_modules/noble/lib/hci-socket/hci.js:651:10)
at Hci.processLeMetaEvent (/home/pi/EspruinoHub/node_modules/noble/lib/hci-socket/hci.js:608:10)
at Hci.onSocketData (/home/pi/EspruinoHub/node_modules/noble/lib/hci-socket/hci.js:479:12)
at emitOne (events.js:116:13)
at BluetoothHciSocket.emit (events.js:211:7)
pi@raspberrypi:~/EspruinoHub $ ./start.sh
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
This may be a tough one to get to the bottom of since it might only happen once a week (sometimes more sometimes less).
I have a Puck that I use as a Bluetooth "button". Pressing the button causes it to advertise "on" or "off". Then I have a simple NodeRed setup that reacts to the change and turns on/off a light.
However at random intervals on the Node Red RaspberryPi, Noble crashes and takes down EspruinoHub. I've tried updating to latest EspruinoHub master a few times but that hasn't helped. Console output below.
I know it's probably more a bug for the Noble author but I wondered if anything obvious jumped out or if there was more debug output I could generate?