...
The tags can be configured (using the MikroTik Beacon Manager app) to broadcast the payloads automatically, every "x" configured seconds or/and when a movement, tilt, or free-fall trigger is detected. That means the tag is able to "tell" all the surrounding "scanners" (like the KNOT) information about itself. When the payload is broadcasted by the tag, and the tag is within the KNOT's operating range, the KNOT will see the payload under its "scanner" Bluetooth interfacesection. It would look like this:
Code Block | ||
---|---|---|
| ||
/iot bluetooth scanners advertisements print Columns: DEVICE, PDU-TYPE, TIME, ADDRESS-TYPE, ADDRESS, RSSI, LENGTH, DATA # DEVICE PDU-TYPE TIME ADDRESS-TYPE ADDRESS RSSI LENGTH DATA 0 bt1 adv-noconn-ind mar/07/2023 12:11:4757 public DC:2C:6E:0F:C0:3D -39dBm51dBm 22 15ff4f090100a2eafefffcff0400cf18806b2b00006415ff4f09010079100000ffff0000cf188a6b2b000064 1 bt1 adv-noconn-ind mar/07/2023 12:11:5758 public DC2C:2CC8:6E1B:0F4B:C0BB:3D0A -51dBm49dBm 22 15ff4f09010079100000ffff0000cf188a6b2b000064 2 bt1 adv-noconn-ind mar/07/2023 12:11:58 public 15ff4f090100168dfefffffffeffa51ae1362200005e |
The example above shows us, that the KNOT sees two Bluetooth tags with MAC addresses "DC:2C:6E:0F:C0:3D" and "2C:C8:1B:4B:BB:0A
...
The payload itself", their respective payloads ("DATA" field) and the signal strength ("RSSI" field). When using RouterOS scripting, with the scheduler feature combination, we can make the KNOT automatically-periodically scan the payload list and, in case, a specific payload or a specific tag's MAC address is found on the list, we can make the KNOT structure an MQTT message (out of the information shown in the example above) and send it to the configured server. The actual script example will be shown later on in the guide.
As a result, when you have 2 KNOTs (KNOT-A and KNOT-B), running the same script on a scheduler, and the tag moves between their Bluetooth operating ranges, you will have the data on the server indicating whether it was KNOT-A or KNOT-B that have sent the tag's payload. That will help you figure out the proximity of the tag. Whether the tag is broadcasting payloads in the KNOT-A zone, or in the KNOT-B zone.
...