How to Build·14 min read

How to Build a Connected Fitness App With IoT Hardware Integration

Connected fitness apps live and die by how well they talk to hardware. This guide covers BLE and FTMS protocol implementation, real-time data streaming, multi-manufacturer testing, and every technical decision you need to get right.

Nate Laquis

Nate Laquis

Founder & CEO

Why Connected Fitness Is a Hardware Problem, Not Just a Software Problem

Most founders think building a connected fitness app is like building any other mobile app with a Bluetooth layer bolted on. That assumption will cost you six months and a lot of frustration. The reality is that connected fitness lives at the intersection of embedded systems, unreliable wireless protocols, and real-time data pipelines. Getting it right requires a fundamentally different engineering approach than building a standard workout tracker.

The connected fitness market is projected to exceed $30B by 2028, driven by products like Peloton, Wahoo KICKR, Technogym Live, and the explosion of smart home gym equipment. But the real opportunity is not in building another bike or treadmill. It is in building the software layer that connects all of them. Think of it as the "universal remote" for fitness equipment: one app that pairs with any manufacturer's hardware, streams metrics in real time, and delivers a cohesive workout experience regardless of the equipment brand.

If you have already explored how to build a fitness app, you know the fundamentals of workout logging, exercise libraries, and user engagement. Connected fitness takes all of that and adds a hardware communication layer that introduces latency constraints, protocol fragmentation, and device compatibility challenges you simply do not encounter in pure software products.

This guide walks through every major technical decision: BLE and FTMS protocol implementation, ANT+ support, real-time streaming architecture, device management, firmware updates, offline support, and the brutal reality of testing across dozens of hardware manufacturers.

Server infrastructure and data center equipment representing IoT backend architecture for connected fitness

BLE, FTMS, and ANT+: Choosing Your Communication Protocols

Protocol selection is the single most consequential architectural decision you will make. Get it wrong, and you are locked into a compatibility dead end. Get it right, and you can support hundreds of devices with a single codebase.

Bluetooth Low Energy (BLE) as Your Foundation

BLE is the universal language of connected fitness. Every modern phone supports it, every major equipment manufacturer uses it, and the power consumption is low enough to keep heart rate monitors running for months on a coin cell battery. You should build your entire hardware communication layer on BLE GATT (Generic Attribute Profile). GATT defines a hierarchy of services and characteristics that let your app discover what data a device can provide and subscribe to real-time updates.

Key BLE services you will implement:

  • Heart Rate Service (0x180D): Standard across virtually all chest straps and optical HR monitors. Broadcasts beats per minute, RR intervals, and sensor contact status. This is the easiest integration you will build.
  • Cycling Speed and Cadence (0x1816): Reports wheel revolutions and crank revolutions per update interval. You calculate speed and cadence from the delta between consecutive readings.
  • Cycling Power (0x1818): Broadcasts instantaneous power in watts, pedal balance, and accumulated torque. Power meters from Stages, Garmin, and Favero all use this service.
  • Running Speed and Cadence (0x1814): Reports instantaneous speed and stride cadence from foot pods or shoe-based sensors.

FTMS: The Game Changer for Equipment Control

The Fitness Machine Service (FTMS, 0x1826) is where things get really interesting. FTMS does not just read data from equipment. It lets your app control the equipment. You can set resistance levels on a smart trainer, adjust incline on a treadmill, or change the drag factor on a rowing machine. This is what enables structured workouts where the equipment automatically adjusts to match the workout plan.

FTMS defines machine-specific characteristics for indoor bikes, treadmills, rowers, cross trainers, and step climbers. Each has its own data format. An indoor bike characteristic reports cadence, resistance level, instantaneous power, and total energy expended. A treadmill characteristic reports speed, incline, and total distance. You will need to implement parsers for each equipment type.

One important caveat: FTMS adoption is widespread but not universal. Peloton does not use standard FTMS on its bikes. Some older Technogym equipment uses proprietary protocols. Wahoo supports FTMS on newer hardware but also maintains its own proprietary control protocol for advanced features. Plan your architecture to handle both standard FTMS and manufacturer-specific protocol adapters.

ANT+ for Legacy and Specialist Hardware

ANT+ is the older wireless protocol that dominated connected fitness before BLE took over. You still need to support it for one major reason: Garmin. Garmin's ecosystem heavily relies on ANT+, and a large percentage of serious cyclists and runners use Garmin sensors. ANT+ support on iOS requires an external dongle (like the CABLE from NPE), which limits adoption. On Android, some devices have built-in ANT+ radios, but support is inconsistent. Our recommendation: support ANT+ on Android where the hardware allows it, and focus on BLE for iOS. Most modern sensors broadcast on both protocols simultaneously (dual-band), so BLE coverage alone will reach 90%+ of users.

