Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Fitness Equipment → Thread

   

Pairing FitnessEquipment Difficulty

Rank

Total Posts: 12

Joined 2017-01-13

PM

I am interacting with an Elite Drivo cycling turbo trainer using C# and ANT_NET.dll. I understand from "ANT AN02 Device Pairing" that the following steps make me paired with the turbo trainer.

Create a Device
Get a Channel
requestChannelID - which I get OK
device0.ResetSystem
device0.setNetworkKey
channel0.setChannelID - with wildcard for the moment
Create a display and turn it on (I assume the Channel Type and Channel Period are implicitly set here)

However the green ANT+ light on my Turbo stubbornly keeps flashing in pairing mode and only very occasionally (and for no obvious / repeatable reason) changes to steady - yet Zwift or the Elite software make the green light steady every time. So this suggests I am not properly paired and I don't know why.

I check for, and never get, a CHANNEL_NOT_OPENED_0x16 event
I also successfully request and get the ChannelID
I do however get EVENT_RX_FAIL_0x02 regularly, which I suspect is a mismatch of data send periods (should I worry?)
I can't find any example code for FitnessEquipment to help me.

I receive the turbo's broadcast cadence and speed. I can also poll for the power, however I cannot successfully set the turbo resistance (with SendBasicResistance) or power (with SendTargetPower), but I suspect this is because I am not properly paired.

So it seems I am missing a key step and I would be grateful for any suggestions about what I have not done to fully complete the pairing process - or point me at any example code.

Thank you

Stephen
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi Stephen,

Have you tried using SimulANT+ with the Trainer first to see if you are able to control the trainer? Getting some EVENT_RX_FAIL messages is normal, but seeing it as more than a fifth of your messages would indicate some issue such as mismatched channel periods. You can consult the Fitness Equipment Device Profile for more information on the required channel period.

For sample code, I would suggest the Using the SimulANT+ Library for Simulating ANT+ Devices in C# Application Note, which shows an example for using the HR classes in the SimulANT+ Library but should be analogous to other ANT+ Device Profiles.

Cheers      
Rank

Total Posts: 12

Joined 2017-01-13

PM

The Heart Rate simulator is where I started and my code is based upon that. It seems like I am very close to getting things working, but not quite there. I have not tried controlling it with SimulANT+ so will try that next.

Regarding pairing - is there anything I have missed in my list above - is there an additional step required for FitnessEquipment over and above pairing with a Heart Rate sensor?

Thanks
Steve      
RankRankRankRank

Total Posts: 120

Joined 2013-05-07

PM

Hi AntySteve,

Make sure you have the Channel Period set correctly and any other channel configurations specified by the device profile. You should be changing all the channel parameters in the sample from the heart rate ones to the fitness equipment profile.

BK      
Rank

Total Posts: 12

Joined 2017-01-13

PM

For anyone looking here with the same or similar problem, here is what fixed my problem.
My (Elite) cycling turbo trainer needs to receive a message every few seconds, otherwise it thinks communication has been lost and changes back to search mode. My programme was only sending messages (gradient) when the gradient changed. Hence when the gradient didn't change such as on a long section of flat road, no messages were sent and the turbo returned to search mode. My problem was fixed by sending the gradient message when the gradient changed or every 5 seconds, whichever occurred first, even if it hadn't changed since the previous message.