Versions Compared

Key

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

...

TG-BT5-OUT is a new addition to our MikroTik equipment. It is a Bluetooth tag (a very small gadget) that can be attached to other equipment or other belonging. Bluetooth tags play a big role in IoT topologies, where Bluetooth is used to broadcast the data over short distances. Once installed and configured, the tag will broadcast advertising packets in iBeacon, Eddystone, or Mikrotik telemetry (default packet format) to the gateway (for example, KNOT). Gateway, on the other hand, pushes the advertising packet payload to the remote server utilizing MQTT or HTTP protocols.

Initial steps

In order to configure the MikroTik Bluetooth tag, you have to set it into configuration mode.

This can be done by putting a magnet (any magnet - strong or weak) to the left side of the tag (as shown in the pictures below). You will see a green LED shining on the left side of the case. When the LED goes off (approx. 10 seconds), the tag will be set to configuration mode and should be reachable from our mobile app.

...

Tag modes and initial steps

Factory sleep mode is a default mode that the device uses. In this mode, all components are shut-down as much as possible and MCU is put into the deepest possible sleep state. The current draw is reduced to a minimum so this is the preferred mode to use when the tag is not used to maximize battery life. To exit this mode a reed switch is used. If it’s active for 3-10 seconds, the factory sleep mode will be deactivated and MCU will enter Advertising mode. In advertising mode, the tag will broadcast information about itself in Bluetooth advertising packets. By default, the MikroTik advertisement is sent once every 5 seconds. This can be changed in the Configuration mode. Configuration mode can only be entered from advertising mode by applying a magnetic field to the same reed switch that was used for exiting factory sleep. When the reed switch is active for 5-10 seconds configuration mode will be entered. Otherwise, MCU will go back into advertising mode.

Using the reed switch means putting the magnet over the device for a specific time (depending on the mode you wish the device to be in).

Image AddedImage Added

Install the "MikroTik Beacon Manager" application and run the app.

Upon the first login, you will see the list of "beaconed" devices.

General app settings

There are 3 options available on this screen:

...

Image Removed

...

Image Removed

...

Image Removed

...

...

To enter "APP" settings or to "batch" configure multiple tags

...

Image Removed

...

Image Removed

...

In the "APP" settings you have an option to configure an interval with which the phone scans for the nearby tags (that show up in the list of "beaconed" devices):

Image Removed

You can enable the "Save triggers" option (which will save detected triggers in the database) that will show triggers under "Sensor Triggers" (otherwise, if not enabled, "Sensor Triggers" data will be erased as soon as the app is closed):

Image Removed

And, lastly, in the settings menu, you can check the current app version.

"Batch Configuration" allows you to import (previously exported) tag configuration and apply it to multiple not-yet configured tags at once.

Preparation for the tag configuration

...

The app will show general information about the tag in the "Status" tab (as shown in the screenshot above).

Tag configuration

Configuration can be altered in the "Settings" tab (settings shown in the screenshots below are "factory-default" settings):

Image RemovedImage Removed

Amongst the options, you can change the "Beacon" settings and "Accelerometer" settings.

Beacon settings

In advertising mode, the tag will broadcast information about itself in Bluetooth advertising packets. The information depends on the advertising packet type.

At the moment these are all the supported types:

Blyott, Eddystone-TLM, Eddystone-UID, MikroTik, and iBeacon.

Each type has an option to configure 4 parameters:

Image Removed

...

whether to send an advertisement when the accelerometer detects a tilt trigger

...

Accelerometer settings

In this menu, you can set up thresholds for the triggers.

Image Removed

...

  • Full Scale (2g...16g) - measurement range
  • Threshold (5...16) - the threshold for a free-fall function

...

Data logs

Image Removed

In the "Configure logging" menu, you can set up logging settings. The logged messages will be displayed in the "Data Logs" menu.

Image Removed

You have an option to set up an interval so that data logs would get automatically saved every "x" seconds.

Another option is to enable "Log Triggers" (both options can be used together). Using this setting, the logs will be saved whenever the tilt, free fall, and impact actions are detected.

You can set up which parameters are going to be logged in the "Field config" section.

System

In the "System" tab you can view the logs (access to saved info, error and other log messages), put the tag into factory sleep (if the mode is enabled, MCU will wait for the client to disconnect and then enter Factory sleep mode) and upgrade the firmware.

...

Enters factory sleep mode

...

Import/Export

Image Removed

Lastly, you can also import/export the tag configuration using the buttons shown in the screenshot abovewill allow you to alter the tag's setting using the "Settings" tab (as shown in the screenshot above).