• 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.writeWithoutResponse = true; // override BLE characteristic data
          return characteristic.writeValue([JSON.stringify({"chan" : 6, "v" : global_counter++})]);
        }).then(function() {
    
About

Avatar for Gordon @Gordon started