Skip to main content
Skip table of contents

GPS tracking of stationary assets with BLE tags

Any object can be integrated into the Internet of Things. The platform allows tracking not only movable objects but also stationary ones, like heavy equipment, agricultural equipment, cargo, goods, or security equipment. Installing GPS devices on each of these objects can be very expensive. Instead, it's more cost-effective to install one device on a vehicle or site and track all others with cheaper BLE tags.

In this tutorial, we'll discuss how to organize tracking for stationary objects, which GPS devices and tags will help gather the necessary data, and how to set them up using truck trailers as an example. We'll also cover how to obtain information about trips and usage for subsequent service work and what API calls will provide information about the tags. Additionally, we'll share other use cases based on real situations.

What you need to track stationary objects

Various devices are able to read data from BLE beacons: Galileosky, Quecklink, Ruptela, Teltonika, TopFlyTech. We will describe on example of Teltonika FMB920 model and BLE beacon Eye Sensor.
To begin tracking stationary objects, you'll need the following:

  1. A GPS device that can read BLE tags and is supported by the platform.

  2. BLE tags that are compatible with the GPS device.
    It's worth noting that many BLE tags can transmit information about temperature and humidity, as well as their battery charge. This enhances the ability of these tags to track information, but for our purpose, we'll focus on stationary objects specifically.

  3. Platform APIs that provide information about which GPS device a particular tag is near. To create custom solutions for your users using APIs, you'll need developers. Clients typically hire their own developers or contract third-party teams.

Now let's examine the procedure for implementing a real-world case study - tracking truck trailers for trip and usage information and subsequent service work.

How to configure your device

Follow these steps to configure your device on sending BLE beacon data to the platform:

  1. Download Teltonika Configurator. This application streamlines many settings at once. You can save the preset and use it on the FOTA Web to configure other devices, making the process more convenient.

  2. In the System tab, set the Data Protocol to Codec 8 Extended. This enables the device to work with BLE tags.

    How to configure your device

    Codec 8 Extended for BLE data processing

  3. Enable Bluetooth in the Bluetooth settings and choose either "Enable (hidden)" or "Enable (visible)". Otherwise, Bluetooth will be disabled.

    How to configure your device

    Enabling Bluetooth settings to send BLE data

  4. In Bluetooth 4.0 settings, disable Non-Stop Scan and configure Update Frequency and Scan Duration as 30 seconds. These settings optimize BLE scanning with the device.

  5. In Bluetooth 4.0 settings Advanced Mode Settings, load the EYE Sensor preset according to packet settings in the EYE app.

  6. Configure the MAC address of the sensor.

The device is now ready to transmit data from nearby tags to the platform.

How to get information about BLE beacons near the GPS device

On the platform side, there's a BLE beacon data entry object:

JS
{
  "tracker_id": 10181654,
  "hardware_id": "7cf9501df3d6924e423cabcde4c924ff",
  "rssi": -101,
  "get_time": "2023-04-17 17:14:42",
  "latitude": 50.3487321,
  "longitude": 7.58238,
  "ext_data": {
    "voltage": 3.075,
    "temperature": 24.0
  }
}

You can read information from it:

  • tracker_id - int. An ID of the tracker (aka "object_id").

  • hardware_id - string. An ID of the beacon.

  • rssi - int. RSSI stands for received signal strength indicator and represents the power of received signal on a device. According to it, you can understand how far away the beacon is from the tracker.

  • get_time - date/time. When this data received.

  • latitude - float. Latitude.

  • longitude - float. Longitude.

  • ext_data - object. Additional beacon data.

API calls to get information about BLE tags

There are two API calls that allow you to get all the necessary information about BLE beacons:

  1. The first call retrieves historical data from devices. You can set the "from" and "to" parameters for obtaining data during a specific period about connected BLE beacons. Since we need the information from the BLE tags' point of view, i.e., the trailers, let's request the information using the "beacons" parameter.
    Request example:

    JS
    curl -X POST 'https://api.navixy.com/v2/beacon/data/read' \
        -H 'Content-Type: application/json' \
        -d '{"hash":"59be129c1855e34ea9eb272b1e26ef1d","from": "2023-04-17 17:00:00","to": "2023-04-17 18:00:00","beacons": ["7cf9501df3d6924e423cabcde4c924ff"]}'

