Skip to content

Reads FTMS speed from a treadmill and broadcasts as a BLE run, speed and cadence sensor

License

Notifications You must be signed in to change notification settings

sirfergy/ftmstorscble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile Node.js Project

ftmstorscble

Reads FTMS treadmill speed data and broadcasts it as a BLE running speed and cadence service. If you have an ANT+ USB stick it will also include cadence information along with the running speed from the treadmill.

Motivation

I have a Garmin Forerunner watch and a Horizon Fitness treadmill, and wanted to find a way for my Garmin to read the current speed from the treadmill instead of guessing it from my ANT+ foot pod. The ideal solution would be that Garmin supports the BLE FTMS profile, but people have been asking for it for years and it's not materialized.

Requirements

sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
  • If you plan to use ANT, please follow the steps here, with the step for creating a UDEV rule being the most important
    • lsusb to get device ID
    • Create UDEV rule
      • sudo vim /etc/udev/rules.d/Dynastream-ANTUSB-m.rules
      • SUBSYSTEM=="usb", ATTRS{idVendor}=="0fcf", ATTRS{idProduct}=="1008", RUN+="/sbin/modprobe usbserial vendor=0x0fcf product=0x1008", MODE="0666", OWNER="pi", GROUP="root", replacing 1009 with the ID of your device

How to use

  • npm install
  • npm run build
  • npm run publisher
  • npm run subscriber
  • To use an MQTT server not running on the local machine (or publisher or subscriber role are on different machines), pass the --broker mqtt://mqtthost:8113 parameter
  • On your Garmin search for a sensor and it should find your machine running as the subscriber

Raspberry Pi

If you have a Raspberry Pi, the native bluetooth does not support (at least with bleno/noble) both the publisher and subscriber roles. In this case you have two options:

  • Setup ftmstorscble on two different Pi's, with one being the publisher and the other the subscriber
  • Buy a USB BT dongle that uses a supported chipset, e.g. one based on the rtl8761bu chipset.
    • You need to set the NOBLE_HCI_DEVICE_ID environment variable to the USB adapter when running the publisher command

Notes

This is written pretty specific for my scenario, but with some additional effort it could be expanded to work for many more scenarios.

Troubleshooting

Raspberry Pi

  • The USB BT adapter may not power up, you need to disable the soft block using these two steps:
    • rfkill list
    • rfkill unblock bluetooth
  • The bootloader may have a bug that was recently fixed that prevents the USB BT adapter from initializing. Updating the bootloader resolves

About

Reads FTMS speed from a treadmill and broadcasts as a BLE run, speed and cadence sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published