Published: June 3, 2022
15 min read
Last updated: June 3, 2022
🤖 BLE Device: Tech Stack Basics Relevant for Integration
💼 Bluetooth, BLE & Fitness Industry Use Cases
📲 BLE Fitness Integration Process
🚴 Our Expertise: SportPlus & Multiple BLE Devices Integration
Smart fitness devices became users’ best friends after the COVID-19 pandemic boosted the switch of the world to remote working, studying, negotiating, you name it. Fitness wasn’t an exception and a lot of people started working out using various smart devices combined with an application.
Companies, on the other hand, had to dynamically adjust to current market needs and offer users a solution. For a lot of companies, the solution was a BLE-based fitness device paired up with a dedicated app.
Bluetooth Low Energy can support you on your way to providing each client with an innovative solution (image by MoRas ✪)
Here comes the question of what stays behind the scenes — how do you integrate those BLE devices into your app? Surely, the technical side isn’t something you have to perfectly understand as the provider unless you are the person who actually performs the integration.
Yet, our goal is to give you just about enough knowledge for you to be on the same page with the tech guys talking about BLE integration. Surely, we’ll also talk about enabling communication between BLE fitness devices and your app.
Additionally, we’ll look at some fascinating BLE-based fitness device use cases, give you insights on how to simultaneously connect several devices, and share our experience in the integration process for the projects in the fitness industry that Stormotion’s worked on.
At its core, Bluetooth Low Energy is a wireless network that’s used for connecting two or more devices with each other so they can communicate (exchange data, for the most part). The two keywords that describe BLE are low power consumption, high battery longevity, and rapid connection.
The BLE-based devices are extremely popular in the fitness industry exactly for these qualities — they enable companies to provide their customers with convenient solutions that require very little maintenance and zero technical knowledge to pair up with users’ devices.
Let’s start with some technical details. Firstly, the data transfer between two BLE-enabled devices is regulated by GATT. It stands for Generic ATTribute Profile and basically generally defines that two devices with an exclusive connection communicate using the Services and Characteristics concepts. Take a look at the following scheme and we’ll unpack it right after:
Each BLE device can be a Server and/or a Client (shots from O’Reilly)
Here’s a table that demonstrates the hierarchy of the GATT):
Blood Pressure Service
Device Information Service
Intermediate Cuff Pressure
Blood Pressure Measurement
Blood Pressure Feature
Manufacturer Name String
Hardware Revision String
Model Number String
Another essential part is the difference between central and peripheral devices. To begin with, central devices are the ones that initiate the connection, peripheral accept the requests. A central BLE device can be connected to multiple peripheral devices at the same time.
For peripheral devices, it’s the opposite — they can only be connected to one central device at a time. For example, your user’s phone (central) can be connected to a fitness band, a heart rate ring, and smart dumbbells (peripherals) simultaneously, while each one of these devices can be connected to a single mobile device.
Each specific device can be a peripheral or central device (image by Adafruit)
However, these are only some general rules. With a proper configuration, a device can be both at the same time, which enables peripheral devices to several connections to different central devices. Plus, the number of connections is technically unlimited, but in practice, there’s always a certain limit. For example, 20 connections are something totally reachable.
There are also such terms as GATT Client and Server, that are often compared with central and peripheral roles, but these are dissimilar concepts. The difference is that client and server terms refer to how the data flow and storage are managed, while central and peripheral roles define the connectivity structure.
The Client/Server relationship itself is pretty simple. Clients are devices accessing the data, Servers are the ones responsible for storing and providing access.
If you’d like to learn more technical details about BLE, feel free to follow the link to our article fully dedicated to BLE devices:
Bluetooth Low Energy FAQ: The Ultimate Guide on BLE Devices & iBeacons
Most likely, if you’ve come here with the request to learn about BLE-based fitness device integration, you already know why Bluetooth Low Energy is something you chose out of all the other wireless networks. However, there’s this network that always gets compared to BLE and is its ancestor — Bluetooth Classic or simply good old Bluetooth.
So, to better highlight the features of the BLE, let’s briefly discuss the main differences between these 2 networks. After that, we’ll give you a couple of fascinating BLE use cases in the fitness industry. You might get some inspiration for your own business or figure out what’s something you would avoid.
Since we’ve already talked about what BLE is, let’s briefly talk about Bluetooth Classic. It’s also a wireless network that establishes a connection between 2 Bluetooth-enabled devices (think about wireless earphones or speakers). Its main function is exchanging big amounts of data at close distances.
It’s pretty reasonable to compare Bluetooth Low Energy and Classic Bluetooth as they have pretty different use cases (image by Andrew Rosek)
The main significant difference between BLE and Bluetooth is that BLE is designed for smaller amounts of data transfers with lower battery consumption. The battery in BLE fitness devices can last for years. Thus, this option is much cheaper, compared to building Bluetooth-based devices. Bluetooth, on the contrary, is more pricey because it works with “heavier” data and requires more maintenance in terms of battery power.
Because of this difference, Bluetooth Low Energy is much more widespread in the fitness industry. It allows companies to provide their customers with user-friendly ready-to-use devices at a relatively low cost.
Another important difference is that Bluetooth Classic has an active connection for a limited period of time (from a couple of seconds to several hours). BLE, on the other hand, has a continuous connection in sleep mode, which is the main reason for lower energy consumption. Now, let’s take a look at how BLE devices can be used in the fitness industry.
Fitness bands and smartwatches are something that most of us know, have, or regularly use — this is one of the most widespread BLE use cases. However, the industry goes far beyond that and has a lot of fascinating technology.
BLE-based smart mats for exercise and yoga are able to analyze posture and exercise positions, provide users with recommendations on how to improve them, count the repetition of the exercise, keep a record of workouts to overview progress, etc.
Even a regular smartphone nowadays has an integrated Bluetooth Low Energy module so you simply have to build an app to enable each client to control such devices (image by Arman Rokni)
When it comes to providers of such mats, the market is full of them: YogiFi, SmartMat, Otari, and many others. The basic functionality is pretty much the same, but some providers offer additional features that surely increase costs. Otari, for example, has an AI-based camera that oversees people while exercising in real-time and provides voice-based instructions.
If you’d like to learn more about building yoga applications, we have an article about it, where we review the whole development process in detail:
How to Make an Own Yoga app like Asana Rebel?
There’s a start-up called Solos that offers smart glasses to their customers. Solos glasses were used by cyclists for training for the Olympic Games.
Such Bluetooth Low Energy devices can provide great support for those interested in sports (image by Dmitrii Kharchenko)
These glasses are BLE-based technology using Augment Reality features that are able to provide athletes with real-time data like speed, distance, cadence, calory count, heart rate, etc. Additionally, it can communicate with such popular cycling apps as Strava, MapMyRide, and TrainingPeaks.
Users can actually see the data in front of their eyes while wearing glasses. To see more visual content and videos on how the Solos are used, you can visit their Kickstarter page.
BLE doesn’t necessarily have to be about providing fitness devices to your customers — it can also be used for management & marketing services. Namely, you can use Beacons for such purposes.
Beacons are Bluetooth Low Energy devices that constantly radiate radio waves that other BLE- or Bluetooth-enabled devices can see. Their main purpose is “taking over” the device they communicate with to perform specific actions — open a webpage, start an app, launch a marketing campaign, etc.
Basically, when users’ devices get into a beacon’s range, they do what beacons ask them to, meaning you can easily use them for business purposes.
An app for Bluetooth Low Energy device control can also function as a support for gym management (image by Estimote)
Let’s take a look at use cases:
Whenever users approach a certain exercise machine, you can offer users watch a tutorial on how to use it or watch a guided workout.
When users leave the gym, you can send them information on how to avoid muscle soreness and appropriately recover.
Social Media Marketing
You can send users reminders to share their feedback with you/on social media, and offer incentives for that (like discounts, merch, extra classes, etc.).
All of that can be done even if you don’t have an app. However, in case you do, you get access to much more detailed customer information. It allows you to personalize your campaigns better and generally adjust your approach to clients’ needs.
In this section, we’ll talk about how you can enable communication between the fitness device and users' mobile devices. Your users are the ones who would perform the final connection by clicking the “Connect” button. What you have to do is take care of all the back- and front-end so users have a highly user-friendly solution.
Let’s first divide this section into 2 parts. In the first part, we’ll talk about integrating your application with BLE-based fitness hardware from third-party providers. In the second one, we’ll talk about connecting custom BLE devices with applications, which is a whole different process.
Let’s start with the first option.
The hardware part isn’t something you should worry about at all in this case. If you partner with a third-party device provider, you’ll most likely have a ready-to-use BLE-based fitness solution. They’ll also provide you with an SDK and/or API for building an app and/or establishing communication channels.
SDKs and APIs are two of the most important concepts when working with third-party providers. They’re often used in a bundle but can surely exist without one another.
An API is an intermediary between the device and the user. So, in your case, you’ll be enabling users to control a fitness device using your application. An SDK is a broader concept that combines several development tools for building an application for certain hardware of API.
Often, an SDK includes API as part of the development package. An API, on the contrary, can’t contain SDKs. To better understand the difference between these 2 concepts, you can watch this explanatory video:
The chances that your hardware provider won’t offer you an SDK/API as part of your cooperation are very little if not zero. In case that happens, they’ll most likely refer you to their partners who have solutions for their products specifically.
So, generally, the steps you should follow when opting for a partnership with a third-party fitness device provider are as follows:
Now, let’s take a look at what options there are for you in case you have a custom-built BLE fitness device.
We can’t say that it’s much more complex because practically, it’s still working with code. It’s not like a person without coding knowledge would be able to use API to perform the integration. So, if you have enough coding expertise yourself, an in-house development team, or a trusted Tech Partner, it shouldn’t be a problem. Let’s briefly talk about what you need for that.
Bluetooth Low Energy integration process will differ depending on whether you have a custom device or use one from a third-party provider (image by Ofspace LLC)
Of course, your device needs a well-functioning BLE module. If it works well, you need a library for BLE implementation for your specific framework. First, let’s cover what a library for a framework is.
Long story short, a library is a storage for prewritten code (files, functions, routines, etc.) that can be used for the development of applications and their integration with other applications, services, devices, etc.
So, a library for a framework implies the collection of code for this specific framework (React Native, Native Android, or any other one). In the following table, we’ve collected libraries for the most widespread programming languages:
Native iOS (Swift)
react-native-ble-plx (combines RxBluetoothKit & RxAndroidBle). Our team works primarily with this library
Then, your development team performs the integration using the corresponding library and enables the communication between the device and the app. That’s it, that’s how the whole magic happens.
The way we described it now might create an impression that the job is in fact pretty easy but don’t get us wrong — for it to be “easy”, developers need to have a high level of expertise.
Even though the general steps of enabling communication between BLE fitness devices and users is a common practice, developers need to have a high level of expertise to perform these steps time- and resource-efficient.
In this section, we’ll share our expertise in integrating BLE-based devices for the SportPlus app. The project is extremely useful to learn about as we’ll share how to approach the integration of several BLE fitness devices using one application.
Generally, SportPlus offers various exercise equipment and machines. The company asked us to build an app that would work with multiple fitness devices, meaning that we had to enable the communication for different BLE protocols.
Make sure to think about the server where you’ll store data (shots from SportPlus)
But what is a protocol after all? Basically, you can think about it as a language that the device “speaks” and that has to be used for communication. The fact of devices being based on the same wireless network (in our case, BLE) doesn’t mean, however, that they’ll have the same protocols.
So, the challenge comes when we have several BLE-based elliptical machines, for example, that all have different protocols for integration and communication. In other words, they all perceive commands and requests differently.
For example, one device doesn’t require anything for connection — you simply perform a BLE connection (enable the “Connect” button). Another protocol requires one line of code, and a third one might need 3 lines of code sent in a specific order with a predefined holdup.
The same thing works for communication itself. If we want to change the speed of some elliptical machines from different providers, the command for that can be different for all of them. Some might specifically require a line that starts with the “3, 2 …” number and ends with “20”. This is how the device will understand that it needs to do something with speed settings.
Following the general logic, all devices might have different line specifications for different commands. And every single detail from the order of numbers in the line to the line length is important — even the slightest deviation from the protocol will throw errors.
What’s even more exciting is that developers often don’t know what protocols they’re dealing with. Just like in real life: when you approach a person, you can’t be sure what language they speak so you start trying out every possibility.
In such cases, we try to communicate with the device using various numbers and command combinations to figure out what the device uses. Surely, there are some “unspoken” rules of how protocols are formed. It’s not like out of 1M fitness bands, each one of them has different protocols.
Once developers get a response in accordance with a certain protocol, they’re able to define its structure and easily communicate with the device.
Integrating several BLE devices with different protocols is pretty challenging yet simple with enough technical expertise (image by Kajetan Iżycki)
Here’s the summary of the steps you should take to integrate multiple BLE devices that have different protocols:
After reading this article, we hope you have a better understanding of how the whole integration process happens. With the right approach, integrating BLE fitness devices with your application can significantly improve the user experience your customers get.
Even though we’ve provided you with a general flow of how to approach the integration process, keep in mind that you’ll most likely need to adjust the process according to your business needs.
Was it helpful?
How to Make your React Native Application Accessible to ALL, not just to MANY
Case Studies: Success Stories of Businesses That Built and Launched SaaS Applications
Case Study: How We Solve Technical Challenges for Our IoT, Mobility, and Fitness Clients
Our clients say
They make the whole business work for us, and their improvements are fundamental to our operations. They’re reliable, honest, and willing to try new things that will help us. We appreciate how flexible and easygoing they are.
Pietro Saccomani, Founder