BT Characteristic value change events don't associate per device #7752
-
I have my Bangle.js 2 acting as Central, connected to two peripheral devices with identical firmware (differing only in MAC address). I am trying to sort which device a notification of a characteristicvaluechanged comes from by id. Unless I'm missing something, it seems like the event argument passed to the
Am I implementing this incorrectly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Interesting, thanks - what you're doing there looks ok. I've just looked into this and there was a bug in the Bangle.js firmware (it was assuming that the handles received from the Bluetooth stack were unique, when they're only unique per-connection). Previously I'd been testing with different devices and those just happened to have their characteristics on different handle numbers and it was fine, but if you connect to identical devices you get identical handles. If you install a cutting-edge build now I think you'll find it works correctly. |
Beta Was this translation helpful? Give feedback.
Interesting, thanks - what you're doing there looks ok.
I've just looked into this and there was a bug in the Bangle.js firmware (it was assuming that the handles received from the Bluetooth stack were unique, when they're only unique per-connection). Previously I'd been testing with different devices and those just happened to have their characteristics on different handle numbers and it was fine, but if you connect to identical devices you get identical handles.
If you install a cutting-edge build now I think you'll find it works correctly.