Understanding of ZigBee Ports

Source: Internet
Author: User

It is important to have multiple endpoint endpoint on a terminal.

A node can have multiple endpoints, number No. 0 is an endpoint used by ZigBee device object (ZDO), and number No. 255 is used as a broadcast endpoint. What we can define ourselves is 1-240 of these endpoints. Each endpoint corresponds to a task TaskID. Therefore, we need to configure a new task for each additional endpoint TaskID

        cite a column sub-:  example one: a wireless node (radio unit) A has a temperature and humidity sensor, a air conditioning control system, and another wireless Node B is responsible for receiving a return of the temperature data, And through certain algorithms to control the air-conditioning system. We don't care how B is implemented, only how a is implemented. A very normative implementation of this situation is: temperature and humidity sensor set a endpoint, for example, 10th; the air conditioning control system set a endpoint, for example, number 20th. Also note that you should also set up a task for each endpoint, so that when registering the endpoint descriptor (called the Afregister function), the protocol stack is described to the bottom of the task of processing this endpoint data who. This way: When B wants to get the temperature and humidity, he will send a short address with a and terminal 10th information, this information to a, the protocol stack will transfer this message to the 10th endpoint of the corresponding task to deal with, the management of the air conditioning terminal 20th does not see the message at all; Similarly, if b wants to control the air conditioning , the packet he sends will contain a short address and terminal 20th information, and a will send a message to the endpoint 20th task to process. (It is important to note that at the network level there will often be a message sent to ZdO, this time the packet will be the endpoint number is No. 0 number). This method of assigning different functions to different endpoint is very advantageous to the division of tasks and is a very formal method.

Example second wireless node (radio uint) A has 4 LEDs to be controlled, and the other wireless Node B has 4 switches to control the 4 LEDs. The canonical implementation of this scenario is to set up a endpoint for each led (you can arbitrarily specify within the allowed range, as long as you do not repeat), and create a task for each endpoint.    After this processing, B can use the same command to control 4 LEDs instead of each led with different commands, which in fact must be done in public profiles. The above two examples may be a lot of students think too troublesome, completely flexible. The idea is that all of my controlled objects fall on a endpoint, but I send the contents of the packet is different, the receiving end of the endpoint by parsing the contents of the packet to determine what to do, this approach can actually be achieved, but you need to specify the format of the packet, That is, what the first few bytes mean ..... Although this can be achieved, but I do not agree with this, on the one hand, actually increases the complexity of your programming, on the other hand, there is no possibility of interconnection, especially when you use ZCL, this way will not work

Understanding of ZigBee Ports

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.