How to get Luxometer data from Texas Instruments SensorTag
I'm developing an android app that reads data from Texas Instruments SensorTag CC2650.
I'm able to read battery level, and Temperature but I'm not able to read Lux data from opt sensor.
I'm getting the luxometer service from my gatt, then take the characteristic, set the value for enable the sensor, write the change, and finally I set the notification.
The problem is that the
method it's never invoked with the result.
Where is the error?
I'm able to read battery level, and Temperature but I'm not able to read Lux data from opt sensor.
Code:
if(service.getUuid().equals(UUID_OPT_SERV)){
luxService = gatt.getService(UUID_OPT_SERV);
BluetoothGattCharacteristic characteristic = luxService.getCharacteristic(UUID_OPT_CONF);
characteristic.setValue(new byte[] {0x01});
gatt.writeCharacteristic(characteristic);
gatt.setCharacteristicNotification(luxService.getCharacteristic(UUID_OPT_DATA), true);
lux = false;
break;
}
The problem is that the
Code:
onCharacteristicChanged(...)
Where is the error?



