This document explains how to automatically discover your iFit equipment's activation code.
The iFit BLE protocol requires two pieces of information:
- BLE Code (4 characters): Displayed on your treadmill when you press connect
- Activation Code (72 hex characters): Sent by the manufacturer's app during authentication
While the BLE code is easy to obtain, the activation code is not normally visible. This tool solves that problem by intercepting it from the manufacturer's app.
The activation discovery process works by creating a BLE "man-in-the-middle" proxy:
[Manufacturer App] ←→ [This Tool] ←→ [Your Treadmill]
- Setup: The tool connects to your real treadmill and collects its BLE metadata
- Advertising: Creates a virtual BLE peripheral that mimics your treadmill
- Interception: When you connect via the manufacturer's app, it proxies all commands
- Capture: When the app sends the "Enable" command with the activation code, it's captured
- Storage: The code is saved for future use
This is identical to how the JavaScript implementation (enable.js) works in the original Zwifit project.
Install the additional bless package for BLE peripheral support:
pip install blessifit discover-activation <ble-code>Example:
ifit discover-activation 1a2b-
Turn on your treadmill and press the connect button to see the BLE code (e.g., "1a2b")
-
Run the discovery command:
ifit discover-activation 1a2b
-
Open your manufacturer's app (iFit, NordicTrack, ProForm, etc.)
-
Connect to your equipment in the app as you normally would
-
Wait for capture: The tool will automatically detect and display the activation code:
✓ Captured activation code: a1b2c3d4 -
Use the code: The activation code is saved to
~/.ifit_activation_codesand can now be used:ifit info AA:BB:CC:DD:EE:FF a1b2c3d4
Specify the treadmill address if already known:
ifit discover-activation 1a2b --address AA:BB:CC:DD:EE:FFAdjust timeout (default 60 seconds):
ifit discover-activation 1a2b --timeout 120- Linux: Full support (requires
blessand BLE permissions) - macOS: Full support (requires
bless) - Windows: Limited support (BLE peripheral mode may not be fully supported)
Install the required package:
pip install bless- Ensure your treadmill is on and in pairing mode
- Check that the BLE code is correct (shown on treadmill display)
- Increase timeout:
--timeout 30
- Make sure you actually connected via the manufacturer's app
- Some apps may have a delay - try increasing timeout
- Verify the app is the correct one for your equipment brand
Grant BLE permissions:
sudo setcap 'cap_net_raw,cap_net_admin+eip' $(which python3)This tool:
- ✓ Only works locally on your machine
- ✓ Only intercepts communication between YOUR app and YOUR equipment
- ✓ Stores codes locally in
~/.ifit_activation_codes - ✓ Does not transmit any data over the internet