Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

.NET sendAcknowledgedData not working while scanning for other devices on other channels

Rank

Total Posts: 8

Joined 2020-02-04

PM

Hello

I noticed a problem that puzzles me.

I have a software in .net, connecting to several ANT devices.

Some of those devices are ANT FE-C trainers.

I usually control those trainers sending commands with sendAcknowledgedData., it worked well for several years

But I just noticed that, when an other channel is searching for an other device, sendAcknowledgedData fails (I can see in SimulANT that the message is never received by the trainer:

- If all the channels are receving data from the devices, I can successfully send commands to the Trainer

- If one of the channels is looking for a device, then sendAcknowledgedData commands never arrives, even if they are sent in a separate channel,


My setChannelSearchTimeout setting for the channels is currently 0xFF (infinite scan, which is really helpful because if a device disappear/reappers, then It will "reconnect" automatically

If i set ANTchannel.setChannelSearchTimeout(0x00); , then my sendAcknowledgedData are always received by the trainer, even if my other devices are offline, but I lose this "automatic reconnect" functionality


All those facts make me think there is a direct link between the searchTimeout, and the Acknowleged messages.


So I have several questions :
- Is that the desired and "normal" behavior of the channels ?
- is there a way to fix this issue while keeping my "automatic reconnect" functionality ?

Thanks in advance for your help



     
Rank

Total Posts: 8

Joined 2020-02-04

PM

OK, I think I worked it out

There is a "low priority search timeout" , when this timeout has expired without finding the device, then it starts a "high priority search", which will impact messages received/sent on other channels.

So I just need to set as well :

ANTchannel.setLowPrioritySearchTimeout(0xFF);


the "Low priority" timeout will never expire, and never go into "high priority search", my Acknowledge messages will be always received, and my device will be reconnected automatically even after a few minutes
diseappearance.

I'm still confused about why I never found out about that before, maybe some changes on my devices that made them more impacted by the "high priority search".