Real-Time Data Streaming Architecture

Connected fitness generates a firehose of data. A single workout session with a power meter, heart rate monitor, and cadence sensor produces roughly 3 data points per second per sensor. Over a 60-minute cycling session, that is over 30,000 individual data points. Your architecture needs to handle ingestion, processing, display, and storage of all of this without dropping frames or introducing visible latency.

On-Device Data Pipeline

The data flow on the mobile device follows a strict pipeline: BLE characteristic notification, raw byte parsing, unit conversion, smoothing/filtering, UI update, and local buffer for persistence. Each stage must complete in under 16ms to maintain 60fps rendering on the workout screen.

Here is how we structure the pipeline in practice:

  • BLE Layer: Receives raw byte arrays from GATT notifications. Runs on a dedicated background thread. Never touch the UI thread here.
  • Protocol Parser: Converts raw bytes into typed data models (HeartRateReading, PowerReading, CadenceReading). Each parser handles the specific bit-packing defined by the Bluetooth SIG specifications.
  • Data Smoother: Applies exponential moving averages to reduce noise. Heart rate data is relatively clean, but power data from single-sided power meters can be spiky. A 3-second rolling average smooths the display without hiding real efforts.
  • Metric Calculator: Derives secondary metrics from raw data. Calories burned from heart rate and user weight. Normalized power from raw power data. Training Stress Score from normalized power and FTP.
  • UI Renderer: Pushes processed metrics to the workout screen. Use reactive frameworks (SwiftUI Combine on iOS, Kotlin Flow on Android) to bind data directly to UI components.
  • Local Buffer: Writes every data point to a local database (SQLite or Realm) for workout history and sync. Buffer writes are batched every 5 seconds to minimize I/O overhead during the workout.

Backend Streaming for Live Classes

If your app includes live classes with synchronized metrics and leaderboards, you need a real-time backend. WebSockets are the right choice here, not HTTP polling. Each participant's device sends metric snapshots to the server every 1-2 seconds. The server aggregates these into a leaderboard state and broadcasts the updated leaderboard back to all participants.

For the backend, we recommend a pub/sub architecture using Redis Streams or Apache Kafka for message brokering. Each live class is a topic/channel. Participant metrics are published to the channel, and the leaderboard service subscribes to calculate rankings. The leaderboard service then publishes the ranked output to a separate channel that all clients subscribe to. This architecture scales horizontally. You can shard by class or by geographic region to keep latency under 200ms globally.

Multiple mobile devices displaying fitness metrics and workout data in real-time

Equipment Pairing, Device Management, and Session Handling

Device pairing is where most connected fitness apps lose users. If pairing takes more than 10 seconds or fails silently, people give up and leave a one-star review. You need to make this process bulletproof.

Scanning and Discovery

Start a BLE scan filtered by the GATT services you support (heart rate, cycling power, FTMS, etc.). Display discovered devices in a clean list with the device name, signal strength indicator, and the type of data the device provides. Users should see "Wahoo KICKR CORE - Smart Trainer" not "WAHOO-C2:4F:3A." Parse the advertised services to determine the device category and show a human-readable label.

Important implementation details:

  • Scan timeout: Set a 15-second scan window. If no devices are found, show a troubleshooting prompt (is the device powered on, is Bluetooth enabled, is the device already connected to another app).
  • Background reconnection: Store paired device UUIDs locally. When the user opens the app, attempt background reconnection to known devices before showing the scan screen. If the devices connect automatically, skip the pairing flow entirely.
  • Multi-device pairing: A serious cyclist might pair a power meter, heart rate strap, cadence sensor, and smart trainer simultaneously. Your BLE stack needs to maintain 4+ concurrent connections without degrading performance. Test this aggressively, because iOS limits concurrent BLE connections and will silently drop connections when the limit is reached.
  • Signal strength filtering: Filter out devices with RSSI below -80 dBm. These are too far away to maintain a stable connection during a workout and will cause intermittent dropouts that frustrate users.

Session Recording and Playback

