-
I used the code Gordon has here(*), the write command I was sending to espruino for the loop was this one insted of the one on the example, so it was quite big, not as big as it looks ofcource, I was just returning the id and numbers,a json, but is was not a problem at all if the signal was ok, the script (http://www.puck-js.com/puck.js) was handling it nicely, only when signal was near lost the dsd6 was rebooting. 150 ms interval.
if you use this github example on a phone with an espruino device, and add some code so that you can see a led go on and off at every interval run on the device, you will see it blinking slower as you make the make the signal worse. If not, then it is strange, maybe it is an older problem, but it sounds strange that it not known, even if solved.
connection.write( "lal=setInterval(function(){Bluetooth.println(JSON.stringify({dt:Date().toString().split(' ')[4],uv:scata.state.def.auto.uvc,ps:scata.state.is.sys.pause,bs:scata.state.is.sys.busy,db:scata.state.def.is.dbg,ac:scata.state.def.auto.clean,ad:scata.state.def.auto.delay,rtod:scata.state.is.sys.run,pos:scata.state.is.pos.ball,pwr:scata.state.is.sys.pwr,lit:scata.state.is.volt.litres,pbv:ew.is.ondcVoltage(),ss:scata.state.def.sandType[scata.state.def.is.sand].speed,sp:scata.state.def.is.sand,cb:ew.is.batt(),pb:ew.is.ondcVoltage(1)}));},150);NRF.on('disconnect', function() {clearInterval(lal)});\n",
which loop do you mean is there some specific looping code you can link (your code or that puck.js)? One idea is watchdog - if you have watchdog kicking in setInterval then any busy loop or delay in native code preventing intervals from running could trigger such reboot. Another issue causing this may be be overflowing the stack or memory - generating data faster than it could be sent filling memory or call stack (by somehow nesting calls when error happens?)