Systematic analysis of each layer of the zigbee protocol stack

With the application of sensor networks; with the outbreak of the concept of Internet of Things; with the rapid development of communication technology, people have proposed the communication within a few meters of their own, so that the personal area network PAN (Personal Area Network) and The concept of Wireless Personal Area Network (WPAN). The WPAN network establishes a wireless connection for devices in close range, connecting multiple devices within a range of several meters to tens of meters wirelessly so that they can communicate with each other or even access the LAN or the Internet.

The zigbee alliance, established in August 2001, is an industry alliance established for the WPAN network. The alliance is dedicated to short-range, low-complexity, low data rate, low-cost wireless networking technologies. The technology they developed is called zigbee technology, which is expected to be deployed in other wireless sensing and control areas such as commercial electronics, residential and building automation, industrial equipment monitoring, PC peripherals, medical sensing devices, toys and gaming.

1.1 IEEE802.15.4 standard

The zigbee Alliance announced the first zigbee specification "zigbee SpecificaTIon V1.0" on June 27, 2005. This standard defines the network layer and supported application services on the IEEE 802.15.4-2003 physical layer and standard media access control layer. The long-term goal of the zigbee alliance is to be able to build scalable, low-cost embedded infrastructure based on interoperable platforms and profiles.

Zigbee, zigbee protocol, IEEE 802.15.4

1.1.1 IEEE802.15.4 Protocol Framework

The IEEE 802.15.4 standard adopts a hierarchical structure. Each layer provides a series of special services for the upper layer: the data entity provides the data transfer service, and the management entity provides all other services. All service entities provide an interface to the upper layer through the Service Access Point (SAP). Each SAP supports a certain number of service primitives to achieve the required functions.

The IEEE 802.15.4 standard stack architecture is defined on the basis of the OSI seven-layer model based on the actual needs of the market and applications, as shown in Figure 2-1. Among them, the IEEE 802.15.4 standard defines the underlying layer: Physical Layer PHY (Physical Layer) and Media Access Control Sub-Layer (MAC) layer. Based on this, the zigbee alliance defines the network layer NWK (Network Layer) and the application layer APL (ApplicaTIon Layer) architecture. The application layer includes an ApplicaTIon Support Sub-Layer, an ApplicaTIon Framework, a zigbee Device Objects, and a Manufacturer-Defined Application Objects. [16]

IEEE 802.15.4 operates in the Industrial Scientific Medical (ISM) band and defines two physical layer PHYs operating in two frequency bands: 868/915 MHz and 2.4 GHz. The low-band physical layer covers the 868MHz European band and the 915MHz band in the United States and Australia. The high frequency band 2.4GHz is universal.

The IEEE 802.15.4 MAC layer adopts the Carrier Sense Multiple Access with Collision Avoidance (CSMA) method, which is mainly responsible for transmitting beacon frames, synchronizing, and providing a reliable transmission mechanism.

1.1.2 Network Node Type

Zigbee, zigbee protocol, IEEE 802.15.4

There are three network roles in W-PAN: PAN network coordinator, coordinator, and device. These three roles correspond to the zigbee coordinator, the zigbee router, and the zigbee end device, respectively, in the IEEE 802.15.4 specification.

The coordinator and router can only be full-featured device FFDs. A PAN network must have at least one full-featured device as a network coordinator. It can be regarded as a PAN gateway node (SINK node), which is the starting point of network establishment, responsible for the initialization of the PAN network, and determining the PAN. The ID number and the physical channel of the PAN operation and coordinating the short address assignment, acting as a trust center and storing security keys, connections with other networks, and the like. The coordinator gets a certain short address space after joining the network. Within this space, he has the ability to allow other nodes to join the network and assign short addresses. Of course, the coordinator also has the function of routing and data forwarding. On any topology network, all devices have a unique 64-bit IEEE long address that can be used for direct communication in the PAN. Or when a connection already exists between all devices, it can be converted to a 16-bit network short address assigned to the PAN device. Therefore, when the device initiates the connection, a 64-bit long address is used. Only after the connection is successful, the system assigns the PAN identifier to communicate with the 16-bit short address. The router can only run a streamlined protocol stack that stores the routing protocol, and is responsible for routing network data and implementing data transfer functions.

The most basic node in the network is the terminal node ZED, and one terminal node can be a full-featured device FFD or a reduced-function device RFD.

1.2.1 IEEE 802.15.4

IEEE 802.15.4 includes two specifications for the physical layer PHY and the medium access control layer MAC for the low speed wireless personal area network LR-WPAN. Figure 2-4 shows the hierarchical reference model for IEEE 802.15.4.

1.2.1.1 IEEE 802.15.4 PHY layer

The role of the physical layer is to use physical media to provide physical connectivity to the data link layer.

According to the transmission rate and overhead data error rate, in order to transparently transmit the bit stream. The physical layer of the zigbee protocol is primarily responsible for the following tasks:

(1) Start and shut down the RF transceiver.

(2) Channel energy detection.

(3) Perform Link Quality Indication (LQI) on the received datagram.

(4) Provide CSA (Clear Channel Assessment) for the CSMA/CA algorithm.

(5) Select the communication channel frequency.

(6) Transmission and reception of data packets

The physical layer of IEEE 802.15.4 defines the interface between the physical channel and the MAC sublayer, providing data services and physical layer management services. The physical layer data service sends and receives data from the wireless physical channel, and the physical layer management service maintains a database composed of physical layer related data.

1.2.1.2 IEEE 802.15.4 MAC layer

The IEEE 802.15.4 media intervention control layer follows the CSMA/CA mode of carrier multi-path listening access with collision avoidance in the traditional wireless local area network to improve system compatibility. This design not only makes the application of multiple topologies network simple, but also achieves very efficient power management.

The specific tasks completed by the MAC layer are as follows:

(1) The coordinator generates and transmits a beacon frame (Beacon).

(2) The normal device synchronizes with the coordinator according to the coordinator's beacon frame.

(3) Support Association (Association) and Disassociation (Passionation) operations of the PAN network.

(4) Provide support for the security of the device.

(5) Sharing physical channels using the CSMA-CA mechanism.

(6) Processing and maintenance of the time slot guarantee GTS (Guaranteed Time Slot) mechanism.

(7) Provide a reliable data link between two peer MAC entities.

The concept of superframe structure and beacon frame is introduced in the MAC layer of IEEE 802.15.4. The introduction of these two concepts greatly facilitates network management. We can choose to organize communication between devices in the LR-WPAN network on a superframe basis. Each superframe begins with a beacon frame sent by the network coordinator, and the beacon frame contains information such as the duration that the superframe will last and the allocation of the time. After receiving the beacon frame at the beginning of the superframe, the ordinary device in the network can arrange its own task according to the content, for example, enters the sleep state until the end of the superframe.

The MAC sublayer provides two services: a MAC layer data service and a MAC sub-layer management entity (MLME). The former guarantees that the MAC protocol data unit is correctly sent and received in the physical layer data service, and the latter maintains a database that stores information related to the MAC sublayer protocol.

SMD Transformer

SMD Electric Power tansformer ,POE transformer ,EP7 SMD tansformer ,EP13SMD tansformer,EPD SMD tansformer

IHUA INDUSTRIES CO.,LTD. , https://www.ihua-sensor.com