Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Python and using a channel number greater than 2

Rank

Total Posts: 5

Joined 2016-02-20

PM

I'm trying to write a python script to receive multiple ant channels, and starting to run into issues if I'm accessing a channel number greater than 2 (getting back a 0x28 INVALID MESSAGE response).

Eventually figured out if I'm just trying a single channel, I can specify either 1 or 2 (0 also works, but still just uses 1), and it will go through just fine, but if I specify 3 or above even as a single channel - it fails.

There is a reference to something along these lines for some of the embedded devices here - https://www.thisisant.com/forum/viewthread/6358 - and it makes reference to a config file where "ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED" is defined - and is usually set to 2 by default, but I can't find any reference to anything similar in the "ANT Message protocol and usage" specification.

I'm using a Suunto movestick - and the capabilities confirms it is capable of 8 channels, so I'm a little stumped as to how I can get around this.

Where am I going wrong? smile

Clayton.      
Rank

Total Posts: 1

Joined 2016-03-14

PM

ClaytonE - 14 March 2016 04:46 AM
I'm trying to get the most out of Airsnore and write a python script to receive multiple ant channels, and starting to run into issues if I'm accessing a channel number greater than 2 (getting back a 0x28 INVALID MESSAGE response).

Eventually figured out if I'm just trying a single channel, I can specify either 1 or 2 (0 also works, but still just uses 1), and it will go through just fine, but if I specify 3 or above even as a single channel - it fails.

There is a reference to something along these lines for some of the embedded devices here - https://www.thisisant.com/forum/viewthread/6358 - and it makes reference to a config file where "ANT_CONFIG_TOTAL_CHANNELS_ALLOCATED" is defined - and is usually set to 2 by default, but I can't find any reference to anything similar in the "ANT Message protocol and usage" specification.

I'm using a Suunto movestick - and the capabilities confirms it is capable of 8 channels, so I'm a little stumped as to how I can get around this.

Where am I going wrong? smile

Clayton.


Can it really do 8 channels?      
Rank

Total Posts: 5

Joined 2016-02-20

PM

The MAX_CHANNELS parameter it outputs when I query the capabilities check comes back saying it can handle 8 - so I'll have to believe them. You're raising my suspicions though, I might try the stick in another machine with the ant simulator and make sure I can get it to send/receive on more then two. I'm not completely sure I have with this stick in particular.

Have you got a reason to think they might not support it (other than my inability to use the channels!)?      
Rank

Total Posts: 5

Joined 2016-02-20

PM

Well looks like a red herring - I was (incorrectly!) redefining a network key when opening the channel. Removed this and all was well.