Most treadmills have a Bluetooth chip and a companion app nobody enjoys using. I wanted to drive the treadmill - speed, incline, live stats - from a clean SwiftUI app instead. That became Treadmill Pro, an iOS app that talks to the treadmill directly over Bluetooth Low Energy with CoreBluetooth. Here's what building a BLE hardware controller actually involves.

BLE in one paragraph

A BLE device exposes services, each containing characteristics you can read, write, or subscribe to. Fitness equipment often speaks FTMS (the Fitness Machine Service), a standard set of characteristics for treadmills, bikes and rowers. In practice, support is uneven - some machines follow the spec, some ship their own quirks - so you discover services at runtime and adapt.

The connection lifecycle

The unglamorous truth of BLE is that most of the work is state management: