This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

recuperate a characteristic 's value from a Nordic device

I am trying to develop an application for the Android that will communicate via BLE to a Nordic device. I'm able to read the characteristic's value by BluetoothGattCharacteristic characteristic ; final byte[] data = characteristic.getValue();

but this method returns a value that is local to the application, when the Nordic device change the value of the caracteristic , the application is not able to recuperate it ! is there any one who can help me please? I have been having troubles with this for some time .thank you

Parents Reply
  • @rosa: When the characteristic changed the value locally (on the server), it's not possible for the client (the phone for example) to know that. You would need to notify the client by sending a notification from the server to the client. When the client receive the notification, you will have onCharacteristicChange callback. You can have a look at our ble_app_hrs example where we notify the heart rate measurement and the battery level.

Children
No Data
Related