1512 views|0 replies

3836

Posts

19

Resources
The OP
 

Basic knowledge of Zigbee [Copy link]

Build a small IoT system based on Zigbee, and start recording your learning process today

1. The essence of the Zigbee protocol stack is a real-time kernel (RTOS) + a set of communication protocols.

2. The main difference between routers, coordinators, and terminal devices is at the software level. In terms of hardware, these three can be exactly the same thing. The coordinator is responsible for starting and configuring the entire network. Once its task is completed, the coordinator generally retreats to the second line and plays the role of a terminal device or router. The router mainly completes the function of communication relay. The terminal device is in sleep mode most of the time.

3. There are three main network structures: star, tree and cluster, which are defined using #define in the network layer code of the ZigBee protocol stack.

4. Zigbee beacon mode and non-beacon mode, the non-beacon mode is commonly used.

5. Zigbee devices have two types of addresses. The first is a 64-bit IEEE address, namely the MAC address, which is globally unique; the second is a 16-bit network address. The network address of the coordinator is 0x00. The coordinator is responsible for assigning addresses to routers and terminal devices.

6. z-stack is a semi-open source protocol stack. We cannot clearly see the source code of each layer. Some codes are provided in the form of libraries. In general, we should at least understand the code of the hardware abstraction layer and the device object layer. Here we need to add the functions we want. There are system message events, LED events, and keyboard events in the hardware abstraction layer. There are system message events, ZDO state change events, network initialization events, network startup events, network update NV events, and device restart events in the device object layer. Application layer events include system message events, binding time events, binding time events, entry events, user events, etc.


7. The real-time requirements of the Zigbee protocol stack are not very high. Therefore, when designing the task scheduler, OSAL (operating system abstraction layer) adopts the polling scheduling queue method for task scheduling.

The smaller the task number, the higher the task priority. The MAC layer has the highest priority, and the application layer has the lowest priority. The OS executes events according to the priority level and polls them repeatedly.


Introduction to the zigbee project file directory:

APP: Application layer files, *.c and *.h, can be added and modified according to project needs

HAL: Hardware Abstraction Layer, corresponding to the physical layer (PHY)

MAC, ZMac: Files related to the data link layer. The files in them cannot be modified. They are all library files and APIs. They are not open source and do not need to be modified.

MT: files related to serial port debugging

NWK: Network layer files, all *.h files, are APIs, and can be used directly without adding or modifying them

OSAL: Files related to the operating system (OS)

Profile: Files related to protocol stack specifications

Security: Files related to security mechanisms, no modification is made

Services: service-related files

Tools: Some configuration files, such as the configuration information of the coordinator and router, do not need to be modified

ZDO: Zigbee device object layer file, very important, through the files in this directory you can know the operation process of the protocol stack, you need to understand

ZMain: The entry point of the entire protocol stack. The main function is in this directory. The program should generally be read from this directory.

Output: The output file of the project, in which *.map is the output of the entire project compilation, including information such as memory allocation and code size

Zigbee Terminology:

NV: non-volatile memory, such as nand flash

FFD: Full-function device, such as router, coordinator

RFD: Semi-functional device, such as terminal device node

Cluster: A collection of multiple attributes, each cluster has a unique ID

Descriptor: A device can have 240 endpoints, each of which must have an endpoint descriptor, which is a structure

This post is from Wireless Connectivity
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list