当前位置:网站首页>Yiwen takes you to know ZigBee
Yiwen takes you to know ZigBee
2022-07-03 02:49:00 【Embedded Linux system development】
1、 Internet of things communication protocol
Common short-range wireless communication protocols

Internet of things communication protocol

Access mode - Cloud protocol
Support TCP/IP Internet of things devices , Can pass WIFI、 Cellular network and Ethernet , Use HTTP、MQTT、CoAP、LwM2M as well as XMPP And other application layer protocols to access the cloud .

Access mode - Gateway Protocol
Gateway protocol is a protocol applicable to short-range communication that cannot be directly connected to the cloud , Like Bluetooth 、ZigBee、LoRa etc. .
This kind of equipment needs to be switched by the access gateway , adopt TCP/IP The agreement goes to the cloud .

2、Zigbee Protocol Brief
One 、Zigbee history
ZigBee, The name comes from the way bees use to survive and develop : Bees jump Zig-Zag Dance of shapes to share the location of newly discovered food sources , Information such as distance and direction .
ZigBee The predecessor was 1998 Year by year INTEL、IBM And other industrial giants “HomeRFLite” technology .
2002 In the second half of , The British Invensys company 、 Mitsubishi Electric Co., Ltd 、 Motorola of the United States and Philips semiconductor of the Netherlands jointly announced their alliance “Zigbee union ”, The name of the research and development is “Zigbee” Next generation wireless communication standard .
Zigbee And IEEE 802.15.4
ZigBee It is an open system based on IEEE 802.15.4 Protocol wireless personal area network (Wireless Personal Area Networks) standard .
IEEE 802.15.4 The physical layer and media access control layer are defined , and ZigBee It defines higher layers such as network layer and application layer .


ZigBee Technical characteristics
- low power consumption : because ZigBee The transmission rate is low , The transmitting power is only 1mW, And sleep mode , Low power consumption , therefore ZigBee The equipment is very power-saving . It is estimated that ,ZigBee The equipment only relies on two sections 5 The No. 1 battery can last for up to 6 Months to 2 About years of use .
- Low cost : because ZigBee The complexity of the module is not high ,ZigBee The agreement is royalty free , Plus, there's no charge for the frequency band used , So it costs less .
- Time is short : The communication delay and the activation delay from the sleep state are very short , Typical search device delay 30ms, The delay of sleep activation is 15ms, The delay of channel access of active equipment is 15ms.
- Large network capacity : A star shaped structure ZigBee The network can hold up to 254 One slave and one master , A region can have up to 100 individual ZigBee The Internet , And the network composition is flexible . Reticular ZigBee There may be... In the network 65000 Multiple nodes .
- reliable : Collision avoidance strategy is adopted , At the same time, a special time slot is reserved for the communication services requiring fixed bandwidth , Avoid the competition and conflict of sending data .MAC The layer adopts the data transmission mode of full confirmation , Each sent packet must wait for the receiver's confirmation message . If there is a problem during transmission, it can be retransmitted .
- Security :ZigBee Cyclic redundancy check (CRC) Packet integrity check function , Support authentication and authentication , Adopted AES-128 Encryption algorithm , Each application can flexibly determine its security attributes .
ZigBee Some members of the Alliance

Two 、Zigbee Device type
ZigBee There are three types of devices in wireless sensor networks : The coordinator 、 Router 、 Terminal nodes
1、ZigBee The coordinator (Coordinator)
It contains all the network information , yes 3 The most complex of the devices , Large storage capacity 、 The strongest computing power .
It is mainly used to send network beacons 、 Build a network 、 Manage network nodes 、 Storage network node information 、 Find the routing information between a pair of nodes and continuously receive information .
Once the network is established , The coordinator acts like a router node .
2.ZigBee Router (Router)
The functions it performs include allowing other devices to join the network , Hop routing , Communication of battery powered terminal under auxiliary subtree .
3.ZigBee Terminal equipment (End-device)
A terminal device has no specific responsibility for maintaining the network device , So it can sleep and call , Look at its own choice .
So it can be used as a battery powered node .
3、 ... and 、ZigBee Network topology

Device type and topology relationship

ZigBee Reticular (MESH) The Internet

