Hi! I'm pretty sure you've his exactly this issue that was reported a few days ago: http://forum.espruino.com/conversations/363920/#comment15998892
I have no idea why this has happened yet but I will look into it very soon. For the moment you can almost certainly fix it by changing:
return device.gatt.connect(); }).then(function(g) { logMsg += "Connected\n"; digitalPulse(LED3,1,10); gatt = g; return g.getPrimaryService(primaryServiceUuid); }).then(function(service) {
to:
return device.gatt.connect(); }).then(function(g) { logMsg += "Connected\n"; digitalPulse(LED3,1,10); gatt = g; return new Promise(r => setTimeout(r,500)); //< ---------- added this delay }).then(function() { return gatt.getPrimaryService(primaryServiceUuid); }).then(function(service) { ...
@Gordon started
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.
Hi! I'm pretty sure you've his exactly this issue that was reported a few days ago: http://forum.espruino.com/conversations/363920/#comment15998892
I have no idea why this has happened yet but I will look into it very soon. For the moment you can almost certainly fix it by changing:
to: