Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Continuous Scanning Mode Demo

Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

I am trying to make work the Continuous Scanning Mode Demo available here:
http://www.thisisant.com/developer/ant/advanced-features#44_tab

I have compiled it with VS2008 Express, as needed.
I also added the Set ANT_Network Key in the Channel configuration.

Here is a example of the problem I'm facing, no data is received while another ANT_Stick is emitting data non-stop, screenshot here:
https://www.dropbox.com/s/p8ugk1qx3yqjgbw/CSM_mode.png?dl=0

I am not able to receive any data inside the Demo, what could be the reason? Is the example suposed to work out of the box?
CSM Code below. nothing changed except I added the ANT Network Key

BOOL ANTControl_ConfigScanningMode(USHORT usDeviceNo_UCHAR ucDeviceType_UCHAR ucTransType_UCHAR ucRFFreq_BOOL bRxOnly)
{
    BOOL bStatus 
TRUE;

    
cdScanningMode.usDeviceNo usDeviceNo_;
    
cdScanningMode.ucDeviceType ucDeviceType_;
    
cdScanningMode.ucTransType ucTransType_;
    
cdScanningMode.ucRFFreq ucRFFreq_;
    if(
bRxOnly)
        
cdScanningMode.ucChannelType 0x40;
    else
        
cdScanningMode.ucChannelType 0x00;


 
UCHAR USER_NETWORK_KEY[8] =  {0xAA0xAA0xAA0xAA0xAA0xAA0xAA0xAA}//removed ANT Key so I can post on forums
 
 // SetNetworkKey
 
ANT_SetNetworkKey(ANT_NETWORKUSER_NETWORK_KEY);  //0, USER_NETWORK_KEY
 
if(!WaitAck(MESG_NETWORK_KEY_IDMESSAGE_TIMEOUT))
    
bStatus FALSE;

    
// Config scanning mode
    // Using public network, so no need to set network key
    
ANT_AssignChannel(cdScanningMode.ucChannelcdScanningMode.ucChannelTypeANT_NETWORK);
  if(!
WaitAck(MESG_ASSIGN_CHANNEL_IDMESSAGE_TIMEOUT))
    
bStatus FALSE;
    
    
// Set channel ID mask
 
...


Thanks,
Max      

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com

Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

Found the problem

RF should be set to 57, not 66 like the Demo set by default
Thanks      

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com

Rank

Total Posts: 5

Joined 2014-01-20

PM

Hi Max

This is great, it also helped me.

I think ANT+ is great and have built an application which uses the standard protocol. I am now trying to enhance it with Continuous Scanning Mode. Hopefully the ANT+ community will be able to help out. You seem to be one of the most active people on the forum. Good work!

Thanks