-
• #2
There is onWrite event, see
here https://gist.github.com/fanoush/04d0777f99bb4d153aa1a40aa218db55#file-desay-jseval-js-L11this is example of simple service that allows executing js code and passes back the output (but one can put anything else into handleLine method like e.g. AT commands parser)
-
• #3
You might also be talking about writing to the UART RX characteristic (
"6e400002-b5a3-f393-e0a9-e50e24dcca9e"
)...If that's the case then you're writing direct into the Bangle's REPL by default. So if you write JS followed by a newline then it'll just get executed. If you want to avoid that then you can move the REPL out the way, but I'd recommend just creating your own characteristic with:
Hi people!
I wanna build a application where an extension (Chrome browser) sends data to the BangleJs (via Bluetooth GATT). The extension successfully writes a value to the RX Characteristic of BangleJS. But how can my BangleJs read the value of this RX characteristic?
I searched several hours through the tutorials, api reference and in general, but couldn't find any example or snippet that answers my question.