WouterJD / FortiusANT

FortiusANT enables a pre-smart Tacx trainer (usb- or ANT-connected) to communicate with TrainerRoad, Rouvy or Zwift through ANT or Bluetooth LE.
GNU General Public License v3.0
153 stars 78 forks source link

Question regarding heart rate support from Tacx head unit to CTPs #157

Closed BrRoBo closed 3 years ago

BrRoBo commented 3 years ago

Hi,

I have the FortiusAnt running fine with my Fortius trainer and Zwift, plus 1 Suunto Ant+ from a few years ago and 1 new Anself ANT+ I recently bought via Amazon US. No issues. Along with this setup, I pair my Garmin Ant+ HR strap to Zwift to complete the needed devices for full telemetry in that CTP.

My question is why the HR data captured from the Tacx head unit is not rebroadcast as an Ant HR so that Zwift (and other CTP) could simply read that data stream?

Although I have an Ant+ HR strap, I would like to continue using my older straps that worked fine with the Tacx head unit, and not need to wear out my nicer/newer Ant+ straps.

Is it possible or of any interest to implement the HR data transfer from the Tacx head unit and transmit that as a Ant+ HR for pairing in a CTP?

WouterJD commented 3 years ago

There are two modes:

So, yes you can use your old HRM. Do not use the -H command line option.

BrRoBo commented 3 years ago

I have not tried with the -H option yet. Simply been running the FortiusAnt.exe without any options.

My old, non-Ant HR strap does display in the FortiusAnt gui and matches up with the flashing heart on the Tacx head unit. However, although Zwift shows the Fortius trainer device (connected as a controllable) speed and power components, it does not report finding any HR device. Tried HR search as well, without success.

The only good HR so far is by using my Garmin Ant HR strap.

WouterJD commented 3 years ago

I have not tried with the -H option yet. Simply been running the FortiusAnt.exe without any options. Because you do not define any command-line parameter, the default set is assumed. Please start FortiusANT with -a -g -A and retry

I would expect FortiusANT to broadcast the heartrate then and display the following message on the console: FortiusANT broadcasts data as an ANT+ Heart Rate Monitor (HRM), id=57592

If that's not the case, please send a logfile as created with the -d127 command-line flag.

BrRoBo commented 3 years ago

Yes, based on the output in the console/command line window I am currently seeing, I thought it was odd to not see the broadcast line you mentioned above.. Currently, the only line mentioning HR is one saying it was ready to receive Ant+ HR (or something to that effect - just having my morning coffee now :), even though the gui might be displaying my active HR data transmitted from the old strap & received by the Tacx head unit.

Testing TBD.

BrRoBo commented 3 years ago

Ok, I can confirm using "FortiusANT with -a -g -A" does start up with the HR broadcast message and in the gui shows it will use the Tacx HR. I also confirmed that Zwift will now see this HR broadcast as an Ant+ device and utilize that data stream.

Without those extra startup options, the terminal window shows only that it will receive Ant+ HR, and the gui also shows it waiting for a Ant+ HR. In this case, only the Garmin Ant+ HR strap/monitor type is seen by either FortiusAnt or Zwift.

The FortiusAnt HR preference behavior does not seem to be correct, or at least not clear to the user (me), since none of the "-a -g -A" startup options are described as effecting which type of HR will be used.

WouterJD commented 3 years ago

I have marked this issue for documentation; will check on next round

BrRoBo commented 3 years ago

So what I am seeing in the debug info for the startup options...

1 - By overriding/providing any startup options but omitting the "-H" option, this triggers a HR = "None" state which expects to use the built-in Tacx HR and will then broadcast as an Ant+ HR signal which can be utilized by other CTP. So as you suggested above, using "FortiusANT -a -g -A" will indeed allow the Tacx HR (from head unit) to broadcast as Ant+ data.

This is a somewhat strange logic... requiring "HR=None" to mean - go use the Tacx HR. None usually means none ;)

2 - By not overriding/providing any startup options, "-H0" is assumed as part of the default options applied. This will start up expecting an Ant+ HR, and then indicates the app will only receive Ant+ data, there is no broadcast of Ant+ HR.

3 - By specifying "-H-1", app will startup with the same "AntHRM - Heartrate expected from ANT+ HRM" as point 2 above, but then will not bother to receive or display that Ant+ HR data.

^^ log file attached with these 3 scenarios.

I suggest indicating in the documentation a description of what is needed (and why) to use the Tacx HR facility instead of an Ant+ HR.

Thank you! Having great success running the old USB trainer as an Ant+ setup :)

FortiusAnt-debug HR options.txt

WouterJD commented 3 years ago

Manual describes: is now in #153 branch

-H HRM Pair this Heart Rate Monitor (0: any, -1: none). Tacx HRM is used if not specified. FortiusAnt -a -g  will use Tacx heartrate monitor (analog HRM paired to Tacx) FortiusAnt -a -g -H-1  no HRM is used at all FortiusAnt -a -g -H0  FortiusANT will pair with first HRM found FortiusAnt -a -g -H1234  FortiusANT will pair with HRM with ID=1234