How can the BangleJs read its own Bluetooth GATT Characteristic? #5308
Replies: 1 comment
-
Posted at 2022-10-19 by @fanoush There is onWrite event, see this 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) Posted at 2022-10-19 by @gfwilliams You might also be talking about writing to the UART RX characteristic ( 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: https://www.espruino.com/Reference#l_NRF_setServices Posted at 2022-10-21 by immrn I have to thank you @fanoush and @gfwilliams! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-10-19 by immrn
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.
Beta Was this translation helpful? Give feedback.
All reactions