Ant Wireless Communication Technology (2) channel configuration

Source: Internet
Author: User

I. Introduction of ANT Channel

The Ant channel configuration is key in ant application development. The official document is called "channel", The reason why I translated "channels", rather than "channel" or "band", because the latter two words are commonly used in the field of electronic communication is a proprietary concept, often with a lot of technical background and color. Ant Channel has a richer logical meaning with its flexible network communication, and the use of the most widely used word "channel" in Chinese is a better way to describe this abstract logical concept.

an ant channel is used to connect at least two nodes so that it can exchange information. Each channel has at least one primary node (master node) and one Slave (Slave node).

The main role of the primary node is the sender of information, from the role of the node is mainly the recipient of information. Note that the word "primary transmisstor", also means that the master node is not completely unable to receive information, he can also reverse receive, from the node is not completely unable to send information, when necessary, he can also reverse the transmission.

In general, we define the direction in which data messages are transmitted:

1. Forward transfer master node ———————— > slave node (always)

2. Reverse Transfer Master node < ———————— slave node (optional)

Second, ant channel Configuration

Then, by setting some parameters, we can implement the configuration of the Ant channel. There are several parameters that need to be set:

1. Channel type

1.1 Optional extended allocation (optional extended Assignment)

2. Wireless Frequency (RF freq.)

3. ChannelID

3.1 Unit Number (device ID)

3.2 Transport type (transmission type)

3.3 Device Type

4. Channel cycle (channels period)

5. Networking (Network )

5.1 Network number

5.2 Network key (NET key)

The following is a detailed description of the specific contents of each parameter.

1. channel type [8bit]

The ant protocol defines 4 channel types based on how channels are used, and is defined using a 8bit data field. All nodes need to set their own channel type before communication, we can understand that this "self-discipline" behavior, in fact, is for us to define the node's master and slave to provide convenience. To give an interesting example, the main node compared to the Royal MA, from the node to the slave, then naturally found that Huang Ma always orders the people, and minions only listen to the purpose of the part. :D

Numerical

Channel type

Describe

0x40

One-way master/slave channel

Only for the most classic and "oldest" broadcast data types, nodes are either single-shot or unicast, and therefore cannot be used in situations where high-level mechanisms such as network management are required.

0x10

Bidirectional main Channel

Defines a node as a master node in a bidirectional channel.

0x00

bidirectional slave Channel

Defines a node as a slave node in a bidirectional channel.

0x20

Sharing two-way channels

This is the most "advanced" form for situations where more than 2 nodes share a single channel. A master node, for example, exchanges data on multiple slave nodes on a single channel.

Table 1 Ant channel types

1.1 Optional extended allocation [8bit?]

Optional extended assignment by setting a field, you can turn on advanced features such as the anti-jamming frequency agility feature (freq. Agility), and the background search channel functionality used by the debug network (background scanning channel). Let's go back and talk about this in detail.

2. Wireless Frequency [8bit]

Ant Technology uses the 2.400ghz~2.524ghz band, also known as 2400mhz~2542mhz, to communicate at 1MHz intervals, divided into 125 small bands. A channel can only work on a small band, not at the same time in multiple small bands.

The following formula is used to determine the wireless frequency of the node's work:

where the wireless frequency setpoint rf_frequency_val range is 0x00~0x7c

3. Channel ID [16bit+8bit+8bit]

The Channel ID contains three contents: device number, transport type, device type. The Channel ID is a basic description of a channel. For the master node, it should set its channel ID to indicate its own "properties". For example, "Huang Ma" and "General", are the main node, can send information, but one is the management of "imperial Decree" is a war "military orders", obviously different types, must be differentiated by device type. Again, such as the elder brothers to the bottom "message", how do the small eunuch know is which elder brother words? From "Big elder brother" to "bug", the device number from one to eight, this is good to run. In addition, the transmission type can be used to define certain transmission characteristics, leaving developers free to play.

In this way, the master node sets its own channel ID, which can be used to match the master node when looking for the primary node. You can also use a 0-pass with multiple master nodes at this time.

3.1 device number [16bit]

Each node should have a unique device number that is used by other nodes to identify themselves. Of course, from a node you can use 0-pass to all the master nodes. If you use a 16-bit field number, we can calculate that in a shared two-way channel of the Ant network, the maximum number of 2^16-1 nodes is supported, minus the 1, which is the primary node.

3.2 Transmission type [8bit]

Transport types are used to define some of the transmission characteristics of a device, allowing developers to play freely. The official practice is to use the top four bits with the previous device number, extend the device number domain to 20bit, and then use the lowest two bits as the enable switch for the shared address domain to indicate whether the shared address domain in the valid data payload (data payload) is enabled and how long.

3.3 Device Type [8bit]

Used to classify equipment (master) on-demand, such as a type of temperature meter in the form of a functional logic heart rate, so that the device (from) can easily communicate with a class of devices in a pre-set manner. The highest bit in the 8 bit is the pairing bit, which indicates whether the main device is allowed to be paired from the device, which we'll go to later chapters. In other words, you can divide 2^7 device types altogether.

In addition, if the full channel ID domain is used as the device number field, we get the ant network theory of the maximum number of nodes is 2^32, this is the official data.

4. channel cycle [16bit]

Set the transmission frequency of the primary node, the range 0.5hz~200hz, that is, the slowest 2s once, the fastest 0.005s a time. The channel period is set by the following formula:

channel_period_val Value range 163.84~65536

The official recommended channel period is 4Hz, which is the set value of 8192. This is a tradeoff between power consumption and transmission rate, because the device power consumption is related to the channel cycle, the smaller the cycle, the greater the power consumption, the faster the transmission rate, the faster the device search speed.

5. network [8bit+8*8bit]

An ant network consists of at least 2 nodes, and using the concept of a network, you can distinguish between nodes that have different communication rules. A particular network has a specific set of rules, such as the Ant+ network, which is essentially an open industry alliance of different businesses in the same field. Openness refers to the technical specifications that are only open to members of the alliance. This is what we often call the configuration "profile". Profiles can be used to specify parameters such as data format, channel parameters, network key, and so on.

In my opinion, the emergence of ant networks not only helps to improve the interoperability of devices between different vendors, but more importantly helps to improve ant technology and help ant strengthen its position in certain areas. By raising the threshold of access, Nordic can easily be a large number of celestial-based factory to scare away, and then attract wherewithal strong manufacturers to cast ant under the door, together to raise high-tech prices, to earn more profits. When the manufacturers of things occupy the market, with the advantage of the industry can be rejected later technology, such things will happen in the equipment life cycle long, the performance needs to upgrade a few areas. Even with newer and better technologies, if you're not willing to sell cheaply, you can't sell. These are all technical aspects of the game, what do you think of? TD Right, hehe.

Pull away and get back to the chase. Since is tall, at present still can not play the simple point to say!

    • Net Network Number: Used to identify an ant net, the default 0 is the public network.
    • Network key: Used for encryption and decryption "pass" in a specific network, corresponding to the network number, the default 0 is the public network key, expensive.

This is an introduction to each of the parameters in the Ant channel configuration, and the next chapter complements several concepts to give an ant node pairing channel configuration instance.

             

Ant Wireless Communication Technology (2) channel configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.