Table of Contents |
---|
Introduction
TG-BT5-XX tags can operate in 4 different modes:
...
"AdvData" field structure (max 31 octets/bytes):
Length | length of the payload | 1 octet (15 ) |
Type | manufacturer specific data | 1 octet (ff ) |
ManufacturerData | company identifier |
2 octets ( |
15FF4F09
4F09 ) | ||
Version | the version of this advertisement structure | 1 octet (uint) |
UserData | user-configured part of the payload | 1 octet (uint) |
Secret | optionally encrypted (AES-ECB) part of the payload |
|
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. |
...
MikroTik PDU Payload structure
0 | 15 | ManufacturerData | Length | length of the payloadcompany identifier |
1 | FF | ManufacturerData | Type | manufacturer specific datacompany identifier |
2 | 4F | ManufacturerDataCompany identifiercompany identifier | MikroTik | |
3 | 09 | ManufacturerDataCompany identifiercompany identifier | MikroTik | |
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 | |
2164 | xx* | Secret | secret: batteryPercentage |
...
- - can vary
Example
An example of the payload configured in MikroTik's format (non-encrypted) would be:
...
15ff4f09 (first 4 octets) → ManufacturerData. Is the same (constant data) for every MikroTik format's payloadLength (0x15 hex-to-dec is 21). Type (0xff). Company identifier (0x4f09).
01 (4th octet) → Current version of the payload's structure. Should be the same for every payload (constant data).
...
5f (21st octet) → battery percentage of the tag = 95 %. 0x5f from hex to dec is95.
Info |
---|
Starting with v7.11, you can use the Peripheral Device section or/and Decode-ad feature to view decoded values! |
Script for decoding
Add a new script under the "System>Scripts" tab and import the script there (for non-encrypted payloads).
...
0 | 1a | ManufacturerData | company identifier |
1 | ff | ManufacturerData | company identifier |
2 | 4c | ManufacturerData | company identifier |
3 | 00 | ManufacturerData | company identifier |
4 | 02 | BeaconType | a secondary identifier |
5 | 1521 | RemainingDataLength | defines the remaining length for the payload in bytes |
6b2 | xx* | UserData | Proximity UUID |
7b9 | xx* | UserData | Proximity UUID |
88d | xx* | UserData | Proximity UUID |
9e4 | xx* | UserData | Proximity UUID |
10c8 | xx* | UserData | Proximity UUID |
111c | xx* | UserData | Proximity UUID |
1247 | xx* | UserData | Proximity UUID |
13c2 | xx* | UserData | Proximity UUID |
14b1 | xx* | UserData | Proximity UUID |
154e | xx* | UserData | Proximity UUID |
1679 | xx* | UserData | Proximity UUID |
171b | xx* | UserData | Proximity UUID |
183e | xx* | UserData | Proximity UUID |
1955 | xx* | UserData | Proximity UUID |
2087 | xx* | UserData | Proximity UUID |
21ec | xx* | UserData | Proximity UUID |
22 | xx* | UserData | Major Number |
23 | xx* | UserData | Major Number |
24 | xx* | UserData | Minor Number |
25 | xx* | UserData | Minor Number |
26 | xx* | TxPower | indicates the signal strength at one meter from the device |
...
0 | 03 | CommonPayload | CompleteUUID |
1 | 03 | CommonPayload | CompleteUUID |
2 | aa | CommonPayload | CompleteUUID |
3 | fe | CommonPayload | CompleteUUID |
4 | 17 | CommonPayload | ServiceData |
5 | 16 | CommonPayload | ServiceData |
6 | aa | CommonPayload | ServiceData |
7 | fe | CommonPayload | ServiceData |
8 | 00 | CommonPayload | FrameType |
9 | xx* | UidPayload | Ranging Data |
10b2 | xx* | UidPayload | Nspace |
11b9 | xx* | UidPayload | Nspace |
128d | xx* | UidPayload | Nspace |
13e4 | xx* | UidPayload | Nspace |
14c8 | xx* | UidPayload | Nspace |
151c | xx* | UidPayload | Nspace |
1647 | xx* | UidPayload | Nspace |
17c2 | xx* | UidPayload | Nspace |
18b1 | xx* | UidPayload | Nspace |
194e | xx* | UidPayload | Nspace |
20 | xx* | UidPayload | Instance |
21 | xx* | UidPayload | Instance |
22 | xx* | UidPayload | Instance |
23 | xx* | UidPayload | Instance |
24 | xx* | UidPayload | Instance |
25 | xx* | UidPayload | Instance |
26 | 00 | UidPayload | RFU1 |
27 | 00 | UidPayload | RFU2 |
...