thisisant ANT Device Pairing
Specifications
- Manufacturer: Dynastream Innovations Inc.
- Model: ANT AN02
- Version: Rev 2.3 (March 2013)
Product Information
Device pairing is a critical mechanism in the ANT system that allows an ANT slave device to establish connections with specific transmitters. It ensures accurate communication between slave/master pairs in multi-user environments. The ANT AN02 application note provides detailed information on pairing techniques such as wild card searches, pairing bit usage, inclusion/exclusion ATE list, search lists, and proximity search.
Product Usage Instructions
- Introduction
Device pairing is essential for establishing connections between ANT slave devices and transmitters. - Relevant Documents
Refer to the ANT AN02 application note for detailed information on device pairing techniques. - Channel ID
The complete channel ID is crucial for accurate device pairing. - Device Pairing Bit
The pairing bit is used to facilitate device pairing. Refer to section 4.1 for detailed usage notes. - Inclusion/Exclusion List
Utilize the inclusion/exclusion list to control device pairing. See section 5.1 for usage notes. - Search Lists
Understand how search lists can enhance the device pairing process. Refer to section 6.1 for details. - Proximity Search
Proximity search enables devices to find and pair with nearby transmitters. - Requesting the Channel ID
Learn how to request the channel ID for accurate device pairing. - Application Example
Explore different pairing techniques such as wild card search, pairing bit usage, and inclusion/exclusion list management asdescribed in sections 9.1, 9.2, and 9.3 respectively.
Device Pairing
ABSTRACT
Device pairing is the mechanism through which an ANT slave device gains knowledge of the complete channel ID of a particular transmitter it intends to communicate with. Device pairing is critical in multi-user environments to ensure connections are established between the correct slave/master pairs. This application note describes the features available in ANT to facilitate device pairing and provides an overview of pairing techniques, including the use of wild card searches, pairing bit, inclusion/exclusion list, search lists, and proximity search.
THIS DOCUMENT IS DEPRECATED AND PROVIDED “AS IS” WITH NO SUPPORT FROM THE ANT TEAM. USE IS AT THE SOLE DISCRETION OF ANT+ ADOPTERS.
ANT AN02
Introduction
- One of the main parameters describing an ANT channel is its channel ID. All master devices have an associated channel ID that distinguishes them from other masters and allows a slave to select which master it wishes to connect to.
- Device pairing is the process through which a slave obtains the complete, unique channel ID of the master it intends to communicate with. This can be a complex problem, especially in multi-user environments when multiple, similar masters are located in the same area. Once the devices have been paired, the slave can store the channel ID of the master for future communication sessions.
- For a slave to communicate with a particular master, it needs to be able to distinguish it from other masters with similar characteristics. There are several different methods that a slave can use to identify the master it wants to connect to. Full or partial knowledge of the channel ID offers the first level of pairing control, while the ANT pairing bit provides added functionality for pairing in multi-user environments. The use of an inclusion/exclusion list* allows the pairing process to be limited to a set of devices or to omit particular devices. Proximity search* allows the slave to reduce the search based on the relative distance between the master and slave. If required, more sophisticated pairing mechanisms can be implemented at the application level; one example of this is the use of search lists.
Relevant Documents
It is strongly recommended that the following documents be reviewed before using this application note.
- ANT Message Protocol and Usage
- AN11 – ANT Channel Search
- AN12 – Proximity Search
Channel ID
For two ANT nodes to establish a communication channel, they must agree on a compatible channel ID. The channel ID is always set by the master device and is transmitted along with every message once the channel is opened. Initially, the slave may know all, part, or none of the channel ID.
Figure 1 presents the various pairing scenarios that may exist based on the slave’s knowledge of the channel ID of the master.
Feature available on some ANT devices, please check the datasheets for capabilities.
Figure 1. Device pairing with varying knowledge of the channel ID
The first scenario, where the slave knows the entire channel ID of its master, gives the slave the most control over the pairing process. By specifying the full channel ID, the slave will only connect to the ANT device matching exactly that channel ID. One example of this scenario is when the master and slave are pre-paired, that is, initially configured with identical channel IDs. Typically, this is done during the manufacturing process.
In many practical applications, the slave may not initially know the master’s exact channel ID, or it might be desirable to allow connections to more than one device, as this would increase interoperability. Use of wildcards in device pairing also allows the design of each node to be generalized for simplicity. Note that the transmission type is likely to be unknown, as the upper nibble of the transmission type can be used to extend the device number to 20 bits. Therefore, in many cases, a more sensible method would be to pre-configure the device type and acquire the rest of the channel ID through pairing.
For example, the slave may know what device type it wishes to connect to, but not the actual device number or transmission type. In this case, the slave can pair to any ANT master device matching the desired device type by placing a wild card (i.e. 0) in the transmission type and device number fields. Once communication is established, the slave can obtain and save the full channel ID of the master for future communications.
It is clear from Figure 1 that the slave’s control over the pairing process increases as more fields of the channel ID are known, decreasing the likelihood of connecting to an undesired device. Most practical applications face the latter two scenarios, where most of the channel ID is unknown. The ultimate goal of the slave is to reach the state of maximum control, where it knows the complete channel ID of the master.
Learning the complete channel ID of the master allows the slave to simply search for that specific device for future communication.
If the pairing process uses wild cards in any of the channel ID fields, the ANT slave device will default to connecting to the first matching master it finds. For this reason, it is impossible to predict which master the slave will connect to if multiple masters with the same partial channel ID are located within range of the slave. In this scenario, other pairing techniques can be used to make sure the slave pairs with the correct device.
Device Pairing Bit
The pairing bit is the most significant (MSB) of the Device Type field. This can be set when the Set Channel ID message is sent to an ANT channel before it is opened. The pairing bit is only checked by ANT if at least one of the fields of the channel ID contains a wildcard. In other words, if all parts of the channel ID are known, there is no need for pairing, as the slave knows exactly which master to connect to, and thus the pairing bit is irrelevant. When the pairing bit is used (I.,e. when at least one of the fields of the channel ID is a wildcard), both nodes that wish to establish communication with one another must have the pairing bit in the same state during the connection procedure.
Figure 2 shows an example scenario using the pairing bit. When the slave opens the channel, ANT searches the RF domain for a transmit device with a matching channel ID. It will see both master devices, but the connection will only be established with Master 2 because its pairing bit state matches that of the slave.
Figure 2. Example pairing bit usage scenario
If the slave knows the full channel ID of the master, the pairing bit is not used. As depicted in Figure 3, if the slave knows the entire channel ID of a specific master, in this case Master 2, ANT will only search for and connect to that particular master. The pairing bit will be ignored.
Figure 3. Device pairing with full channel ID
Pairing Bit Usage Notes
Use of the pairing bit generally requires an additional mode on both the master and the slave to initiate the pairing process. The following key points should be considered for proper usage of the pairing bit:
- The pairing bit should only be used in a special pairing mode, which is usually triggered by an external UI or system event.
- The pairing bit can be reset on the master device while the channel is open.
- The bits of the device type field, excluding the pairing bit, must not change when the pairing bit is set on the master device.
- ANT resets the pairing bit automatically at the slave when it has successfully connected with the master.
- The slave will maintain connection with the master when the master resets its pairing bit as it will then have knowledge of its channel ID.
If multiple masters set their pairing bit simultaneously, the slave will pair to the first master it finds that matches both the channel ID search and the state of the pairing bit. Once again, it will be impossible to predict which master the slave will connect to.
The use of the pairing bit also requires explicitly placing both the master and slave in pairing mode,so it might be unsuitable for devices with a limited user interface.
Inclusion/Exclusion List
- The inclusion/exclusion list feature is available on some ANT devices (please check datasheets for capabilities). This allows the slave to specify up to four channel IDs to include or exclude in the pairing process.
- When the list is configured as an inclusion list, the listed IDs will be the only IDs that will be accepted in a wildcard search. Figure 4 shows an example pairing scenario using an inclusion list.
Figure 4. Example inclusion list usage scenario
- The slave is configured with a wildcard at the device number field, so once the channel is opened, it will see both master devices, but it will only connect to Master 2 because its channel ID is present in the inclusion list.
- When the list is configured as an exclusion list, the slave will not connect to any of the listed devices. As shown in Figure 5, the slave will not connect to Master 1, even though it matches the wildcard, because it is specifically excluded from the pairing process.
Inclusion/Exclusion List Usage Notes
The following aspects should be considered for a proper implementation of the inclusion/exclusion list:
- A single list can be configured per slave channel, either as an inclusion or an exclusion list, but not both.
- Each list can contain a maximum of four channel IDs.
- Channel IDs added to the list cannot contain any wildcards; they must be fully specified.
- In contrast to the pairing bit, the inclusion/exclusion list is not ignored if the slave has full knowledge of the master’s channel ID.
- The inclusion/exclusion list can be configured and modified while the channel is open, but it only has an effect when the channel is searching.
Search Lists
- A search list is an advanced pairing technique that relies on the user to identify the device they wish to connect to. If multiple devices matching a wildcard are found within range of the slave, they are displayed to the user, asking which device to pair with. This requires that the user know or guess the full or partial channel ID of their device. Unless the channel ID is printed on the device itself, most users will not know this number. If the wrong device is selected, the pairing process can be restarted.
- Figure 6 illustrates an example scenario using a search list. The slave and all masters are configured with the same device type and transmission type; the masters are differentiated by their device number.
- When the pairing process begins at the slave, it searches during a set period of time for all devices with matching device type and transmission type. After the search stage finishes, the slave displays all found devices to the user, who can select the desired device from the list. If the selection is incorrect, the user can restart the pairing procedure.
Search List Usage Notes
Search lists are an application-level pairing technique; searching for multiple devices and connecting to a single user-selected device is not automatically performed by ANT. The following aspects should be considered for a proper search list implementation:
- The user of the device must have knowledge of the channel ID of the device they wish to pair to. This may require specifying the channel ID of a master device on the product during the manufacturing process.
- Use of a search list in a slave requires a special pairing mode, usually triggered by an external UI or system event.
- No special pairing mode is required on the master.
- A slave can use multiple ANT channels, background scanning, or continuous scanning mode to search for multiple devices. These features are not available on all ANT devices, please check datasheets for capabilities.
- Once a master is selected, the slave must make sure to only connect to the chosen device and close any other channels used for the pairing process.
A search list gives the user great control over the pairing procedure and requires no particular action from the master. However, this technique requires a more complex user interface at the slave to allow the display and selection of available master devices. There is also a larger latency on the pairing process, especially if it takes the user several guesses to connect to the correct device.
Inclusion/exclusion lists can be incorporated to search lists to fine tune the pairing process. For example, if the user selection is incorrect, the user can restart the pairing process, and the incorrect device could be added to an exclusion list such that it is no longer included in the search.
Proximity Search
Some ANT devices have a proximity search feature (please check datasheets for capabilities). This can simplify device pairing by limiting the search based on the relative distance between master and slave devices. A proximity search designates ‘bins’ of proximity, as illustrated in Figure 7, which allow the slave (shown as a black and white dot) to pair with the closest of multiple available masters (black dots).
Proximity search does not require any user interaction, and is suitable when dealing with crowded multi-user environments. Please refer to the “Proximity Search” application note for more details on this pairing technique.
Requesting the Channel ID
Once communication with a specific master is established, the slave can use the Request Message command (0x4D) to obtain its channel ID, simply requesting the Channel ID message (0x51).
The response message from ANT will include the full channel ID of the master, which can be saved for future use to search for this specific device.
Application Example
Consider a simple ANT network consisting of a sensor (master) and a display (slave). The network diagram is shown in Figure 8.
The channel parameters for the master (sensor) are listed in Table 1. The configuration of the slave is dependent on the pairing technique used.
Table 1. Master Channel Parameters
Channel Parameter | Value |
Network Type | Private |
Channel Type | 0x10 (Master) |
Device Type | 0x64 |
Device Number | 0x3E6 |
Transmission Type | 0x85 (Extend Device Number) |
RF Frequency | 35 (2435 MHz) |
Channel Period | 16384 (2 Hz) |
Wild Card Search
For applications where the wireless sensor network exists in relative isolation from other, similar devices, it is practical to reduce system complexity by using a simple wildcard search. Assuming only the device type is known, the slave can simply perform the pairing operation each time it wishes to connect to the sensor using the wildcard option for the device number and transmission type fields. Since there is only one sensor in the area, it will connect to the correct device each time.
The pairing procedure for a receiver connecting to the sensor by means of a wild card search would be similar to that shown in Figure 9.
Figure 9. Connecting to a sensor using wildcards
Pairing bit
An example of using the pairing bit to facilitate device pairing would be to first set the pairing bit on the master. This could be done on a button push or over the phone. To establish a connection, the slave must also set its pairing bit if wildcards are used, or use the exact channel ID of the master if known. In addition, the slave must have compatible channel parameters such as network key, RF frequency, channel period, etc.
The pairing procedure for the slave using the pairing bit is shown in Figure 10.
Figure 10. Connecting to a sensor using the pairing bit
In many use cases, for example, a heart rate monitor connecting to a watch, the display (watch) and sensor (HRM) in the same product package are pre-paired at the factory. When a new pairing is required (e.g., when replacing the sensor), a specific action from the user, such as inserting the battery, pushing a button, or selecting a setting through a user interface, will force the sensor and the watch to go into pairing mode, setting the pairing bit. This will prevent the watch from connecting to other sensors in the area that are not in pairing mode.
Inclusion/Exclusion List
The pairing procedure of a slave using an inclusion/exclusion list is shown in Figure 11. In this particular example, the list is configured as an exclusion list; an inclusion list would be configured similarly, with the Exclude field set to 0.
Figure 11. Connecting to a sensor using an exclusion list
Although this example adds a single channel ID to an exclusion list, it is possible to store up to three more channel IDs using the Add List ID command and the desired list size.
Search List
- The pairing procedure of a slave using the search list pairing technique is illustrated in Figure 12. This particular example uses all available ANT channels on the slave device to find multiple, in-range masters. All channels are configured with a known device type and a wildcard card for the device number and transmission type. During the pairing process, the slave searches for matching masters on all channels and then shows all acquired devices to the user. After the user selects a master to connect to, the device number and transmission type for that master are saved, and all other channels are closed. After the pairing process is completed, the slave only keeps the connection to the master selected by the user.
- Please note that if a display shows the device number to the user, it may show either the 2 byte device number, or 20 bit extended device number, or possibly the device number and transmission type; for example, in Figure 11, the display can show the device number 998, or 33766 or 998 with transmission type 85. These display options are all acceptable.
- Using this method, the number of masters that can be detected depends on the number of available ANT channels. Depending on product capabilities, it is also possible to use background scanning or the continuous scanning mode to acquire the channel IDs of all masters within range. More details on these are available in the “ANT Channel Search” and “Continuous Scanning Mode” application notes.
Proximity Search
Please refer to the “Proximity Search” application note for more details on the design considerations of this pairing technique.
Requesting the Channel ID
The procedure to obtain the channel ID of the master is depicted in Figure 13.
This procedure can be used with any of the pairing techniques described previously.
Closing Remarks
Device pairing allows two nodes to correctly and reliably establish communication, by distinguishing the nodes of interest from others in the network. Selection of the most appropriate pairing technique for a particular use case must take into account the expected environment of operation (single or multi-user), user interface of the devices, and how often the devices need to be paired.
This application note provides an overview of some common pairing techniques for a variety of product usage environments; however, it is by no means an exhaustive account of all possible pairing methods. ANT provides multiple features to aid with device pairing, such as wildcard searches, the pairing bit, inclusion/exclusion lists, and proximity search. More complex pairing mechanisms, such as search lists, can be implemented at the application level if required.
COPYRIGHT INFORMATION
This application note is the property of Dynastream Innovations Inc. and is intended for limited circulation only. Any reproduction or distribution without written consent from Dynastream Innovations Inc. is strictly prohibited.
©2013 Dynastream Innovations Inc. All rights reserved.
FAQs
- Q: Can I use the ANT AN02 application note for device pairing in any ANT+ devices?
A: The application note is designed for specific ANT devices and should be used accordingly. Consult the manufacturer’s guidelinesfor compatibility. - Q: Is device pairing necessary for all ANT devices?
A: Device pairing is essential for establishing secure and accurate connections between ANT slave devices and transmitters, especially in multi-user environments.
Documents / Resources
![]() |
thisisant ANT Device Pairing [pdf] User Guide ANT Device Pairing, ANT, Device Pairing, Pairing |