Versions Compared

Key

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

...

ManufacturerDatacompany identifier4 octets (15FF4F09)
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, if, for example, you want to get the temperature value and #14 and #15 octets indicate the temperature as "a1 19" → the real temperature value is going to be (0x19a1)/256 = 25.6 C.

UserData and Secret fields are configured with the help of flags. In the "UserData" section, the parameter that controls whether the "Secret" is encrypted or not is called FLAG_ENCRYPTED. When FLAG_ENCRYPTED=0, it means the secret is not encrypted (1st bit in 6th octet would be set to 0), and when FLAG_ENCRYPTED=1, it means the secret is encrypted (1st bit in 6th octet would be set to 1).

...