Edit: this (my suggestion) is not going to work for you. The callback fires immediately on upload, no connection required.
Send some dummy data? This method offers a callback on send. But I don't know if this guarantees data is received, and by extension a connection. Suspect not.
The ble_hid_keyboard module uses it: https://www.espruino.com/modules/ble_hid_keyboard.js
© Espruino, powered by microcosm.
Report a problem