• Thanks @Gordon . The connection interval helps immensely! Thank you for directing me to that.

    I've just numbered the below so that it's clear they are unrelated to each other!


    I will work through how to add a some good error handling. Currently I think one of the "tasks" got "lost", so any writeValue() now fails with:

    Uncaught Error: Unhandled promise rejection: Error: BLE task 6 is already in progress


    I've held BTN3, launched my app again, but my target BLE device has maintained the connection state, yet my app doesn't know about that. For robustness, maybe I need to store gatt in some kind of global that persists outside my app?


    In http://www.espruino.com/modules/ble_simp­le_uart.js -

        function sender(resolve, reject) {
          if (text.length) {
            c.writeValue(text.substr(0,20)).then(fun­ction() {
              sender(resolve, reject);
            text = text.substr(20);
          } else  {

    Why is it catch(reject), not catch(reject()) ?


Avatar for John @John started