Using the BLE API

tl;dr
I got good readings from temperature sensors but neither from the light sensor nor the value of VWC using the BLE API.
However using the app the values seemed ok.
Now I don’t know if my sensor is broken, I am doing something wrong or the API isn’t up to date.

I have problems when I try to read sensor values from my FlowerPower by using the BLE API.
I connected to my FlowerPower using gatttool on Linux in interactive mode. Then I tried to get live sensor data as described on page 7 of http://developer.parrot.com/docs/flowerpower/FlowerPower-BLE.pdf
When I try to read the light sensor value I always get FF FF as response and for the VWC I always get 00 00.

I first thought the sensor may be damaged. But when I use the FlowerPower App I get good values for the VWC that change when I move the sensor a bit. The light sensor reading on the other hand gives me a constant 0.13 even when in direct sunlight or covered with my hand.
The temperature readings differ too between App and gatttool. The following describes what I did.

First I searched for the handles of the live service by using the primary command and got this

[...]
attr handle: 0x0023, end grp handle: 0x0059 uuid: 39e1fa00-84a8-11e2-afba-0002a5d5c51b
[...]

I then called
characteristics 0x0023 0x0059
and got this list

handle: 0x0024, char properties: 0x12, char value handle: 0x0025, uuid: 39e1fa01-84a8-11e2-afba-0002a5d5c51b
handle: 0x0028, char properties: 0x12, char value handle: 0x0029, uuid: 39e1fa02-84a8-11e2-afba-0002a5d5c51b
handle: 0x002c, char properties: 0x12, char value handle: 0x002d, uuid: 39e1fa03-84a8-11e2-afba-0002a5d5c51b
handle: 0x0030, char properties: 0x12, char value handle: 0x0031, uuid: 39e1fa04-84a8-11e2-afba-0002a5d5c51b
handle: 0x0034, char properties: 0x12, char value handle: 0x0035, uuid: 39e1fa05-84a8-11e2-afba-0002a5d5c51b
handle: 0x0038, char properties: 0x0a, char value handle: 0x0039, uuid: 39e1fa06-84a8-11e2-afba-0002a5d5c51b
handle: 0x003b, char properties: 0x0a, char value handle: 0x003c, uuid: 39e1fa07-84a8-11e2-afba-0002a5d5c51b
handle: 0x003e, char properties: 0x12, char value handle: 0x003f, uuid: 39e1fa08-84a8-11e2-afba-0002a5d5c51b
handle: 0x0042, char properties: 0x12, char value handle: 0x0043, uuid: 39e1fa09-84a8-11e2-afba-0002a5d5c51b
handle: 0x0046, char properties: 0x12, char value handle: 0x0047, uuid: 39e1fa0a-84a8-11e2-afba-0002a5d5c51b
handle: 0x004a, char properties: 0x12, char value handle: 0x004b, uuid: 39e1fa0b-84a8-11e2-afba-0002a5d5c51b
handle: 0x004e, char properties: 0x12, char value handle: 0x004f, uuid: 39e1fa0c-84a8-11e2-afba-0002a5d5c51b
handle: 0x0052, char properties: 0x12, char value handle: 0x0053, uuid: 39e1fa0d-84a8-11e2-afba-0002a5d5c51b
handle: 0x0056, char properties: 0x12, char value handle: 0x0057, uuid: 39e1fa0e-84a8-11e2-afba-0002a5d5c51b

I first tried reading the values directly using the value handles but then realized, that those don’t show live data when I don’t activate live measurement first.

Calling

char-read-uuid 2902

gave me this list of notification handles

handle: 0x000f      value: 00 00 
handle: 0x0026      value: 00 00 
handle: 0x002a      value: 00 00 
handle: 0x002e      value: 00 00 
handle: 0x0032      value: 00 00 

I registered for the light sensor reading by writing 0100 to the handle 0x0026. After that I wrote A0 to handle 0x0039 which defines the live measure period. So from then on I got an

Notification handle = 0x0025 value: ff ff 

every 10 seconds. Looking at my characteristics list I confirmed that handle 0x0025 should be the light-sensor value.
After that I registered for soil temp (0x002a) and air temp(0x002e). To confirm that live data is read I placed the sensor in my hand and got changing values from the temperature readings. I converted them using the given formula in the API. First thought was they were far too high until I realized they are in °F and not °C. Converting them to °C gave me reasonable values.

Am I missing something? Is the BLE API up to date or is it just my sensor which is broken?

Thanks you in advence
Steffen

Hi Steffen,
If the Mobile App gives you correct values, it means that the probe is fine.
Be sure that the firmware of your probe is up to date (at least 1.1)
Then you can check the BLE using the “official” nodeJS Framework

The Test.Js reads live values.

Best,
Jerome