Enter the relay key (shown on the relay console) in the Relay Key field in the desktop IDE. At this point I can enter commands in the REPL (with an unfortunate amount of lag) and they run on the watch.
On the phone, switch back to Gadgetbridge and connect to the watch again.
(I couldn't connect the relay to the watch without first disconnecting the watch from Gadgetbridge, presumably because the watch isn't in "pairing" mode when it is connected to Gadgetbridge.)
Some downsides:
There is a lot of console noise in the desktop IDE, presumably from Gadgetbridge doing too much for the watch to handle (I see FIFO_FULL errors pretty frequently when connecting/disconnecting to Gadgetbridge).
Also, if the relay disconnects (such as if my phone goes to sleep), then I have to start all over. 🙁
Another solution I found that I might try (at least while developing) is checking the connected Bluetooth address using NRF.getSecurityStatus().connected_addr and mocking out the http call if it's not my phone's address. (It would be really nice if I could just call some magical Bangle.isGadgetbridgeConnected() method, but I haven't found anything like that.)
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.
That works, thanks! The relay is a little slow, but I am able to make http requests from the IDE now.
I had to connect in this specific order, in case that helps anyone else:
(I couldn't connect the relay to the watch without first disconnecting the watch from Gadgetbridge, presumably because the watch isn't in "pairing" mode when it is connected to Gadgetbridge.)
Some downsides:
There is a lot of console noise in the desktop IDE, presumably from Gadgetbridge doing too much for the watch to handle (I see
FIFO_FULL
errors pretty frequently when connecting/disconnecting to Gadgetbridge).Also, if the relay disconnects (such as if my phone goes to sleep), then I have to start all over. 🙁
Another solution I found that I might try (at least while developing) is checking the connected Bluetooth address using
NRF.getSecurityStatus().connected_addr
and mocking out the http call if it's not my phone's address. (It would be really nice if I could just call some magicalBangle.isGadgetbridgeConnected()
method, but I haven't found anything like that.)