-
However you'll notice that the "characteristicvaluechanged" callback is not firing
you're missing subscribing to notification step via
startNotifications()
see https://forum.espruino.com/comments/16752991/I found ESP32 Wroom-32 module and uploaded the very same sketch to it and from Bangle 2 it works almost fine. Like 9 out of 10 tries or even better. I've seen the same disconnect error but very very rarely - like 3 times out of many. Definitely never twice in a row.
OK, some progress on the original Bangle.js. It very rarely works (maybe 1 in 30 times), but I have observed it working and successfully reading out data from the characteristic:
gives:
However you'll notice that the "characteristicvaluechanged" callback is not firing. I left it running for several minutes and it didn't fire even once, so I think the "notify" response is not working. But this is progress, at least, and in the worst case I can probably read out the characteristic value on a timer, so there is light at the end of the tunnel!
It would still be better if it worked on Bangle.js 2, and if it worked every time instead of only 1/30 times.
(The MAC address is different because I'm using a different ESP32C3, but that's just an accident - it still doesn't work on the Bangle.js 2).