I've started building a web app that can connect to the bangle and send commands via bluetooth. All works well when using the built in service/characteristic:
however my aim is to stream accelerometer data from the watch, so I've been trying to write a watch app that exposes a custom service/characteristic to do this.
This is my first espruino device and my first use of web bluetooth - but as a start and following the code from this puck project: https://github.com/AkosLukacs/PuckStreaming/blob/master/src/PuckStreaming.js I've written a really simple watch app that I expected to expose a service that I can just read a value from -
You have to disconnect from the device for service advertisements to actually update.
Just tested your above snippet, and the new service shows up in nRF Connect, and does have a value of "Hello".
Get nRF Connect for your phone, makes quick checks really easy.
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.
I've started building a web app that can connect to the bangle and send commands via bluetooth. All works well when using the built in service/characteristic:
however my aim is to stream accelerometer data from the watch, so I've been trying to write a watch app that exposes a custom service/characteristic to do this.
This is my first espruino device and my first use of web bluetooth - but as a start and following the code from this puck project: https://github.com/AkosLukacs/PuckStreaming/blob/master/src/PuckStreaming.js I've written a really simple watch app that I expected to expose a service that I can just read a value from -
Opening the app on the watch and then attempting to use this service and characteristic from the web app I get:
Please can someone point me in the right direction as to why this isn't working?