Most recent activity
-
Hi,
I just got a Bangle.js 2 for Christmas. I'm excitedly tinkering with it and enjoying it so far! One pain point I've run into is that
Bangle.http()
doesn't work (always times out) when connected to the WebIDE, since that function uses Gadgetbridge to make the actual request. This makes it a rather clunky process to develop code that uses that function - I have to make the changes in WebIDE, upload it to Bangle, disconnect the IDE, connect to Gadgetbridge, wait for GB to be ready for http requests, and then hope it works correctly because debugging will be difficult if it doesn't. 😅 Would it be possible to make the WebIDE recognize and answer (some subset of) GB commands from Bangle?
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.)