31 August, 2023

Working with BLE beacons in flespi

Exploring different use cases of BLE applications for indoor monitoring.

Flespi has elaborate tools for working with BLE beacons and tags to facilitate the development of indoor positioning, asset management, and other solutions. Since the publication of our previous materials about the use of BLE for indoor monitoring, flespi functionality has significantly evolved. This article is intended to update you on what is currently available.

There is a common classification of BLE equipment and a specific technical classification that is aligned with how flespi handles different BLE-powered use cases.


ble beacons and tags


Traditionally, the BLE devices split into beacons and tags:

  • BLE beacons are usually mounted to a stationary surface and send only their ID, which is why they’re mostly used for indoor positioning and navigation.

  • BLE tags are small, simple, lightweight and are usually mounted on the movable object being tracked. They can usually detect temperature and humidity, and carry more information, such as a name or item characteristics.

In flespi we deal with BLE devices slightly differently depending on the use case.

BLE configuration options

Flespi offers two basic approaches to setting up Bluetooth equipment on the platform:

  1. The “BLE Beacon” device type — for moving BLE beacons (e.g. on equipment, employee, etc.) that register their coordinates (see Case 1 below)

  2. The ble-indoor-position plugin — for situations when you want to use the static BLE tag position indoors: either to add the BLE tag position to the device messages or to replace the device coordinates with the BLE tag coordinates (see Case 2 below).

Scenarios & implementation details

Let’s look at some most common scenarios of BLE beacons use and see how to efficiently implement them with flespi.

Case 1: determine moving BLE beacon position using fixed GPS tracker indoors

ble indoor monitoring

This is a very frequent situation, e.g. employees wear BLE-equipped badges and rooms in the office have GPS trackers mounted on the walls to collect the data from these badges. The goal is to monitor employee position, activity, congestions in certain areas, etc.

To implement this scenario in flespi you need to:

  • Set up your equipment to report BLE beacons list in regular reports to flespi. Finally you should have a regular flespi channel and devices where GPS tracker will report messages with ble.beacons array.

  • Create a ble-beacons channel to be able to collect messages from BLE beacons. Important! Use "Devices" as messages source in the ble-beacons channel configuration:


  • Register moving BLE beacons as “BLE Beacon” device type.

  • Create item-fields plugin with fixed values for position.latitude and position.longitude parameters. They will be added to each message registered by the original device (that will have no position parameters due to being inside the building and seeing no GPS signal), and then assigned to BLE beacons moving around. Reminder: Be sure to enable Bluetooth on the GPS tracker so that it can sense the BLE beacons around.

In addition, you may specify in the plugin any parameter that may carry extra information about the current device position (e.g., room, part of the building, floor, etc.).

Case 2: determine moving GPS tracker position indoors using fixed BLE tags 

This is the opposite case, e.g. a forklift equipped with a GPS tracker moves both inside and outside a warehouse, and it’s important to ensure consistent tracking. To make GPS tracker to detect position indoors, we employ BLE functionality. Here’s what we need to do in flespi:

  • Create a ble-indoor-position plugin and specify the identifiers of static BLE tags with their coordinates. Hint: for convenience, you can split the tags on the different floors or in different rooms or warehouses into different plugins with meaningful names.

  • Assign the plugin(s) to flespi devices that you intend to monitor indoors.

Now, once the GPS tracker gets indoors and loses view of satellites, its position parameters will be populated with the coordinates of the closest BLE tag (the one with the strongest signal level).

***

While GPS tracking is already taken for granted, indoor and blended (indoor/outdoor) monitoring find new applications in various industries. Patients, employees, equipment, gear, pallets, packages, defibrillators, whatnot — there are plenty of cases when knowing position (sometimes in 3 dimensions) inside the building opens businesses new opportunities for control, analytics, operational efficiency, and safety. If you have an indoor project in mind and want to implement it using flespi as a backend, contact us in the chat, share the details, and we’ll be happy to consult in detail.

P.S. This article is likely to be extended once our clients implement new use cases or when we release the new BLE-related functionality.