Some Reverse Engineering and a Raspberry Pi Zero W Breathe New Life Into "Bricked" Flywheel Bikes

After the app for a smart exercise bike was withdrawn, ptx2 came up with a Raspberry Pi-powered replacement: Gymnasticon.

ghalfacree
over 4 years ago Fitness
The Gymnasticon software runs on a Raspberry Pi Zero W with no additional hardware. (📷: ptx2)

An anonymous reverse engineer and fitness enthusiast has published a detailed write-up on unbricking a Flywheel Home Bike, the software for which was disabled following a legal tussle, with a little Bluetooth sniffing and a Raspberry Pi Zero W single-board computer

"Flywheel recently and abruptly shut down the Home Bike service following a legal battle with their competitor, Peloton," the pseudonymous ptx2 explains. "The bike does still work in that you can still pedal and adjust the resistance and technically get a workout. But the app is no longer so there are no classes, no competition, and no stats."

"Flywheel customers left wanting a bit more had a few options: Swap it for a free refurbished Peloton. Join Peloton for the same monthly fee and take their classes instead. Not a bad deal and arguably an upgrade; Use the free LifeFitness ICG Training App. The Flywheel Home Bike is a rebranded LifeFitness IC5 so it just happens to work with this app. This gives you live stats like power and cadence and the ability to track your progress but doesn’t provide any live classes or competition, nor is it officially supported; Add a set of power meter pedals ($). Use the bike with the massively-multiplayer online cycling simulator Zwift and other training apps; Reverse engineer the bike. Set its data free to be used with Zwift and other training apps. No power meter pedals required."

The post then goes into details of the latter approach, which involved pulling power and cadence data from the bike using its Bluetooth connection — and then, of course, analyzing the proprietary data format received in order to extract the cadence and power data, achieved by carefully modifying each and watching for changes in the packets received.

A bug in how the bike records power data had to be worked around in software. (📷: ptx2)

Software was then written to take this data and send it to Zwift, a popular multi-user cycle training application — which, handily, supports Bluetooth Low Energy (BLE), meaning the resulting Gymnasticon software can run on a low-cost Raspberry Pi Zero W single-board computer and use its built-in radio for receiving data from the Flywheel before reformatting it and transmitting it on to Zwift.

"This has been in daily use for over 2,000 miles and works really well. Zwift is a lot of fun," ptx2 notes. "TrainerRoad and Rouvy work but I haven’t used them much. The Raspberry Pi Zero W is very versatile and affordable. It’s great that it can be powered by USB. The Flywheel Home Bike is a very solid build quality bike. I’m glad to have found a way to reuse it."

The full write-up is available on ptx2.net, while the Gymnasticon software is available on GitHub under the permissive MIT license.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles