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!
(1)
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
(2)
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?
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.
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!
(1)
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:(2)
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?(3)
In http://www.espruino.com/modules/ble_simple_uart.js -
Why is it
catch(reject)
, notcatch(reject())
?