I am unable to read value from my nordic bluetooth device . I tried printing the characteristic value and below is the output
{ “_manager”: { /* Manager information */ },
“deviceID”: “My_Device_ID”, “id”: 9, “isIndicatable”: false,
“isNotifiable”: true, “isNotifying”: false,
“isReadable”: false, “isWritableWithResponse”: false,
“isWritableWithoutResponse”: false, “serviceID”: 7,
“serviceUUID”: “XXXX0001-XXXX-XXXX-XXXX-XXXXXX”,
“uuid”: “XXXX0003-XXXX-XXXX-XXXX-XXXXXX”, “value”: null }
Below is my code, to read notifiable value—
manager
.connectToDevice(‘My_Device_ID’)
.then(device => {
console.log(‘Connected to device:’, device.id);
// Monitor the characteristic for notifications
manager.monitorCharacteristicForDevice(
'D4:CB:F7:11:5E:C6',
'XXXX0001-XXXX-XXXX-XXXX-XXXXXX',
'XXXX0003-XXXX-XXXX-XXXX-XXXXXX',
(error, characteristic) => {
if (error instanceof BleError) {
console.error(
'Error monitoring characteristic:',
JSON.stringify(error),
);
return;
}
// Handle notifications received from the characteristic
console.log('Received notification:', characteristic.value);
},
);
Please help as I am unable to read the data from bluetooth device