It is a rather trivial task to track a vehicle. You just place a GPS tracker under the windshield, connect it to the vehicle’s power wires, optionally connect analog inputs, immobilizer, CAN-bus, sensors — whatever your business needs. Indeed, a vehicle is a super-suitable place to install GPS-tracker:
- it has a power source — GNSS positioning is a rather power-intensive algorithm
- it is protected from theft — even though a GPS-tracker costs several orders cheaper than the vehicle itself, some trackers may cost several hundred dollars. So it is worth keeping it safe
- it is protected from harsh weather conditions — the tracker must not be IP68 protected to function properly if it is installed inside the car.
|Usage||Tracker example||Works without a power source||Low price||IP code|
Any inexpensive tracker
Our “special” case
But what if we have some special case where we need to obtain the asset’s position while meeting the following requirements:
- no power source — must work from a battery for a long period
- not protected from illegal impact — must be cheap to make stealing pointless
- can be outdoor — must have IP68 protection or higher
This is actually a description of asset tracking — a highly demanded area of GPS monitoring dealing with physical assets. Here are some cases that may require the above criteria to be met:
garbage container tracking
E.g. a waste management organization can log exact data about each container. It is possible to install a tracker on the garbage truck but it is totally impractical to equip each container with a personal tracker.
construction tools inventory
E.g. an excavator can have several attachments. During operation, these attachments can move from one excavator to another, from location to location. You can install a tracker on the excavator but it is impossible to track every attachment. However such improvement will help optimize inventory management.
transportation equipment monitoring
E.g. glass transportation rack. It is used to safely transport windows from a manufacturer to where it should be installed. But the rack is not tied to the vehicle, so it can be left in the construction area. You can install a tracker to the vehicle itself but it may be problematic to have one on each rack.
All of the above examples share the aforementioned limitations (min. IP68, cheap, and battery-powered) and the fact that they are transported by vehicles that can be equipped with standard GPS trackers. The viable solution requires ingenuity and some flespi magic.
Meet BLE beacons: the mentioned IP68 BLE tag for asset tracking can work from the battery for up to 5 years and costs several times less than a GPS tracker. The beacon itself is used only to identify an asset, while the GPS tracker is responsible for telemetry. This manual describes how to set up a Teltonika device to scan the surrounding environment to capture the BLE beacon’s signals. Once the tracker reports the list of captured beacons IDs as a regular message along with other telemetry data, we need to apply some flespi magic to operate BLE beacons as usual tracking devices.
Note: other hardware manufacturers are also introducing the BLE beacon functionality for their devices. For instance, BLE tag parsing is also supported (and tested with flespi) by ATrack and Queclink devices.
How to configure Teltonika device to scan for BLE beacon IDs
We assume that you have successfully connected the Teltonika device to the flespi channel and registered the appropriate device. As this feature is rather new, you should also update your device to the latest firmware.
To see the beacon list in device messages, follow these steps (see screenshot below):
- Enable Bluetooth (no matter hidden or visible) in the Bluetooth section of the Settings tab
- Set Beacon detection to ALL
- Set other parameters according to your needs
- Turn OFF Non-stop scan
Another hint: as soon as the Teltonika device sends beacon list in AVL ID 385, you need to check that your device transmits data over Codec 8 Extended.
If you have no BLE beacon at hand, it is not a problem. You can simulate it using a smartphone app: Android or iOS. If you do everything right and the BLE beacon (or a simulator) is close to the tracking device, you will see the following message from your Teltonika device:
It means that the Teltonika device is set up correctly and the Bluetooth scanner has captured the signals from beacons.
Register BLE beacon devices
The magic on the flespi side is that somehow a single message with the BLE beacon IDs list must transform into the list of messages in the following way:
- Beacon ID must be used as an ident
- Individual beacon object parameters (like RSSI) must be stored in different messages
- Source device ident must be stored in the parameter ble.receiver.ident
- All other required telemetry must be saved to every beacon message
This task is solved by the ble-beacons channel. To set it up you need to specify the channel(s) with source messages in the Channel IDs field, valid token granting access to these channels, and an optional list of parameters to insert from the original message (by default all possible parameters will be injected from the source message to the separate beacons messages).
BLE-beacons channel is just an MQTT client that subscribes to messages from certain channels, so once new messages arrive, you will see the split messages in the channel’s Toolbox. You can optionally register flespi devices with BLE beacon ID as an ident. You can set up a stream to your platform (e.g. to Wialon) and operate your BLE-beacon devices there as regular trackers.
Extra case: BLE beacons for indoor monitoring
What if we use BLE beacons on moving objects and fixed GPS trackers inside rooms for Beacon detection and connectivity?
When you have 100 rooms and five trackable assets it is reasonable to place a beacon in a room and equip every asset with a tracker. But what if you have five rooms and 100 assets? With a personal tracking beacon there is no need to charge the carried device. It will also work on tracking objects where vehicle trackers cannot be installed.
The only caveat in the configuration is that GPS trackers will fail GNSS positioning indoors, thus their position must be specified in flespi.
The coordinates specified in the BLE Gateway Fix device configuration will be substituted for the BLE Beacon device’s messages. Moreover, there will be a parameter “ble.gateway.name” which may be used for the current device position status (room, part of the building, floor, etc.)
This approach may raise some reasonable concerns:
Such a solution might look a bit excessive because the GPS tracker here serves as a BLE gateway. That’s true. There are many specialized solutions for indoor monitoring. But here we offer a fully functional alternative with familiar devices that are already integrated into our platform and other business processes.
Each tracker has to be equipped with a SIM card for connectivity and power supply which limits the number of possible locations for tracker installation. But this may be considered an advantage — you have no single point of failure in the common network infrastructure. Monitoring of each room is independent.
GPS trackers in neighboring rooms might detect the same beacons. This might be solved by setting up a threshold RSSI level for each device in every room.
Note that this approach is not limited to purely indoor use cases. If you combine it with the functionality described above, you will be able to set up BLE Beacons tracking (with some limitations) both outdoors and indoors.
Any project relying on BLE Beacons is easy to implement using flespi with minimum effort from your side. Tell us about the cases you have in mind and we’ll consult you on how to best approach them with the existing functionality.
The described approach will allow you to establish asset tracking with BLE tags in a cheap and easy way. Obviously, there are some disadvantages the main being: you do not track the BLE beacon — you receive not the position of the beacon itself, but the position of the tracker when it captures the beacon’s signal and the signal’s strength. But the advantages and potential of this approach far outweigh the drawbacks.
P.S. Stay tuned for real-life use cases of asset tracking with BLE beacons.