Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Connect with over 8 Devices in WPF

Rank

Total Posts: 8

Joined 2015-09-28

PM

Hi,

We need to know if there is any way to connect with more than 8 devices with ANT + WPF.

A greeting .      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

This is a device limitation rather than any limitations with the application layer; most ANT USB sticks only support up to 8 channels, though using an N5 module with a USB interface board would get you up to 15 channels (or you could use more USB sticks).

If the devices you are attempting to communicate with all run ANT master channels, then you could use continuous scanning mode on the PC to communicate with hundreds of devices. If not then shared channels may also be an option if you have control over the devices you are attempting to communicate with...

Cheers      
Rank

Total Posts: 8

Joined 2015-09-28

PM

Harrison - 22 April 2016 11:52 AM
Hi,

This is a device limitation rather than any limitations with the application layer; most ANT USB sticks only support up to 8 channels, though using an N5 module with a USB interface board would get you up to 15 channels (or you could use more USB sticks).

If the devices you are attempting to communicate with all run ANT master channels, then you could use continuous scanning mode on the PC to communicate with hundreds of devices. If not then shared channels may also be an option if you have control over the devices you are attempting to communicate with...

Cheers


Hi,
I got implement the connection using two or more USB drives, but the event (dChannelResponseHandler) receives signal only the first 8 devices. If a device is disconnected, it receives signal from the next (ninth device)
Is there any solution for this?
Thanks, greetings.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Is the same response handler being used for all of the channels? You should have initialized multiple ANT USB devices, which would probably look something like this...

static List<ANT_DevicedeviceList = new List<ANT_Device>();
static List<
ANT_ChannelchannelList = new List<ANT_Channel>();

try{
    
while (true)
    
{
        ANT_Device device 
= new ANT_Device();
        
device.deviceResponse += new ANT_Device.dDeviceResponseHandler(DeviceResponse);

        for(
int i 0CHANNELS_PER_DEVICEi++){
            ANT_Channel channel 
device.getChannel(i);
            
channel.channelResponse += new dChannelResponseHandler(ChannelResponse);
            
channelList.Add(channel);
        
}

        deviceList
.Add(device);
    
}
catch(Exception ex)
{
    
if (deviceList.Count == 0)    // Unable to connect to ANT
    
{
        
throw new Exception("Could not connect to any device.\n" +
            
"Details: \n   " ex.Message);
    
}
    
else
    
{
        Console
.WriteLine("Initialization was successful!");
    
}