Every workout session should produce a comprehensive activity file. The industry standard is the FIT file format (developed by Garmin), which stores timestamped records of every metric captured during the workout. FIT files are binary, compact, and supported by virtually every fitness platform (Strava, TrainingPeaks, Garmin Connect, Today's Plan).

Your session recorder should capture:

  • Timestamped heart rate, power, cadence, and speed at 1-second resolution
  • Lap markers (automatic by distance/time or manual user splits)
  • Equipment metadata (device name, manufacturer, firmware version)
  • Workout summary statistics (average/max power, average/max HR, total calories, TSS)
  • GPS coordinates if the workout includes an outdoor segment

For workout playback, store the raw time-series data and render it as interactive charts. Let users scrub through the timeline and see their metrics at any point in the ride. Overlay power zones, heart rate zones, and cadence targets so users can evaluate their performance against the prescribed workout.

Live Classes, Leaderboards, and Health Platform Sync

Live classes with synchronized metrics are the highest-value feature in connected fitness. They turn a solitary indoor cycling session into a competitive, social experience. But they are also the hardest feature to build well.

Live Class Architecture

A live class session involves three synchronized streams: video/audio from the instructor, real-time metrics from each participant's equipment, and the aggregated leaderboard. The video stream uses standard HLS or DASH adaptive bitrate streaming. Metrics and leaderboard data travel over WebSockets. The challenge is synchronizing these streams so the leaderboard updates feel instantaneous relative to the instructor's cues.

Target latency for the metrics channel: under 500ms end-to-end. This means the time from a user's power meter broadcasting a reading to that reading appearing on every other participant's leaderboard should be half a second or less. You achieve this by keeping the WebSocket connection persistent, using binary message encoding (MessagePack or Protocol Buffers, not JSON), and running your WebSocket servers in multiple regions with geographic routing.

Leaderboard Systems

Leaderboards in connected fitness are more nuanced than simple ranked lists. You need to account for fairness. A 200-pound rider will generate more absolute watts than a 130-pound rider on the same effort level. The standard solution is to rank by watts per kilogram (W/kg), which normalizes for body weight. You should also offer multiple leaderboard views: overall ranking, age group ranking, gender ranking, and personal best comparison.

For on-demand classes (recorded, not live), leaderboards are computed asynchronously. When a user completes a class, their metrics are compared against all previous completions of that same class. This requires storing per-class aggregate data and recalculating rankings as new completions come in. A sorted set in Redis is the most efficient data structure for this: ZADD to insert, ZRANK to retrieve position, ZRANGE to fetch the top N.

Apple HealthKit and Google Fit Integration

Health platform sync is not optional. Users expect their workout data to appear in Apple Health and Google Fit automatically. For a deeper look at wearable and health platform integrations, check our guide on how to build a wearable health app.

Implementation priorities:

  • Write workout summaries: After each session, write an HKWorkout (iOS) or ExerciseSessionRecord (Android) with total calories, duration, distance, and average heart rate.
  • Write granular samples: Push heart rate samples, active energy samples, and cycling/running distance samples at their original timestamp resolution. This gives users a rich view inside the Health app.
  • Read resting heart rate and VO2 max: Pull baseline fitness metrics from HealthKit/Google Fit to improve your calorie estimates and training load calculations.
  • Handle permissions gracefully: Users can revoke health data access at any time. Your app must degrade gracefully and never crash if a health data write fails.

Firmware OTA Updates and Offline Workout Support

Connected fitness equipment runs firmware, and firmware has bugs. Your app needs to handle over-the-air (OTA) firmware updates for the devices it connects to. This is especially important if you are building your own hardware, but even third-party integrations sometimes require firmware awareness.

OTA Update Management

If you manufacture your own sensors or equipment, implementing OTA updates through your app is essential. The standard approach uses the Nordic Semiconductor DFU (Device Firmware Update) protocol, which is supported by most BLE-capable microcontrollers (nRF52 series, ESP32). The update process involves transferring a firmware binary over BLE in small packets, validating the checksum on the device, and rebooting into the new firmware.

Critical rules for OTA updates:

  • Never interrupt a workout: Check for firmware updates when the app launches or when a device is paired, not mid-session. Queue the update and prompt the user after their workout is complete.
  • Require sufficient battery: Do not start a firmware update if the device battery is below 30%. A failed update due to power loss can brick the device.
  • Support rollback: Store the previous firmware version on the device so it can revert if the new firmware fails to boot. This is called a dual-bank update and is non-negotiable for production hardware.
  • Version pinning: Your app should know which firmware versions are compatible with which app versions. Maintain a compatibility matrix on your backend and enforce minimum firmware versions at pairing time.

Offline Workout Support

Your app must work without an internet connection. Users work out in basement gyms, hotel fitness centers, and rural areas with no cell signal. The core workout experience, including equipment pairing, metric streaming, and session recording, must function entirely offline.

The offline strategy:

  • Cache workout programs locally: When a user selects a training plan or downloads a class, store the entire workout structure (intervals, target zones, instructor cues) on-device. Pre-downloaded video content should be available for on-demand classes.
  • Queue sync operations: Completed workouts are saved to local storage and synced to the backend when connectivity returns. Use a reliable queue (WorkManager on Android, BGTaskScheduler on iOS) to ensure sync happens even if the app is backgrounded.
  • Resolve conflicts: If a user completes workouts on multiple devices while offline, your sync logic needs conflict resolution. Timestamp-based last-write-wins is sufficient for workout data since the same workout will not be completed on two devices simultaneously.
Development team collaborating on software project with laptops and whiteboards

Testing Across Hardware Manufacturers and Getting Started

This is the part of connected fitness development that nobody warns you about. Testing across hardware manufacturers is brutal, expensive, and absolutely essential. The Bluetooth SIG publishes specifications, but every manufacturer interprets those specs slightly differently. A power reading from a Wahoo KICKR, a Tacx Neo, and a Technogym Ride will all technically conform to the Cycling Power Service spec, but the byte ordering, update frequency, and edge case handling will vary enough to break your parser if you only tested with one device.

Building a Device Test Lab

You need physical hardware. There is no way around it. Simulators and mock data will get you through initial development, but production readiness requires real devices. Here is the minimum test lab we recommend:

  • Smart trainers: Wahoo KICKR (current gen), Tacx NEO 2T, Elite Direto XR. These three cover the majority of the indoor cycling market and each has distinct BLE behavior.
  • Heart rate monitors: Polar H10 (chest strap, gold standard), Garmin HRM-Pro Plus (dual ANT+/BLE), Apple Watch (optical). Test both chest strap and optical sensors since data quality and update rates differ significantly.
  • Power meters: Stages single-sided crank, Garmin Rally pedals, Favero Assioma Duo. Single-sided vs. dual-sided power meters report differently and your display logic needs to account for both.
  • Treadmills and rowers: At least one FTMS-compatible treadmill (Woodway, AssaultRunner) and one smart rower (Concept2 with PM5, WaterRower with S4 monitor). Rowing and running FTMS characteristics are structured differently from cycling.

Budget $5,000 to $15,000 for a starter test lab. It sounds like a lot, but shipping a connected fitness app that crashes when paired with a popular trainer will cost you far more in user trust and app store ratings.

Automated and Manual Testing Strategies

Write BLE integration tests using mock GATT servers. On iOS, use Core Bluetooth's CBCentralManagerMock (available in the testing framework). On Android, use the Nordic BLE library's mock capabilities. These let you simulate device connections, characteristic notifications, and disconnection scenarios without physical hardware. Use them for CI/CD pipeline testing.

For manual testing, create a structured test matrix. Every supported device gets tested against a checklist: discovery, pairing, data streaming accuracy (compare against a known reference), reconnection after dropout, multi-device simultaneous connection, and session recording integrity. Run this matrix before every release. It takes time, but there is no shortcut.

The Manufacturer Compatibility Challenge

Peloton uses a proprietary protocol and does not expose standard BLE services. Technogym supports FTMS on newer equipment but locks advanced features behind their own API. Life Fitness requires a partnership agreement to access their equipment's data streams. Concept2 supports BLE on the PM5 monitor but the data format has quirks that trip up generic parsers.

Our advice: start with fully standards-compliant equipment (Wahoo, Elite, Tacx) and expand manufacturer support incrementally. Publish a compatibility list in your app and be transparent about which devices are tested and supported. Users respect honesty about compatibility far more than they tolerate mysterious pairing failures.

Costs and Timeline

A connected fitness app with BLE equipment pairing, real-time metrics, workout recording, and basic leaderboards will take 5 to 8 months with a team of 3 to 4 engineers (2 mobile, 1 backend, 1 firmware/BLE specialist). Adding live class streaming and multi-manufacturer FTMS control pushes that to 8 to 12 months. Budget $250K to $500K for an MVP that covers the core connected experience across iOS and Android.

If you are serious about building a connected fitness product that works reliably across real hardware, you need a team that has shipped BLE integrations before. Protocol debugging is a specialized skill, and learning it on the job will burn months. We have built connected hardware products across fitness, health, and IoT. Book a free strategy call and let's map out your hardware integration roadmap together.

Need help building this?

Our team has launched 50+ products for startups and ambitious brands. Let's talk about your project.

connected fitness appIoT hardware integrationBLE FTMS protocolfitness equipment pairingreal-time workout streaming

Ready to build your product?

Book a free 15-minute strategy call. No pitch, just clarity on your next steps.

Get Started