I can not read characteristic from thermometer with Ionic

Home / android / I can not read characteristic from thermometer with Ionic

Question:
I am reading the characteristics of a thermometer, everything is fine, I can read the manufacturer, model and device name,

However, when I try to read the temperature characteristic this returns a value with a coding that I do not know. For example, for when the temperature that marks the thermometer is 25.1 what brings me back is this:
Image characteristic temperature

Could you help me solve this problem?

This is my code for read characterictic:$scope.attend = function(){
alert("***** SENT VALUES *****: nMAC ADDRESS:"+ $stateParams.id+"nID_SERVICE: "+service_id+"nID_CHARACTERISTIC: "+characteristic_id);
ble.read(
$stateParams.id,
service_id,
characteristic_id,
function(response){
//lert("Value Response: "+response);
////////////////////////////////////////////////////////////////////////////////////////////////////
var dbufferArray = String.fromCharCode.apply(null,new Uint8Array(response));
alert("Response: "+dbufferArray);
console.log("Response: "+dbufferArray);
////////////////////////////////////////////////////////////////////////////////////////////////////

I based this example:
Ionic bluetoothLE app


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *