Android Question BLE ReadData2

SteveTerrell

Active Member
Licensed User
Longtime User
Hi,

I am using a Texas SensorTag(mk 2) with Android 6 and latest B4A.

The BLE demo program works well and is a great starting point, thanks.

The optical sensor service appears to be : f000aa70-0451-4000-b000-000000000000

and there are 3 Characteristics
DataAA71*R/N2LightLSB:LightMSB





ConfigurationAA72*R/W1Write 0x01 to enable data collection, 0x00 to disable.
PeriodAA73*R/W1Resolution 10 ms. Range 100 ms (0x0A) to 2.55 sec (0xFF). Default is 800 milliseconds (0x50).

I can enable the optical sensor with a WriteData to AA72.

B4X:
    manager.WriteData("f000aa70-0451-4000-b000-000000000000","f000aa72-0451-4000-b000-000000000000",Array As Byte(1))

When I use ReadData2 to get the sensor value (its in aa71) using
B4X:
    manager.ReadData2("f000aa70-0451-4000-b000-000000000000","f000aa71-0451-4000-b000-000000000000")

I get a Map back in Manager_DataAvailable with all three characteristics (aa71, aa72 and aa73) and their values.

Does anyone know if this is this as it should be? I expected just the requested Characteristic (aa71) back.

Steve
 
Top