Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Moving to New Channel from Background Scan

Rank

Total Posts: 19

Joined 2013-11-21

PM

Hello Forum,

These 2 setups work fine.
Setup Slave Background Scan:

&HA4; , 9 , &H46; , 0 , &HFF; ... &HFF; //set Network
&HA4; , 4 , &H42; , 0 , &H40; , 0 , &H01; //channel_assign 40=Receive Only
&HA4; , 5 , &H51; , 0 , &H00; , &H00; , &H00; , 0 //channel_id_slave
&HA4; , 2 , &H66; , 0 , 1 //Enable Extended Messages
&HA4; , 2 , &H6E; , 0 , &H80; //enable Lib Config
&HA4; , 2 , &H45; , 0 , 57 //channel_freq_slave
&HA4; , 2 , &H47; , 0 , 4 //Power 3dB
&HA4; , 2 , &H60; , 0 , 3 //set channel power to 0dB
&HA4; , 2 , &H63; , 0 , &H24; //set low priority Search Timeout = 60 sec
&HA4; , 2 , &H44; , 0 , &H00; //Slave Search Timeout = 90 sec default=25 sec
&HA4; , 1 , &H4B; , 0 //channel_open_slave

Setup Master Device Pairing Initialization:

&HA4; , 9 , &H46; , 0 , &HFF; ... &HFF; //set Network
&HA4; , 3 , &H42; , 0 , &H10; , 0 //channel_assign 10=transmit Bidirectional
&HA4; , 5 , &H51; , 0 , &H34; , &H12; , &H78; , 1 //channel_id TXType
&HA4; , 3 , &H43; , 0 , &H00; , &H20; //$2000, $4000, $8000, $FFFF Generic 4 Hz Frequency
&HA4; , 2 , &H45; , 0 , 57 //channel_freq_master
&HA4; , 2 , &H47; , 0 , 4 //Power 3dB
&HA4; , 2 , &H66; , 0 , 1 //Extended Messages ON
&HA4; , 2 , &H6E; , 0 , &H80; //enable Lib Config
&HA4; , 1 , &H4B; , 0 //channel_open_master


The Slave pairs with the Master by using its Device ID parameters and moves to a different, dedicated Channel.

However, when the Slave moves to the different Channel, I have not been able to figure out how the Master may request the new Channel ID from the Slave.

Any advice would be appreciated.      
Rank

Total Posts: 19

Joined 2013-11-21

PM

After several hours of trial-and-error experimentation, it seems as if the Channel Number definition is important only to the device (either Master or Slave) that defines it. The Device ID parameters (Device_Number, Device_Type and TX_Type) must be common between the two devices in order to establish a stable paired communication link. The channel number is irrelevant.

Slave-> any channel number.
Master-> channel 0 only.

Do I have this right?      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Yes, the channel number is irrelevant when it comes to pairing between two devices, it just allows for the identification/management of different ANT channels on one ANT device. Both the master and the slave may use any of the channels numbers available (0-7) and it will not affect pairing.

The Channel ID* (Device Number, Device Type, Tx Type) must be matching between the two devices attempting to pair. The slave device may choose to wildcard these values if they are unknown.

I would recommend reading the Device Pairing Application note (http://www.thisisant.com/resources/an02-device-pairing/) for more information.      
Rank

Total Posts: 19

Joined 2013-11-21

PM

Hello Usamak,

I agree with you that the documentation is pretty good as it relates to setting up slave devices.

Unfortunately, I did not find much that describes the requirements for Master code (other than the Channel Type during Assign) - especially important seems to be that the Master channel number is limited to being defined as 0 (zero).

Of course, I may have missed it. If so I apologize.      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

The master channel number is not limited to being defined as zero, that is the default example used in the majority of our documentation/reference code. If you are using any of the current chipsets you may use up to 8 channels, giving you a channel number range of 0-7.

As far as the channel ID parameters (device type, device number, transmission type) for the master channel are concerned, you are free to set them to any valid value. However, if you are creating a device that will operate on the ANT+ network, you have to use the channel ID parameter values specified in the relevant ANT+ Device profile (bike power meter, heart rate monitor, etc.).

Could you describe what you are attempting to do in your application in more detail?

If you have an ANT USB stick I would recommend playing around with the ANTWare II (http://www.thisisant.com/resources/antware-ii/) tool to attempt pairing with different channel configurations.      
Rank

Total Posts: 19

Joined 2013-11-21

PM

Thank-you usamak for your help.

This is NOT an important issue in the application being considered. I just found it confusing during the initial learning process. I had assumed that the Slave and Master needed similar Channel Number definitions.