Thanks Gordon. Just tried latest Pixl.js build. The BLE error ended up being user error. If I don't use the full UUID for the characteristic then it should be 0x2A37 not "0x2A37".
So errors now gone but still no change notifications.
Note that a non-changing value can be read fine e.g. Body Sensor Position gives 1 (Chest) correctly with this:
return s.getCharacteristic(0x2a38);
Just looking at NRF Connect logs, it does gatt.setCharacteristicNotification(). Is that done under the hood in c.on('characteristicvaluechanged' ?
D 12:33:18.447 gatt.setCharacteristicNotification(00002a37-0000-1000-8000-00805f9b34fb, true)
D 12:33:18.448 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I 12:33:18.514 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A 12:33:18.514 "Notifications enabled" sent
V 12:33:18.519 Notifications enabled for 00002a37-0000-1000-8000-00805f9b34fb
I 12:33:19.314 Connection parameters updated (interval: 1012.5ms, latency: 0, timeout: 10120ms)
I 12:33:21.340 Notification received from 00002a37-0000-1000-8000-00805f9b34fb, value: (0x) 00-47
A 12:33:21.340 "Heart Rate Measurement: 71 bpm,
I found some info that says HRMs specifically need to be told to send updates, so I added:
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.
Thanks Gordon. Just tried latest Pixl.js build. The BLE error ended up being user error. If I don't use the full UUID for the characteristic then it should be 0x2A37 not "0x2A37".
So errors now gone but still no change notifications.
Note that a non-changing value can be read fine e.g. Body Sensor Position gives 1 (Chest) correctly with this:
Just looking at NRF Connect logs, it does gatt.setCharacteristicNotification(). Is that done under the hood in c.on('characteristicvaluechanged' ?
I found some info that says HRMs specifically need to be told to send updates, so I added:
But still no joy.