From 370b22bb02ee1a4405b07c265a92523ad496367e Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Wed, 27 May 2026 00:10:30 +0200 Subject: [PATCH] improving the docs. --- README.md | 154 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 136 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 03656fe..9e53e9c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,21 @@ Bridge an ANT+ cycling power trainer over Bluetooth Low Energy, allowing modern devices that don't support ANT+ to receive power and cadence data. +## Quick Start + +1. **Set up the USB dongle** — Follow the [Setup instructions](#setup) to prevent the `usbserial` driver from claiming it +2. **Build:** + ```bash + make build + ``` +3. **Run** (requires root): + ```bash + sudo ./bin/bridge + ``` +4. **Connect** — On your computer or phone, scan for BLE devices and connect to `LinuxAntBtBridge`. + +That's it. Your trainer's power and cadence data should now be available over BLE. + ## Why this exists Modern training apps and devices (phone apps, many power meter displays) support Bluetooth LE but lack ANT+ radios. @@ -13,18 +28,26 @@ service over BLE. ## How it works -1. Opens a USB ANT+ dongle (vendor ID `0x0fcf`) and listens for broadcast messages from a specific trainer device number. -2. Parses power (Watts) and cadence (RPM) from the trainer's ANT+ data pages. -3. Exposes a Cycling Power Measurement BLE service via the system's Bluetooth adapter, updating values as new ANT+ messages arrive. +1. Opens a USB ANT+ dongle and listens for broadcast messages from a specific trainer device number. +2. Parses power (Watts) and cadence (RPM) from the trainer's ANT+ data. +3. Exposes a standard Cycling Power Profile BLE service via the system's Bluetooth adapter, updating values as new + ANT+ messages arrive. ## Requirements -- Linux -- D-Bus (for BlueZ Bluetooth management) -- A Bluetooth adapter -- An ANT+ USB dongle +### Hardware + +- A Bluetooth adapter (built-in or USB) +- An ANT+ USB dongle (tested: ANT USBStick2, vendor `0x0fcf`, product `0x1008`) - An ANT+ cycling power trainer +### Software + +- Linux +- BlueZ 5.50+ (for Bluetooth management) +- D-Bus (for BlueZ communication) +- `hciconfig` (usually part of the `bluez-utils` or `bluez-tools` package) + **Note:** This program must be run as root to access the USB dongle. ## Tested hardware @@ -33,7 +56,21 @@ service over BLE. ## Setup -The Linux `usbserial` driver must be prevented from claiming the ANT+ dongle. Create the following udev rule: +The Linux `usbserial` driver must be prevented from claiming the ANT+ dongle. + +### Find your dongle's USB IDs + +If you're not using the tested dongle, find your dongle's vendor and product IDs: + +```bash +lsusb +``` + +Look for a line with "ANT" in the description. Note the vendor ID (e.g., `0fcf`) and product ID (e.g., `1008`). + +### Create the udev rule + +Create the following udev rule to prevent `usbserial` from claiming the dongle: ```bash sudo tee /etc/udev/rules.d/99-ant-usb.rules > /dev/null <