Versions Compared

Key

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

...

An example of the payload configured in MikroTik's format would be:

15ff4f090100cea6000000000200a01c91085700005f

15ff4f09 (first 4 octets) ManufacturerData. Is the same (constant data) for every MikroTik format's payload.

01 (5th octet)Current version of the payload's structure. Should be the same for every payload (constant data).

00 (6th octet) → Indicates that the payload is not encrypted. "01" would mean it is encrypted.

cea6 (7th and 8th octets) → data used for encryption.

0000 (9th and 10th octets) → acceleration on the X-axis at the moment of the broadcast = 0 m/s2. Check acceleration calculation for the Z-axis below.

0000 (11th and 12th octets) → acceleration on the Y-axis at the moment of the broadcast = 0 m/s2. Check acceleration calculation for the Z-axis below.

0200 (13th and 14th octets) → acceleration on the Z-axis at the moment of the broadcast = 0.0078 m/s2. To get the decimal value out of the hex format you will need to follow the steps:

  • As noted before, multi-byte values are in little-endian and that means, to calculate the realm value, you will need to switch octets places (switch octets order). So the first step is to swap places for the values from 0x0200 to 0x0002. 0x0002 converted from hexadecimal to decimal is 02.
  • Keep in mind that acceleration is in signed 8.8 fixed point format and that means that you basically need to divide the result by "256". The second step is to divide the value by 256 → (0x0002 hex or 02 dec)/256 = 0.0078 m/s2.
  • The same calculation principle applies to the acceleration for the X and Y-axis. In our example, they just happen to be 0 → 0x0000/256=0.

a01c (15th and 16th octets) → temperature detected by the tag in Celsius = 28.625 C. Temperature is in little-endian (as it is a multi-byte value) and it is in signed 8.8 fixed point format, so the same "formula" applies here as well:

  • 0x1ca0/256=28.625 C.

91085700 (17th to 20th octets) → tag's uptime in seconds = 5703825 s. 0x91085700 is in little-endian, so just swap the octets to 0x00570891 and the result is 5703825 in decimal. That is 1584.395833 hours or66-day uptime.

00 (21st octet) → trigger (flag) that sent the payload. If it is "00" it means that no trigger was detected and that it is just a periodically broadcasted payload (based on the advertisement interval configured for the tag). If the value would be "04" it would mean that the device was dropped (freefalling triggered). You can find more information on the "flags" and the "Secret" section above in the packet structure section.

5f (22nd octet) → battery percentage of the tag = 95 %. 0x5f from hex to dec is95.

iBeacon packet structure

...