...
For example, if you see that the 21st octet of the hex message has is "02" (when converting the value "02" - " from hexadecimal to binary it is "0010" → 2nd bit is set to 1) → it means that the device was tilted. If you see "04" - " (hex "04" to bin is "0100" → 3d bit is set to 1) → it means that the device was dropped (freefalling triggered). If you see "38" - (hex to bin it is "00111000" → 4th, 5th, and 6th bits are set to 1) → it means that when the advertisement was sent, the accelerometer detected an impact/wake-up on all 3 x/y/z-axis.
More examples (the device was thrown/pushed or in other words, Bluetooth tag movement was initiated)for 21 octet's value):
- "08" is the impact on just the x-axis;
- "18" is the impact on the x and y-axis;
- "28" is the impact on the x and z-axis;
- "10" is the impact on just the y-axis;
- "30" is the impact on y and z-axis;
- "20" is the impact on just the z-axis.
MikroTik PDU Payload structure
0 | 15 | ManufacturerData | company identifier |
1 | FF | ManufacturerData | company identifier |
2 | 4F | ManufacturerData | company identifier |
3 | 09 | ManufacturerData | company identifier |
4 | 01 | Version | the version of this advertisement structure |
5 | 00 | UserData | user-configured part of the payload |
6 | xx* | Secret | secret: salt |
7 | xx* | Secret | secret: salt |
8 | xx* | Secret | secret: acceleration on the X axis |
9 | xx* | Secret | secret: acceleration on the X axis |
10 | xx* | Secret | secret: acceleration on the Y axis |
11 | xx* | Secret | secret: acceleration on the Y axis |
12 | xx* | Secret | secret: acceleration on the Z axis |
13 | xx* | Secret | secret: acceleration on the Z axis |
14 | xx* | Secret | secret: temperature |
15 | xx* | Secret | secret: temperature |
16 | xx* | Secret | secret: uptime |
17 | xx* | Secret | secret: uptime |
18 | xx* | Secret | secret: uptime |
19 | xx* | Secret | secret: uptime |
20 | 00 | Secret | secret: flags |
21 | 64 | Secret | secret: batteryPercentage |
* - can vary
An example of the payload would be:
15ff4f090100cea6000000000200a01c91085700005f |
---|
15ff4f09 (first 4 octets) → ManufacturerData. Is the same for every MikroTik format's payload.
01 (5th octet) → Current version of the payload's structure. Should be the same for every payload.
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.
iBeacon packet structure
iBeacon is one of the supported advertising packet types. You can find more information about the protocol following the link.
...