Data format C5 (Cut-RAWv2)
Lifecycle: Beta. Last updated 2024-01-30
The data is decoded from "Manufacturer Specific Data" -field, for more details please check Bluetooth Advertisements section. Manufacturer ID is 0x0499
, which is transmitted as 0x9904
in raw data.
The format resembles original RAWv2, but acceleration is left out to leave 6 bytes for other information in primary advertisement.
The actual data payload is:
Not available is signified by largest presentable number for unsigned values, smallest presentable number for signed values and all bits set for mac. All fields are MSB first 2-complement, i.e. 0xFC18
is read as -1000
and 0x03E8
is read as 1000
. If original data overflows the data format, data is clipped to closests value that can be represented. For example temperature 170.00 C becomes 163.835 C and acceleration -40.000 G becomes -32.767 G.
Data field descriptions
Temperature
Values supported: (-163.835 °C to +163.835 °C in 0.005 °C increments.
Example
Humidity
Values supported: 0.0 % to 100 % in 0.0025 % increments. Higher values than 100 % are possible, but they generally indicate a faulty or miscalibrated sensor.
Example
Atmospheric Pressure
Values supported: 50000 Pa to 115536 Pa in 1 Pa increments.
Example
Battery voltage
Values supported: 1600 mV to 3647 mV in 1 mV increments, practically 1800 ... 3600 mV.
Example
Tx Power
Values supported: -40 dBm to +22 dBm in 2 dBm increments.
Example
Movement counter
Movement counter is one-byte counter which gets triggered when LIS2DH12 gives "activity interrupt". Sensitivity depends on the firmware, by default the sensitivity is a movement over 64 mG. The counter will roll over. Movement is deduced by "rate of change". Please note that the highest valid value is 254, and 255 is reserved for the "not available".
Example
Measurement sequence number
Mesurement sequence number gets incremented by one for every measurement. It can be used to gauge signal quality and packet loss as well as to deduplicated data entries. You should note that the measurement sequence refers to data rather than transmission, so you might receive many transmissions with the same measurement sequence number. Please note that the highest valid value is 65534, and 65535 is reserved for the "not available".
Example
Test vectors
These test vectors are based on ruuvitag-sensor project. The tests are bidirectional, decode-encode results in original raw data. Encode-decode must result in same values with given precision, but floating point rounding differences may occur.
Case: valid data
Raw binary data: 0x0512FC5394C37CAC364200CDCBB8334C884F
Case: maximum values
Raw binary data: 0x057FFFFFFEFFFEFFDEFEFFFECBB8334C884F
Case: minimum values
Raw binary data: 0x058001000000000000000000CBB8334C884F
Case: Invalid values
Raw binary data: 0x058000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Last updated