Glad you got it sorted! Right, I think I know what the problem was then. Gadgetbridge is looking for lines of data sent to it of the form {....}.
However by default Bangle.js/Espruino has a REPL on the same Bluetooth UART, so it's got a > prompt displayed at the start of the line.
Normally when you do Bluetooth.println you bypass all that, but because you call console.log("HELLO"); that outputs HELLO plus > on the new line, so next time you send you're sending >{...} which Gadgetbridge ignores.
Sending a newline before like you're doing solves it :)
Did I actually need the full android integration app with all the message and message icon dependencies to send info messages to the phone?
No, but Gadgetbridge sends messages of the form GB({...}) and it complains if there's an error. So it's worth defining function GB() {} to at least stop that error.
I'd still recommend the Android Integration stuff though as it does do quite a lot for you, including handling HTTP requests.
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.
Glad you got it sorted! Right, I think I know what the problem was then. Gadgetbridge is looking for lines of data sent to it of the form
{....}
.However by default Bangle.js/Espruino has a REPL on the same Bluetooth UART, so it's got a
>
prompt displayed at the start of the line.Normally when you do
Bluetooth.println
you bypass all that, but because you callconsole.log("HELLO");
that outputsHELLO
plus>
on the new line, so next time you send you're sending>{...}
which Gadgetbridge ignores.Sending a newline before like you're doing solves it :)
No, but Gadgetbridge sends messages of the form
GB({...})
and it complains if there's an error. So it's worth definingfunction GB() {}
to at least stop that error.I'd still recommend the Android Integration stuff though as it does do quite a lot for you, including handling HTTP requests.