starryalley / CSC_BLE_Bridge

Android app that bridges ANT+ Cycling Speed/Cadence/HR sensors as Bluetooth LE sensors
MIT License
68 stars 17 forks source link
android-app ant-plus ant-sensors ble-sensors bluetooth-low-energy cycling hacktoberfest

What

This is an Ant+ to BLE (Bluetooth Low Energy) Bridging app for ANT+ Cycling Speed and Cadence (CSC) sensors, ANT+ heart rate sensors, and ANT+ Stride based speed and distance sensors. The app will act as a Cycling speed/cadence and/or HR BLE sensor and/or BLE Running speed/cadence so other BLE device (phone, PC, Mac, tablet) can reads data from ANT+ sensors.

V1.3 screenshot pre V1.3 screenshot (old original version)
Screenshot v1.3 Screenshot

Install

Or you can download the apk in release and use adb to install:

adb install -r /path/to/app-release.apk

Details

This is an Android app which reads ANT+ cycling speed/cadence (CSC), heart rate sensors, and/or stride based speed and distance (SDM) sensors in the background (actually in an Android foreground service), and advertises itself as a Bluetooth Low Energy (BLE) device which implements Cycling Speed and Cadence Profile (CSCP), Heart Rate Profile (HRP), and/or Running Speed and Cadence (rsc) so that other devices can see this Android device as a Cycling Speed & Cadence Bluetooth, Heart Rate BLE sensor and/or Running foot pod sensor.

This is useful when you only have ANT+ CSC/HR sensors but you want to connect to them as BLE sensors (provided that you don't have an USB ANT+ stick around but happen to have an ANT+ enabled Android device like a Samsung phone).

Long hold on the sensors name on top of the screen to rescan for Ant+ devices after the "Start BLE bridging" button has been pressed. All sensors will automatically scan for Ant+ sources when the "Start BLE bridging" button is pressed.

Why

I want to try out Zwift desktop version but I can't get a USB ANT+ Stick anywhere now in my country (due to the C-19 pandemic). So I decided to write one.

I can now sees my speed and cadence coming from ANT+ sensors on Zwift Mac without the need of extra hardware.

Special thanks to pinkemma who implements Heart Rate sensor profile so that this app also reads heart rate from ANT+ sensor and bridges it to bluetooth. (see PR #5 since 10/2020)

Tested devices

ANT+ and BLE enabled Android devices

ANT+ Speed/Cadence sensors

ANT+ Heart Rate sensors

ANT+ Stride-based Speed and Distance Monitor (SDM) sensors

Apps that use BLE sensors

Known issues

Reference

Code samples:

Spec and Document