Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

"AdvData" field structure (max 31 octets/bytes):

Lengthlength of the payload1 octet (15)
Typemanufacturer specific data1 octet (ff)
ManufacturerDatacompany identifier2 octets (4F09)
Versionthe version of this advertisement structure1 octet (uint)
UserDatauser-configured part of the payload

1 octet (uint)

Secretoptionally encrypted (AES-ECB) part of the payload
  • secret: salt (for encryption) = 2 octets (uint)
  • secret: acceleration (acceleration in signed 8.8 fixed point format - acceleration of all 3 axis (0=x, 1=y, 2=z)) = 6 octets (uint)
  • secret: temperature (ambient temperature in Celsius in signed 8.8 fixed point format) = 2 octet (int)
  • secret: uptime (uptime in seconds) = 4 octets (uint)
  • secret: flags (bit-mask of flags) = 1 octet (uint)
  • secret: batteryPercentage (battery level in percent) = 1 octet (uint)


Info

Please note that all multi-byte values are in little-endian. Meaning, that if, for example, you want to get the temperature value and #14 and #15 octets indicate the temperature as "a1 19" ("plus" temperature) → the real temperature value is going to be (0x19a1)/256 = 25.6 C.

...