• Ahh, ok - I just changed the UUIDs to those for Nordic UART and everything works perfectly.

    I'd be pretty sure then that the Bluetooth device you're connecting to advertises that the characteristic does 'write with response', but doesn't actually send a response back. Espruino waits for a response and after 15 secs it times out and disconnects.

    You might be able to hack around it with:

    ...
       }).then(function(characteristic) {
          console.log("Writing !");
          digitalPulse(LED3,1,[10,200,10,200,10]);­
          characteristic.properties.writeWithoutRe­sponse = true; // override BLE characteristic data
          return characteristic.writeValue([JSON.stringif­y({"chan" : 6, "v" : global_counter++})]);
        }).then(function() {
    
About

Avatar for Gordon @Gordon started