Four 、ZigBee Network building - Coordinator the process of building a new network
1、 Detect coordinator
The node must have two conditions :
- have ZigBee Coordinator function ,
- Not joined other networks .
Any process initiated by a node that does not meet these two conditions to establish a new network will be terminated by the network layer management entity
2、 Channel scan
Channel scanning includes energy scanning and active scanning .
3、 Configure network parameters
The network layer management entity will select one for the new network PAN The descriptor , Must satisfy PAN Descriptor is less than or equal to 0x3fff, It's not equal to 0xffff, And is unique within the selected channel PAN The descriptor
4、 Run the new network
5、 Allow devices to join the network
Only ZigBee Coordinator or router can pass through NLME_PERMIT_JOINING.request Primitive to set the node in a state that allows the device to join the network .
ZigBee Network building - Nodes join the network
1) adopt MAC Layer Association join the network
2) Join the network by connecting to the previously specified parent node
adopt MAC Layer Association join the network
- A child node initiates a channel scan
- Child nodes store each PAN Information
- Child node selection PAN
- Child node selects the parent node
- Child node requests MAC relation
- Parent node response MAC relation
- The child node responded that the connection was successful
- The parent node responded that the connection was successful
The networking operation is realized by the protocol stack .
5、 ... and 、ZigBee Application field
- Consumer electronics
- Home and building automation equipment
- Industrial control devices
- Agricultural automation
- computer peripherals
- Medical sensors
- Toys, game consoles and other equipment
- Support a small range of wireless communication based control and automation
3、Zigbee Protocol stack

ZigBee The protocol stack has many versions , From different manufacturers ZigBee There are some differences between protocol stacks .
Although the agreement is uniform , However, the specific implementation form of the protocol changes , That is, the protocol stacks provided by different manufacturers are different
- There are differences between function names and parameter lists
- Learn from the manufacturer Demo Demo program and documentation learning
Zigbee Protocol stack use
Use ZigBee The basic idea of protocol stack development can be summarized as the following three points :
- User for ZigBee The development of wireless network is simplified to that of application layer c Language program development , There is no need to delve into complex ZigBee Protocol stack ;
- ZigBee Data acquisition in wireless sensor networks , Users only need to add the sensor reading function in the application layer ;
- If energy conservation is considered , It can be timed according to the data acquisition cycle , Wake up when the time comes ZigBee The terminal node of , After the terminal node wakes up , Automatically collect sensor data , Then send the data to the router or directly to the coordinator .
边栏推荐
- Le processus de connexion mysql avec docker
- [shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
- Kubernetes cluster log and efk architecture log scheme
- 用docker 连接mysql的过程
- SQL Server Query spécifie la structure de la table
- Joking about Domain Driven Design (III) -- Dilemma
- 左值右指解释的比较好的
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- I2C 子系统(一):I2C spec
- 簡單理解svg
猜你喜欢
![ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc](/img/cb/145937a27ef08050a370d5a255215a.jpg)
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)

Pytest (6) -fixture (Firmware)

基于can总线的A2L文件解析(2)

Sqlserver row to column pivot

Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution

I2C 子系统(二):I3C spec

Summary of interview project technology stack

Add MDF database file to SQL Server database, and the error is reported

Pytest (6) -fixture (Firmware)
随机推荐
MUX VLAN Foundation
C语言中左值和右值的区别
The Linux server needs to install the agent software EPS (agent) database
Linear rectification function relu and its variants in deep learning activation function
Principle and application of database
[leectode 2022.2.15] lucky numbers in the matrix
Pytest (6) -fixture (Firmware)
Gbase 8C system table PG_ cast
二维格式数组格式索引下标连续问题导致 返回json 格式问题
Concrete CMS vulnerability
[flutter] example of asynchronous programming code between future and futurebuilder (futurebuilder constructor setting | handling flutter Chinese garbled | complete code example)
Informatics Olympiad one general question bank 1006 a+b questions
【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
SQL server queries the table structure of the specified table
Xiaodi notes
The process of connecting MySQL with docker
[translation] the background project has joined the CNCF incubator
Le processus de connexion mysql avec docker
Kubernetes cluster log and efk architecture log scheme
Can netstat still play like this?