This will show which devices were in the vicinity of this BLE beacon during period.

Reply:

CODE
{
  "list": [
    {
      "tracker_id": 10181654,
      "hardware_id": "7cf9501df3d6924e423cabcde4c924ff",
      "rssi": -101,
      "get_time": "2023-04-17 17:05:42",
      "latitude": 50.3487321,
      "longitude": 7.58238,
      "ext_data": {
        "voltage": 3.075,
        "temperature": 24.0
      }
    },{//other objects per period
    },
    {
      "tracker_id": 10181654,
      "hardware_id": "7cf9501df3d6924e423cabcde4c924ff",
      "rssi": -101,
      "get_time": "2023-04-17 17:40:22", //a last point per period
      "latitude": 55.348890,
      "longitude": 6.59403,
      "ext_data": {
        "voltage": 3.075,
        "temperature": 24.0
  }
  ],
  "success": true
}

2. The second call retrieves information about currently connected beacons to a specific device. For example, if you want to know which trailer is currently near the device, use the following request:

Request example:

CODE
curl -X POST 'https://api.navixy.com/v2/beacon/data/last_values' \
    -H 'Content-Type: application/json' \
    -d '{"hash":"59be129c1855e34ea9eb272b1e26ef1d", "trackers": [10181654], "skip_older_than_seconds": 1200}

This will provide information that there's a trailer "7cf..." next to the device.

Response:

JS
{
  "list": [
    {
      "tracker_id": 10181654,
      "hardware_id": "7cf9501df3d6924e423cabcde4c924ff",
      "rssi": -101,
      "get_time": "2023-04-17 17:40:22",
      "latitude": 55.348890,
      "longitude": 6.59403,
      "ext_data": {
        "voltage": 3.075,
        "temperature": 24.0
    }
  ],
  "success": true
}

How to obtain information on usage times and trip details

We've already gathered historical data using the first of the presented API calls, which showed on which devices the trailer was displayed at a specific time. To get information about the journeys and usage time of this trailer, we simply need to use one of the two API calls:

  1. API call track/list to get trip information for the period. This will provide general information about the trips, such as where and when they started and ended, maximum speed, mileage, and more.
    Request:

    CODE
    curl -X POST 'https://api.navixy.com/v2/track/list' \
        -H 'Content-Type: application/json' \
        -d '{"hash": "59be129c1855e34ea9eb272b1e26ef1d", "tracker_id": 10181654, "from": "2023-04-17 17:00:00","to": "2023-04-17 18:00:00", "split": true, "limit": 3000, "filter": true, "include_gsm_lbs": true}'

    Response:

    CODE
    {
        "id": 11672,
        "start_date": "2023-04-17 17:05:42",
        "start_address": "10470, County Road, Town of Clarence, Erie County, New York, United States, 14031",
        "max_speed": 62,
        "end_date": "2023-04-17 17:40:22",
        "end_address": "Fast Teddy's, 221, Main Street, City of Tonawanda, New York, United States, 14150",
        "length": 18.91,
        "points": 59,
        "avg_speed": 49,
        "event_count": 3,
        "norm_fuel_consumed": 6.32,
        "type": "regular",
        "gsm_lbs": false
    }

    From this data, we can see that the trip lasted nearly 35 minutes (end_date - start_date), with an average speed of 49 km/h and a maximum speed of 62 km/h. The trip length was 18.91 km. This information allows us to determine how much to pay the driver for transporting the cargo, whether the contractual speed was exceeded, and other details. Additionally, the trip length can be used in the future to calculate the number of kilometers until the next maintenance of the trailer.

  2. If you want a detailed track record of the trailer where the beacon is installed for displaying it in a report, for example, you can use the track/read request. This will give us data on all the points received by the platform during the journey.
    Request:

    CODE
    curl -X POST 'https://api.navixy.com/v2/track/read' \
        -H 'Content-Type: application/json' \
        -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tracker_id": 10181654, "from": "2023-04-17 17:00:00","to": "2023-04-17 18:00:00", "filter": true}'

    Response:

    CODE
    {
        "success": true,
        "limit_exceeded": true,
        "list": [
            {
            "address": "10470, County Road, Town of Clarence, Erie County, New York, United States, 14031",
            "satellites": 10,
            "mileage": 0,
            "heading": 173,
            "speed": 42,
            "get_time": "2023-04-17 17:05:42",
            "alt": 0,
            "lat": 43.0318683,
            "lng": -78.5985733
            },
            {//other point objects per this trip
            }
        ]
    }

You can use these points together with your preferred maps API to display them on a map.

Other examples of using BLE tags and Navixy API

Here are some other examples of how to use BLE tags with a short algorithm to get the results you need:

Child seats

Child seats are mandatory for passengers traveling with children. If you or the user operates a passenger transportation service, knowing whether a child seat is available in a vehicle can help you quickly determine which drivers are suitable for certain passengers and avoid wasting time and fuel. You can also find out which driver currently has a child seat installed in their vehicle. Additionally, it's important to consider passengers with two or more children and identify cars equipped with more than one child seat.

To address this, you'll need to install a BLE beacon on each child seat. Next, let's say your transport booking app needs to request information from all drivers who have a child seat installed. To do this, use the beacon/last_values API call to gather information about which drivers can be assigned to a particular order.

You can also use the RSSI parameter to determine if the seat is located inside the vehicle or in the trunk. To accomplish this, you'll need to conduct a few tests. For example, if the RSSI value is lower in the passenger compartment than in the trunk, the seat is likely in the trunk. As a result, you can prioritize your search for vehicles – first, those with a child seat in the passenger compartment, and then those with a child seat in the trunk. This approach ensures that you efficiently match passengers with appropriate vehicles and drivers.

Agricultural machinery

Suppose your client has agricultural machinery that can be connected to various equipment. How can you track which tractor is using a seeder and which has a plow? This information will help you understand the frequency and extent of tool usage, and also determine their current location. This way, workers can spend more time working in the field rather than searching for equipment. To achieve this, install devices on tractors and combines, as well as in tool storage areas. Place one BLE beacon on each tool in a secure spot where it is difficult to remove, preventing it from getting lost during work. Next, to determine how long the tools have been in use, query the  beacon/read  API call. The information from the response will be helpful, just like with the trailers in our detailed example. To determine the location of a specific tool, query  beacon/last_values  with a search for beacons to identify where and on which device the tool is installed. This approach ensures efficient tracking and utilization of your agricultural equipment, ultimately increasing productivity.

Use on construction sites

Construction sites often have numerous tools and expensive equipment. While installing a beacon for tracking purposes is beneficial, another concern arises – how can you ensure that the equipment is tracked frequently, and that the GPS tracker doesn't run out of power? To monitor the usage and location of the equipment, BLE beacons can also come in handy.

The solution for construction sites can be similar to that of agricultural machinery – install devices on the machinery as well as on storage sites. This approach allows you to effectively track your valuable equipment, ensuring that it's being used efficiently and minimizing the risk of loss or misplacement. By keeping a close eye on your tools and machinery, you can optimize productivity at the construction site.

Indoor tracking

You can effectively track items indoors using the platform and BLE tags. All you need to do is install GPS devices in different parts of the warehouse or building and tag the objects you want to track. Here are a few examples:

  • Tracking employees in various areas of a warehouse or store: This allows you to know which area an employee is in or how many sales assistants are near the information desk. Having this information helps improve efficiency and ensures that staff members are where they need to be.

  • Tracking goods or machinery in different areas of the warehouse: Knowing the location of goods or equipment saves time, as you don't have to search for them throughout the warehouse. This streamlines the retrieval process, making your operations more efficient.

Tracking goods with BLE beacons

Utilizing BLE beacons for tracking can greatly benefit transport companies by allowing them to determine which truck is carrying a specific pallet of goods at any given moment. This method not only enables the tracking of goods' paths but also helps calculate transport costs more accurately.

By adopting this innovative approach, transport companies can enhance their operations, making them more efficient and precise. This ultimately leads to better service for clients and more streamlined business processes.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.