# Design of Remote Environmental Monitoring Network Based on Intelligent Sensor Network Address Allocation and Addressing

Authors: Jinyong Liu
Journal: Journal of Sensors
 (2021)

---

## Abstract

Based on the wireless sensor network, this paper combines node monitoring data with intelligent network address management. Users can view real-time environmental data through a computer or mobile phone and can manually remotely manage the environmental adjustment equipment of the network address through the mobile phone. This article first discusses the research background of the subject, introduces the current domestic and foreign research status of WSN in environmental detection, and analyzes the reasons for choosing ZigBee network as the wireless transmission environment of the intelligent monitoring system. Secondly, the structure, layered model, and key technologies of wireless sensor networks are introduced, and it is pointed out that ZigBee technology, which has the characteristics of low power consumption, reliable communication, self-organization of the network, strong self-healing ability, and low cost, is very suitable for application in the environment. Then, it analyzes TI’s protocol stack Z-Stack based on the ZigBee2006 standard and analyzes the network address assignment and addressing in Z-Stack, the process and steps of node binding, the routing mechanism and routing maintenance, and channel configuration. The realization of other functions was discussed in depth. During the simulation experiment, in the hardware design of the intelligent monitoring system, the network node was divided into two parts: the core board and the backplane. The crystal oscillator, power supply, antenna, and I/O port circuits of the core board were designed, and the data acquisition, relay, and power supply of the backplane were designed. Finally, this paper studies the data security issues in the environmental monitoring network and proposes two solutions to control network access and data encryption. Experimental results show that in terms of low-power design, the energy of the entire system is calculated to determine the factors that affect the power consumption of the system and methods such as increasing the node sleep time to ensure that the system can work for a long time.


---

## Body

## 1. Introduction

Environmental monitoring has the characteristics of large number of monitoring points in the area, long monitoring time, and complicated monitoring conditions. Aiming at the shortcomings of traditional environmental monitoring methods such as difficult network layout and low node intelligence, a wireless sensor environmental monitoring network system based on the ZigBee protocol is designed [1]. The system has the advantages of large number of nodes, high reliability, convenient network layout, and remote control. However, the monitoring device using a wired network is easily affected by factors such as geographical environment and cumbersome wiring, and the cost and difficulty of installation, maintenance, and update are relatively large, which brings certain inconvenience to the majority of users, so it is of little promotion. Therefore, there is an urgent need for a wireless intelligent monitoring system that can detect environmental information and take corresponding measures according to the results during the planting process of the network address [2–5].Considering that wireless sensor network technology is more and more used in the field, and WPAN based on IEEE 802.15.4 standard has the advantages of low speed, low cost, and low power consumption, this paper proposes based on the existing research at home and abroad. The design scheme of the visual monitoring system of the network address environment based on the wireless sensor network is of great significance to the current network control system [6–8]. The web client can display historical data and real-time data. The Android client has the update function of real-time data, the display function of the map, and the alarm mechanism of abnormal data. The design of the client provides users with visualization intuitive data. The design of the system mainly includes the design of the lower computer for collecting network environment parameters and the design of the upper computer for intelligent monitoring of the network environment. The lower computer adopts the ZigBee wireless sensor network. In order to realize the data collection and transmission function of the wireless sensor network, the hardware node is designed in a modular way. Hardware nodes mainly include sensor modules that collect environmental parameters in the network, control modules for adjusting network environment equipment, wireless communication modules, processor modules of the CC2530 chip, serial communication modules, and power modules for hardware energy control [9–11].In the software design of the intelligent monitoring system, IAR is used to complete the compilation of the Zigbee networking protocol stack, so that the nodes can form a network and perform data transmission in a wireless and autonomous manner; the PC monitoring platform uses Visual C++ as the development environment and uses the industrial control iocomp to realize the functions of network address environment data display, fuzzy temperature control, server construction, and alarm; Android client uses the Eclipse development platform, designed for the menu, user interface, server connection, and other modules and realizes the use of mobile phones to obtain environmental data and control network addresses. The routing protocol of wireless sensor networks is studied, RPL (Routing Protocol for Lossy and Low.power Networks) routing is implemented, and the performance of RPL routing is analyzed. The comparison with CTP (CollectionTree Protoc01) routing shows the good performance of RPL routing. Based on the RPL routing, a wireless sensor network-based environmental data collection function is designed; the function of the server and the MySQL database for storing environmental data are designed, and the network communication between the server and the client is realized.


## 2. Related Work

At present, researchers have many scientific research results in the fields of industrial control, intelligent transportation, smart home, environmental monitoring, etc. In the current research results, different researchers use different technologies in different directions to achieve research goals. For example, based on the research of ZigBee protocol, based on Tinyos operating system, and based on the research of embedded Linux system, some researchers used GPRS, TCP/IP, etc. to study the combination of wireless sensor network and the Internet [12–14].Trevathan and Johnstone [15] proposed a biochemical sensor that detects hazardous substances and hazardous material information to reduce damage to human safety and designed a digital detection device for ambient temperature and light intensity to achieve real-time temperature and light in various environments and detect and display the obtained data in real time to realize human-computer interaction. Iqbal et al. [16] studied the WSN gateway and designed the interconnection between the wireless sensor network and the external network, designed the network measurement and control system, and realized the collection of network environment parameters on the hardware and the acquisition and processing of the data on the software. Yadav et al. [17] studied agricultural monitoring based on wireless sensor network technology and implemented it on hardware and designed the communication protocol. The wireless sensor node sends environmental data to the master node every 15 minutes through the GPRS gateway, and the master node uses TCP. The IP protocol forwards the data to the remote server. Mukherjee et al. [18] designed an environmental monitoring system based on wireless sensor network precision agriculture. It can automatically collect temperature, humidity, pressure, and other data and transmit the data to a remote server through GPRS. This system also includes web services, google map, and SMS (Short Messaging Service) alarm and other services. Adeel et al. [19] proposed a remote agricultural network monitoring system based on WSN and SMS. It can accurately capture the environmental information in the greenhouse and send short messages to farmers when the environmental data changes abnormally. The location environment is difficult to detect. They designed an ARM-based multilocation wireless detection system, which uses an ARM controller to control the SMS TC35i module and send and receive SMS messages.Because the scale of sensor network deployment is very large, how to connect the nodes in the sensor network to the Internet is a difficult point. We know that IPv4 addresses are almost exhausted at present, and it is no longer necessary to allocate IPv4 addresses to sensor network nodes. Because of the huge number of IPv6 addresses, the application of IPv6 technology in wireless sensor networks will enable each node to be assigned an IP address. Therefore, IETE established the 6LoWPAN (IPv6 over Low Power WPAN) working group, committed to the standardization of the IPv6 protocol on the IEEE802.15.4 standard. The randomness of environmental monitoring is reflected in two aspects. One is that the data collected at one point is very random. Therefore, in order to obtain accurate results, it is generally necessary to collect large-scale and large data points through statistical methods. In addition, on the whole, the type, quantity, size, and temporal and spatial distribution of information are all randomly affected by people’s social behavior, natural factors, and specific environmental conditions, with obvious randomness [20].


## 3. Design of a Network Model for Remote Environmental Monitoring Based on Address Allocation and Addressing of Smart Sensor Networks

### 3.1. Smart Sensor Network Topology

Intelligent wireless sensor network refers to the detection of environmental conditions in the area by sensor nodes distributed in the sensing field, and the data is fused and transmitted. Finally, the gateway node is responsible for processing the data and passing it to the upper computer for further processing. It includes cutting-edge technology such as sensor technology, microprocessors, and wireless communication networks. Figure1 is the smart sensor network topology.Figure 1
Smart sensor network topology.The architecture of the WSN network is mainly composed of the following points: the terminal node is an important component of the sensor network, which contains an embedded system, which is mainly responsible for detecting and sending the data information of the detection target in the sensing field. It is generally battery-powered and located in the WSN. The routing node is more capable of data processing and forwarding than the terminal node. It can be regarded as an enhanced terminal node, which is essentially a terminal node that does not contain a detection module.(1)Uxtn>xtn∣xtm−1=vtm−1,xtm−2=vtm−2,Ustm+n=U11m+nU12m+nU1sm+nU21m+nU22m+nU2sm+nUs1m+nUs2m+nUssm+n.The coordinator is mainly responsible for the formation, maintenance, and joining of the entire sensor network. It is generally connected to the local computer and acts as a gateway; the local computer visually displays and stores the information collected by the terminal nodes. On-site detection information is sent to a remote computer through the Internet network, so that users can remotely read information and send control information.(2)Ux,y,s,t=∫Ix,y−c1+s−1×Ix,y,s,t×dA,gs,t=ws,t×x+ws,t×xi−1,ws,t=fi,x.The network architecture mainly refers to the layered structure of network protocols. The network protocol architecture of WSN is designed based on the Internet architecture. Due to the differences in bandwidth, node capabilities, operating environment, network scale, communication range, and specific application requirements, its network protocol architecture is somewhat different from the Internet network structure.(3)Ustm,n≥0,s,t∈R,∑i=1kUstm,n<0,s,t∈R.Considering the cost of equipment hardware, the carrier sense multiple-access method usually used in practical applications is Carrier Sense Multiple Access-Conflict Avoidance (CSMA-CA). In the absence of direct conflict control, the data link layer generally adopts error control methods to ensure the success rate of node transmission. The used error detection technology such as cyclic redundancy check with response signal is usually a very effective error control technology in WSN.(4)εx,x−∂fx,y,z∂x=0,εy,y−∂fx,y,z∂y=0,εz,z−∂fx,y,z∂z=0.During signal transmission, the ZigBee network accesses the MAC layer. MAC selects the CSMA/CA control algorithm, which can effectively bypass the mutual interference and accumulation of signals in the transmission process. At the same time, the control layer can be compatible with the confirmed signal communication method and more efficiently confirm the safe communication of the signal.


### 3.2. Network Address Allocation Design

The address allocation module of the Zigbee network consists of a variety of nodes, including terminal nodes, routing nodes, and coordinator nodes (gateway nodes). The terminal nodes are divided into data collection nodes and environmental control nodes. The data collection nodes contain multiple environmental sensors. The main function is to detect various environmental factors and convert them into electrical signals. In order to detect the environmental information of the network address more comprehensively, the user data collection nodes can be placed in different locations of multiple network addresses; the environmental control node is controlled by the intelligent monitoring system and controls the environment adjustment equipment in the network through a relay to ensure that the network address always keeps the crop in the optimal growth environment.The routing node is more capable of data processing and forwarding than the terminal node. It can be regarded as an enhanced terminal node, which is essentially a terminal node that does not contain sensors. The coordinator node is mainly responsible for the formation and maintenance of the entire sensor network and controls the joining of terminal nodes. It is generally connected to the local computer and acts as a gateway. Figure2 shows the WSN network node address allocation.Figure 2
WSN network node address allocation.Route selection is a process in which devices in the network cooperate to find and establish routes, usually initiated by a router. It searches all possible routes between the source address and the destination and tries to find the best route. The basis of route selection is the least link cost, that is, the route with the least consumption is selected. Each node must constantly track the link consumption of all its neighbor nodes, which is a function of the signal strength it receives. The cost of a route is to add up the cost of all the links from the source address to the destination and choose the route with the least cost. The mesh network provides route maintenance and self-repair functions. The middle node will record the transmission failure on the link. If a link is considered to be down, all nodes on this link will start link repair. It usually starts a rediscovery process the next time after a data packet arrives on this link. If the process of rediscovering the route cannot be started, or fails for some reason, it will send a RERR to the sending node of the data packet, and then, it will reinitiate a route discovery process. Either way, the establishment of the route will be completed automatically.


### 3.3. Environment Remote Monitoring Architecture

The environmental remote monitoring data link layer is responsible for the media access control (MAC) and error control of the wireless sensor network. Carrier Sense Multiple Access (CSMA) is the most commonly used data access technology in WSN, and its working principle is the network node monitors whether the communication channel is free before sending data. If the channel is occupied, the node will detect again within a certain period of time and close the circuit during the waiting period to save energy; the network layer is responsible for network connection, routing management, and congestion in the wireless sensor network cControl, etc., compared with the general network; WSN has the characteristics of high node distribution density and large number, so the network has greater limitations in computing power, storage capacity, and energy consumption.The transmission layer is mainly responsible for the control of data stream transmission in WSN to ensure the safety and reliability of data transmission. In actual use, since WSN is relatively small compared with traditional Internet data transmission, the necessity of the transmission layer of wireless sensor network has not yet been obtained. Figure3 is the process of environmental remote monitoring architecture.Figure 3
Process of environmental remote monitoring architecture.In the network, if you want to send data or commands to other nodes, use the AF_DataRequest() function. This function requires that the sending destination address and Endpoint must be known. Endpoint is a data addressing method defined in the ZigBee communication protocol. Each device supports up to 240 Endpoints. For example, a button, a sensor, or a light can be an Endpoint. The destination address mode has the following values: AddrNotPresent (unknown address mode), Addr16Bit (short address mode), AddrGroup (group address mode), and AddrBroadcast (broadcast mode).The concept of kernel has two purposes: one is as the calculation basis of attribute reduction, and the other is that it can be interpreted as the most important conditional attribute in attribute reduction. These address modes are all necessary, because in ZigBee, data packets can be unicast, multicast, or broadcast. The function ZDO_ProcessMgmtLeaveReq can be used to disconnect the node itself or its child nodes from this network, and it does so based on the IEEE address provided. If a node leaves itself from the network, it usually waits for 5 seconds and then restarts. After restarting, the node enters a quiescent state. It will not try to rejoin the network again. If a child node of a node leaves the network, it will delete the device from the contact list. If this address belongs to a terminal device, this address will be reassigned to other terminal devices. If it is a router, this address will no longer be used. If the parent node of a node leaves the network, it will remain in the network.


### 3.4. Monitoring Network Design Factor Changes

The PC monitoring network control terminal adopts Visual C++ as the development environment, and the industrial control iocomp is used to realize real-time processing and display of the data information transmitted by the gateway. After collecting the environmental information data of the terminal node and calculating the fuzzy algorithm, the PC monitoring terminal will display the result. It is converted into corresponding control information and sent to the relevant terminal control node. And when the environmental information exceeds the warning value or the human thermal infrared sensor (which can be turned on at night for anti-theft) is triggered, the PC monitoring terminal will send out an alarm message.The Android mobile phone monitoring terminal of the intelligent monitoring system will be installed with a monitoring program compiled by Eclipse, which can connect to the Internet through a 3G/4G network to obtain real-time network address environmental information and realize direct manual control of network address environment-related adjustment equipment on the client. After confirming the coordinator, the FFD node starts the channel scan. There are two processes for channel scanning: active scanning and energy scanning. The first is to perform energy scanning. In this process, in order to reduce unnecessary interference as much as possible, the FFD node will start energy scanning on the designated channel. The function of energy scan is to select channels within the allowable range of energy levels. Figure4 shows the WSN remote monitoring data distribution.Figure 4
WSN remote monitoring data distribution.When sending data but do not know the destination address, the address mode needs to be set to AddrNotPresent, and the address cannot be specified. The destination address can only be searched from the binding table. After it is found, the data can be sent in a point-to-point sending mode or group sending mode. In ZigBee2004, all binding tables are stored in the coordinator. At this time, the sending node will send the data to the coordinator, and then, the coordinator will forward the data to the destination address found in the binding table. The binding mechanism usually uses key presses or other similar actions on the device to be bound to complete a binding within the specified timeout period. The default timeout period (APS_DEFAULT_MAXBINDING_TIME) is 16 seconds. The ZDApp_SendEndDeviceBindReq() function calls ZDP_EndDeviceBindReq() to send the binding information to its parent node. After the parent node receives it, it will parse the function ZDO_ProcessEndDeviceBindReq() and call ZDApp_EndDeviceBindReqCB() and ZDO_MatchEndDeviceBind() to process the request. When the corresponding Cinda is not found, the network layer will return through the corresponding parameters and notify the upper layer of the network initialization failure. Active scanning is to scan the network information within the communication range. Based on this information, the FFD node can determine a channel that is used by little or no equipment.


## 3.1. Smart Sensor Network Topology

Intelligent wireless sensor network refers to the detection of environmental conditions in the area by sensor nodes distributed in the sensing field, and the data is fused and transmitted. Finally, the gateway node is responsible for processing the data and passing it to the upper computer for further processing. It includes cutting-edge technology such as sensor technology, microprocessors, and wireless communication networks. Figure1 is the smart sensor network topology.Figure 1
Smart sensor network topology.The architecture of the WSN network is mainly composed of the following points: the terminal node is an important component of the sensor network, which contains an embedded system, which is mainly responsible for detecting and sending the data information of the detection target in the sensing field. It is generally battery-powered and located in the WSN. The routing node is more capable of data processing and forwarding than the terminal node. It can be regarded as an enhanced terminal node, which is essentially a terminal node that does not contain a detection module.(1)Uxtn>xtn∣xtm−1=vtm−1,xtm−2=vtm−2,Ustm+n=U11m+nU12m+nU1sm+nU21m+nU22m+nU2sm+nUs1m+nUs2m+nUssm+n.The coordinator is mainly responsible for the formation, maintenance, and joining of the entire sensor network. It is generally connected to the local computer and acts as a gateway; the local computer visually displays and stores the information collected by the terminal nodes. On-site detection information is sent to a remote computer through the Internet network, so that users can remotely read information and send control information.(2)Ux,y,s,t=∫Ix,y−c1+s−1×Ix,y,s,t×dA,gs,t=ws,t×x+ws,t×xi−1,ws,t=fi,x.The network architecture mainly refers to the layered structure of network protocols. The network protocol architecture of WSN is designed based on the Internet architecture. Due to the differences in bandwidth, node capabilities, operating environment, network scale, communication range, and specific application requirements, its network protocol architecture is somewhat different from the Internet network structure.(3)Ustm,n≥0,s,t∈R,∑i=1kUstm,n<0,s,t∈R.Considering the cost of equipment hardware, the carrier sense multiple-access method usually used in practical applications is Carrier Sense Multiple Access-Conflict Avoidance (CSMA-CA). In the absence of direct conflict control, the data link layer generally adopts error control methods to ensure the success rate of node transmission. The used error detection technology such as cyclic redundancy check with response signal is usually a very effective error control technology in WSN.(4)εx,x−∂fx,y,z∂x=0,εy,y−∂fx,y,z∂y=0,εz,z−∂fx,y,z∂z=0.During signal transmission, the ZigBee network accesses the MAC layer. MAC selects the CSMA/CA control algorithm, which can effectively bypass the mutual interference and accumulation of signals in the transmission process. At the same time, the control layer can be compatible with the confirmed signal communication method and more efficiently confirm the safe communication of the signal.


## 3.2. Network Address Allocation Design

The address allocation module of the Zigbee network consists of a variety of nodes, including terminal nodes, routing nodes, and coordinator nodes (gateway nodes). The terminal nodes are divided into data collection nodes and environmental control nodes. The data collection nodes contain multiple environmental sensors. The main function is to detect various environmental factors and convert them into electrical signals. In order to detect the environmental information of the network address more comprehensively, the user data collection nodes can be placed in different locations of multiple network addresses; the environmental control node is controlled by the intelligent monitoring system and controls the environment adjustment equipment in the network through a relay to ensure that the network address always keeps the crop in the optimal growth environment.The routing node is more capable of data processing and forwarding than the terminal node. It can be regarded as an enhanced terminal node, which is essentially a terminal node that does not contain sensors. The coordinator node is mainly responsible for the formation and maintenance of the entire sensor network and controls the joining of terminal nodes. It is generally connected to the local computer and acts as a gateway. Figure2 shows the WSN network node address allocation.Figure 2
WSN network node address allocation.Route selection is a process in which devices in the network cooperate to find and establish routes, usually initiated by a router. It searches all possible routes between the source address and the destination and tries to find the best route. The basis of route selection is the least link cost, that is, the route with the least consumption is selected. Each node must constantly track the link consumption of all its neighbor nodes, which is a function of the signal strength it receives. The cost of a route is to add up the cost of all the links from the source address to the destination and choose the route with the least cost. The mesh network provides route maintenance and self-repair functions. The middle node will record the transmission failure on the link. If a link is considered to be down, all nodes on this link will start link repair. It usually starts a rediscovery process the next time after a data packet arrives on this link. If the process of rediscovering the route cannot be started, or fails for some reason, it will send a RERR to the sending node of the data packet, and then, it will reinitiate a route discovery process. Either way, the establishment of the route will be completed automatically.


## 3.3. Environment Remote Monitoring Architecture

The environmental remote monitoring data link layer is responsible for the media access control (MAC) and error control of the wireless sensor network. Carrier Sense Multiple Access (CSMA) is the most commonly used data access technology in WSN, and its working principle is the network node monitors whether the communication channel is free before sending data. If the channel is occupied, the node will detect again within a certain period of time and close the circuit during the waiting period to save energy; the network layer is responsible for network connection, routing management, and congestion in the wireless sensor network cControl, etc., compared with the general network; WSN has the characteristics of high node distribution density and large number, so the network has greater limitations in computing power, storage capacity, and energy consumption.The transmission layer is mainly responsible for the control of data stream transmission in WSN to ensure the safety and reliability of data transmission. In actual use, since WSN is relatively small compared with traditional Internet data transmission, the necessity of the transmission layer of wireless sensor network has not yet been obtained. Figure3 is the process of environmental remote monitoring architecture.Figure 3
Process of environmental remote monitoring architecture.In the network, if you want to send data or commands to other nodes, use the AF_DataRequest() function. This function requires that the sending destination address and Endpoint must be known. Endpoint is a data addressing method defined in the ZigBee communication protocol. Each device supports up to 240 Endpoints. For example, a button, a sensor, or a light can be an Endpoint. The destination address mode has the following values: AddrNotPresent (unknown address mode), Addr16Bit (short address mode), AddrGroup (group address mode), and AddrBroadcast (broadcast mode).The concept of kernel has two purposes: one is as the calculation basis of attribute reduction, and the other is that it can be interpreted as the most important conditional attribute in attribute reduction. These address modes are all necessary, because in ZigBee, data packets can be unicast, multicast, or broadcast. The function ZDO_ProcessMgmtLeaveReq can be used to disconnect the node itself or its child nodes from this network, and it does so based on the IEEE address provided. If a node leaves itself from the network, it usually waits for 5 seconds and then restarts. After restarting, the node enters a quiescent state. It will not try to rejoin the network again. If a child node of a node leaves the network, it will delete the device from the contact list. If this address belongs to a terminal device, this address will be reassigned to other terminal devices. If it is a router, this address will no longer be used. If the parent node of a node leaves the network, it will remain in the network.


## 3.4. Monitoring Network Design Factor Changes

The PC monitoring network control terminal adopts Visual C++ as the development environment, and the industrial control iocomp is used to realize real-time processing and display of the data information transmitted by the gateway. After collecting the environmental information data of the terminal node and calculating the fuzzy algorithm, the PC monitoring terminal will display the result. It is converted into corresponding control information and sent to the relevant terminal control node. And when the environmental information exceeds the warning value or the human thermal infrared sensor (which can be turned on at night for anti-theft) is triggered, the PC monitoring terminal will send out an alarm message.The Android mobile phone monitoring terminal of the intelligent monitoring system will be installed with a monitoring program compiled by Eclipse, which can connect to the Internet through a 3G/4G network to obtain real-time network address environmental information and realize direct manual control of network address environment-related adjustment equipment on the client. After confirming the coordinator, the FFD node starts the channel scan. There are two processes for channel scanning: active scanning and energy scanning. The first is to perform energy scanning. In this process, in order to reduce unnecessary interference as much as possible, the FFD node will start energy scanning on the designated channel. The function of energy scan is to select channels within the allowable range of energy levels. Figure4 shows the WSN remote monitoring data distribution.Figure 4
WSN remote monitoring data distribution.When sending data but do not know the destination address, the address mode needs to be set to AddrNotPresent, and the address cannot be specified. The destination address can only be searched from the binding table. After it is found, the data can be sent in a point-to-point sending mode or group sending mode. In ZigBee2004, all binding tables are stored in the coordinator. At this time, the sending node will send the data to the coordinator, and then, the coordinator will forward the data to the destination address found in the binding table. The binding mechanism usually uses key presses or other similar actions on the device to be bound to complete a binding within the specified timeout period. The default timeout period (APS_DEFAULT_MAXBINDING_TIME) is 16 seconds. The ZDApp_SendEndDeviceBindReq() function calls ZDP_EndDeviceBindReq() to send the binding information to its parent node. After the parent node receives it, it will parse the function ZDO_ProcessEndDeviceBindReq() and call ZDApp_EndDeviceBindReqCB() and ZDO_MatchEndDeviceBind() to process the request. When the corresponding Cinda is not found, the network layer will return through the corresponding parameters and notify the upper layer of the network initialization failure. Active scanning is to scan the network information within the communication range. Based on this information, the FFD node can determine a channel that is used by little or no equipment.


## 4. Application and Analysis of Environment Remote Monitoring Network Model Based on Intelligent Sensor Network Address Allocation and Addressing

### 4.1. Smart Sensor Network Address Data Extraction

In the design of the environmental monitoring system, TI’s protocol stack Z-Stack is used. The protocol stack complies with the ZigBee2006 specification and has very rich functions, such as the ability to wirelessly download node update programs through the ZigBee network, and has positioning awareness functions, etc. For the sake of simplicity, the function of Z-Stack used in the environmental monitoring system is introduced next. JTAG (Joint Test Action Group) comes from the official inspection method of module function inspection, which belongs to the internal control method of the module. The CC2530 module part can provide JTAG module communication function test and edit the working program of the entire network in the serial communication test and software flow design of the module.The concept of kernel has two purposes: one is as the calculation basis of attribute reduction, and the other is that it can be interpreted as the most important conditional attribute in attribute reduction. Compilation, verification, and other functions of the similar system in each module are all applied in the JTAG test window. However, the JTAG debugging module intercepted by ARM generally covers three modules: the overall structure of the test, the communication transmission interface, and the test result display module. The module can complete the signal transmission between the measuring device and the monitoring center and complete the mutual signal transmission of several parts through the acquisition and transmission circuit, the signal sensing circuit, and the power circuit. Figure5 is the extraction of the address data space of the smart sensor network.Figure 5
Extraction of address data space of smart sensor network.The microprocessor module is responsible for controlling the data processing operation, routing protocol, power consumption management, task management, etc. of the entire node. The most important thing is to implement a safe and reliable network communication protocol; the wireless communication module is responsible for wireless communication with other nodes and exchange control messaging and sending and receiving data. The configuration of network parameters is to set the ID number of the network. When the channel is determined, the FFD node will determine a PAN ID. PAN ID can set an ID that will not cause network conflicts through the monitoring function. PAN ID can also be set in a way that thinks it is. The ID of PAN ID cannot be set to 0xFFFF, which is a reserved address. The power supply module management unit has different power supply modes for different node types. On the terminal device node, the power supply consists of two 1.5 V alkaline batteries, and the power supply of the coordinator is USB power supply or AC power supply. There is an LCD on the coordinator, which can be used to display the commands sent and received and the status of the nodes. Buttons can be used to control binding and send commands. There is also an RS-232 serial port on the coordinator to communicate with the monitoring host.


### 4.2. Network Address Allocation and Addressing Model Simulation

In the CC2530 module, P2 terminals 1 and 2 are independently supplied to provide JTAG modules. The JTAG module design of the signal receiving end is shown in the text for details. In the process of making the module part, be careful to connect port 7 of the JTAG module to the initialization port of the CC2530 module, so as to complete the initialization of the entire system verification and simulation work.The sensor node is used to collect various environmental parameters in the network and the data of its subnodes, including the temperature and humidity sensor SHT11 and the photoelectric sensor BPW34S. Convergence nodes are used to build networks and give instructions, converge the signals sent by the sensing nodes, and pass them to the monitoring platform at the same time. In addition, the ZigBee wireless communication part is composed of the radio frequency chip CC2530, and the monitoring center uses DSP technology. The design of the software part includes the node process and the monitoring platform program. The node process includes the sensor node workflow and the convergence node workflow. The protocol stack uses TI’s ZStack-CC2530-2.3.1-1.4.0 version, implemented in C language in the Visual Studio 2010 development environment, and the monitoring center is convenient and quickly provides users with real-time online understanding of the network environment, data storage, and quantitative management of the network, etc. Figure6 is the network address allocation and addressing information test.Figure 6
Network address allocation and addressing information test.Database development realizes data storage and, at the same time, satisfies the functions of adding, deleting, modifying, and searching data. The database version used in this article is Microsoft SQL Server 2008. This article mainly uses DBHelper. The cs file realizes the corresponding function. The database stores and associates data to realize platform display, query, and control functions. The realization of data collection is under the TinyOS 2.1.2 platform, the program based on RPL routing written by NesC language that can accurately collect the temperature, humidity, light, and other information in the environment is burned to the TelosB node, and through the network address deploy TelosB nodes to form a wireless sensor network.Because it can effectively analyze and process various incomplete information such as inaccuracy and incompleteness, the TelosB node in the network will pass the collected data in the environment to the Sink node through the RPL route. The realization of the whole network is based on BLIP 2.0 protocol stack and TinyRPL. In the nesdoc icon, a single rectangle represents a module, such as IPProtocolP, and a double-layer rectangle represents an accessory, such as MainC. Figure7 is the distribution of network address allocation database nodes.Figure 7
Network address allocation database node distribution.The B-LUX-V30B sensor provides I2C data output format, which consists of a 4-digit exponent and an 8-digit mantissa. When the device is working in the highest sensitivity mode, one count value represents 0.045 lumens. The maximum value of the mantissa is 255, and the maximum value of the exponent is 14. Therefore, the maximum range is:255∗214=4177920. The maximum lumens reading value at 0.045 lumens/LSB is 188,000. Any reading greater than this value (for example, index=15) will be regarded as overload. The lumens value under overload conditions cannot be calculated by the conversion formula in the ambient light sensor. The basic design idea of the real-time data display module is when the real-time data display module is turned on on the website, the API interface that calls the monitoring data is transmitted to the server, and at the same time, the passed monitoring data is injected into echarts in the form of a string for visual display.We will introduce the two important concepts of “relative reduction” and “relative core” of knowledge. At the same time, we set jS frame skipping (due to network delay and other irresistible reasons, the time interval of frame skipping is slower than) to continuously call the API interface for monitoring data to perform dynamic monitoring and visual display of data. The dashed border indicates that this component is universal and needs to be instantiated in actual use, such as TimerMilliC. The line with an arrow indicates the binding of the interface, from the user of the interface to the provider of the interface, and the text on the connection represents the bound interface, such as the Leds interface of the LedsC accessory used in the TestRPLC module, or as in the IPStackC accessory. The IP interface used is implemented by the IPProtocolsP module.


### 4.3. Example Application and Analysis

The microprocessor required for the experiment uses Texas Instruments (TI) CC2430, which is a system-on-chip solution for 2.4 GHz IEEE 802.15.4/ZigBee. CC2430 integrates IEEE 802. 15. 4 standard 2.4 GHz RF radio transceiver, memory, and microcontroller. It uses an 8-bit MCU (8051), which has 128 KB of programmable flash memory and 8 KB of RAM.The SHT11 measuring terminal includes sensing equipment constructed with special equipment and special equipment constructed with fluid polyester blocks to obtain parameters. It is located in the corresponding module and completes the communication without loopholes with the 9-bit A/D switching device and the communication terminal module. At the same time, determine the analog communication module ports (SCK clock circuit and DATA transmission circuit) at both ends, and use the I 2 C circuit serial module and peripheral expansion device to connect. The SHT11 measuring device occupies a small area, consumes less space, has a particularly timely answer, and has many features such as strong resistance to external noise. This also makes it regarded as the preliminary identification of multiparameter monitoring in greenhouses. Figure8 is the parameter distribution of the serial module of the WSN circuit.Figure 8
Parameter distribution of WSN circuit serial module.In the design, the data acquisition module uses the ADC inside the CC2430. Its structure is shown in the text. It supports up to 12 bit analog-to-digital conversion. There is an analog multiplexer inside, which can support up to 8 configurable channels. Each sampling result is written into the memory through DMA without any intervention by the kernel. This method ensures that the ADC can capture a continuous stream of samples. It receives data from the serial port, can set the serial port and set the alarm value, has an alarm prompt, and can display the temperature curve. Serial port configuration: baud rate 38400, data bits 8 bits, no parity bit, 1 stop bit. After opening the monitoring software, you can see the data sent to the coordinator in the network. These data include the short address of the sending node and its real-time environmental data. Here is an example of temperature: according to the preset alarm temperature, for example, it is set to 18.085 degrees, and the actual temperature is 18.59 degrees, which exceeds the preset alarm line. Figure9 shows the WSN real-time environmental data response distribution.Figure 9
WSN real-time environmental data response distribution.When receiving requests from other nodes to join the network, the coordinator will assign a network address to this node. The coordinator node is mainly used to receive the data of all nodes in this design, display it on its own LCD, and upload all the received data to the monitoring host for data analysis and storage. During this period, you can also send commands downward. If multiple device nodes send requests to the coordinator node at the same time, the coordinator node will lose some requests if it is too late to respond, and the device node that finds that its request has not been responded will send the request again after a few seconds, until it gets a response from the coordinator node until.After the coordinator has established the network, the role of the coordinator in the network is the same as that of the router. If the coordinator is disconnected, the network can be maintained, that is, data transmission can be continued, but no new nodes can join. Since all data is sent to the coordinator in the design, if the coordinator fails, it will cause all data to be retransmitted continuously, which will affect the network operation.


## 4.1. Smart Sensor Network Address Data Extraction

In the design of the environmental monitoring system, TI’s protocol stack Z-Stack is used. The protocol stack complies with the ZigBee2006 specification and has very rich functions, such as the ability to wirelessly download node update programs through the ZigBee network, and has positioning awareness functions, etc. For the sake of simplicity, the function of Z-Stack used in the environmental monitoring system is introduced next. JTAG (Joint Test Action Group) comes from the official inspection method of module function inspection, which belongs to the internal control method of the module. The CC2530 module part can provide JTAG module communication function test and edit the working program of the entire network in the serial communication test and software flow design of the module.The concept of kernel has two purposes: one is as the calculation basis of attribute reduction, and the other is that it can be interpreted as the most important conditional attribute in attribute reduction. Compilation, verification, and other functions of the similar system in each module are all applied in the JTAG test window. However, the JTAG debugging module intercepted by ARM generally covers three modules: the overall structure of the test, the communication transmission interface, and the test result display module. The module can complete the signal transmission between the measuring device and the monitoring center and complete the mutual signal transmission of several parts through the acquisition and transmission circuit, the signal sensing circuit, and the power circuit. Figure5 is the extraction of the address data space of the smart sensor network.Figure 5
Extraction of address data space of smart sensor network.The microprocessor module is responsible for controlling the data processing operation, routing protocol, power consumption management, task management, etc. of the entire node. The most important thing is to implement a safe and reliable network communication protocol; the wireless communication module is responsible for wireless communication with other nodes and exchange control messaging and sending and receiving data. The configuration of network parameters is to set the ID number of the network. When the channel is determined, the FFD node will determine a PAN ID. PAN ID can set an ID that will not cause network conflicts through the monitoring function. PAN ID can also be set in a way that thinks it is. The ID of PAN ID cannot be set to 0xFFFF, which is a reserved address. The power supply module management unit has different power supply modes for different node types. On the terminal device node, the power supply consists of two 1.5 V alkaline batteries, and the power supply of the coordinator is USB power supply or AC power supply. There is an LCD on the coordinator, which can be used to display the commands sent and received and the status of the nodes. Buttons can be used to control binding and send commands. There is also an RS-232 serial port on the coordinator to communicate with the monitoring host.


## 4.2. Network Address Allocation and Addressing Model Simulation

In the CC2530 module, P2 terminals 1 and 2 are independently supplied to provide JTAG modules. The JTAG module design of the signal receiving end is shown in the text for details. In the process of making the module part, be careful to connect port 7 of the JTAG module to the initialization port of the CC2530 module, so as to complete the initialization of the entire system verification and simulation work.The sensor node is used to collect various environmental parameters in the network and the data of its subnodes, including the temperature and humidity sensor SHT11 and the photoelectric sensor BPW34S. Convergence nodes are used to build networks and give instructions, converge the signals sent by the sensing nodes, and pass them to the monitoring platform at the same time. In addition, the ZigBee wireless communication part is composed of the radio frequency chip CC2530, and the monitoring center uses DSP technology. The design of the software part includes the node process and the monitoring platform program. The node process includes the sensor node workflow and the convergence node workflow. The protocol stack uses TI’s ZStack-CC2530-2.3.1-1.4.0 version, implemented in C language in the Visual Studio 2010 development environment, and the monitoring center is convenient and quickly provides users with real-time online understanding of the network environment, data storage, and quantitative management of the network, etc. Figure6 is the network address allocation and addressing information test.Figure 6
Network address allocation and addressing information test.Database development realizes data storage and, at the same time, satisfies the functions of adding, deleting, modifying, and searching data. The database version used in this article is Microsoft SQL Server 2008. This article mainly uses DBHelper. The cs file realizes the corresponding function. The database stores and associates data to realize platform display, query, and control functions. The realization of data collection is under the TinyOS 2.1.2 platform, the program based on RPL routing written by NesC language that can accurately collect the temperature, humidity, light, and other information in the environment is burned to the TelosB node, and through the network address deploy TelosB nodes to form a wireless sensor network.Because it can effectively analyze and process various incomplete information such as inaccuracy and incompleteness, the TelosB node in the network will pass the collected data in the environment to the Sink node through the RPL route. The realization of the whole network is based on BLIP 2.0 protocol stack and TinyRPL. In the nesdoc icon, a single rectangle represents a module, such as IPProtocolP, and a double-layer rectangle represents an accessory, such as MainC. Figure7 is the distribution of network address allocation database nodes.Figure 7
Network address allocation database node distribution.The B-LUX-V30B sensor provides I2C data output format, which consists of a 4-digit exponent and an 8-digit mantissa. When the device is working in the highest sensitivity mode, one count value represents 0.045 lumens. The maximum value of the mantissa is 255, and the maximum value of the exponent is 14. Therefore, the maximum range is:255∗214=4177920. The maximum lumens reading value at 0.045 lumens/LSB is 188,000. Any reading greater than this value (for example, index=15) will be regarded as overload. The lumens value under overload conditions cannot be calculated by the conversion formula in the ambient light sensor. The basic design idea of the real-time data display module is when the real-time data display module is turned on on the website, the API interface that calls the monitoring data is transmitted to the server, and at the same time, the passed monitoring data is injected into echarts in the form of a string for visual display.We will introduce the two important concepts of “relative reduction” and “relative core” of knowledge. At the same time, we set jS frame skipping (due to network delay and other irresistible reasons, the time interval of frame skipping is slower than) to continuously call the API interface for monitoring data to perform dynamic monitoring and visual display of data. The dashed border indicates that this component is universal and needs to be instantiated in actual use, such as TimerMilliC. The line with an arrow indicates the binding of the interface, from the user of the interface to the provider of the interface, and the text on the connection represents the bound interface, such as the Leds interface of the LedsC accessory used in the TestRPLC module, or as in the IPStackC accessory. The IP interface used is implemented by the IPProtocolsP module.


## 4.3. Example Application and Analysis

The microprocessor required for the experiment uses Texas Instruments (TI) CC2430, which is a system-on-chip solution for 2.4 GHz IEEE 802.15.4/ZigBee. CC2430 integrates IEEE 802. 15. 4 standard 2.4 GHz RF radio transceiver, memory, and microcontroller. It uses an 8-bit MCU (8051), which has 128 KB of programmable flash memory and 8 KB of RAM.The SHT11 measuring terminal includes sensing equipment constructed with special equipment and special equipment constructed with fluid polyester blocks to obtain parameters. It is located in the corresponding module and completes the communication without loopholes with the 9-bit A/D switching device and the communication terminal module. At the same time, determine the analog communication module ports (SCK clock circuit and DATA transmission circuit) at both ends, and use the I 2 C circuit serial module and peripheral expansion device to connect. The SHT11 measuring device occupies a small area, consumes less space, has a particularly timely answer, and has many features such as strong resistance to external noise. This also makes it regarded as the preliminary identification of multiparameter monitoring in greenhouses. Figure8 is the parameter distribution of the serial module of the WSN circuit.Figure 8
Parameter distribution of WSN circuit serial module.In the design, the data acquisition module uses the ADC inside the CC2430. Its structure is shown in the text. It supports up to 12 bit analog-to-digital conversion. There is an analog multiplexer inside, which can support up to 8 configurable channels. Each sampling result is written into the memory through DMA without any intervention by the kernel. This method ensures that the ADC can capture a continuous stream of samples. It receives data from the serial port, can set the serial port and set the alarm value, has an alarm prompt, and can display the temperature curve. Serial port configuration: baud rate 38400, data bits 8 bits, no parity bit, 1 stop bit. After opening the monitoring software, you can see the data sent to the coordinator in the network. These data include the short address of the sending node and its real-time environmental data. Here is an example of temperature: according to the preset alarm temperature, for example, it is set to 18.085 degrees, and the actual temperature is 18.59 degrees, which exceeds the preset alarm line. Figure9 shows the WSN real-time environmental data response distribution.Figure 9
WSN real-time environmental data response distribution.When receiving requests from other nodes to join the network, the coordinator will assign a network address to this node. The coordinator node is mainly used to receive the data of all nodes in this design, display it on its own LCD, and upload all the received data to the monitoring host for data analysis and storage. During this period, you can also send commands downward. If multiple device nodes send requests to the coordinator node at the same time, the coordinator node will lose some requests if it is too late to respond, and the device node that finds that its request has not been responded will send the request again after a few seconds, until it gets a response from the coordinator node until.After the coordinator has established the network, the role of the coordinator in the network is the same as that of the router. If the coordinator is disconnected, the network can be maintained, that is, data transmission can be continued, but no new nodes can join. Since all data is sent to the coordinator in the design, if the coordinator fails, it will cause all data to be retransmitted continuously, which will affect the network operation.


## 5. Conclusion

The design of the environmental monitoring network in this paper includes two aspects: hardware design and software design. The hardware design mainly introduces the selection and design methods of the microprocessor module, data acquisition module, antenna module, and other peripheral circuit chips. In terms of software design, the software design of monitoring center software and ZigBee environmental monitoring network node based on Z-Stack protocol stack is introduced, including node joining, network address allocation, data collection, communication, routing management, and data encryption. During the functional test of the intelligent monitoring system, a test platform was built in the Venlo network to test the Zigbee network node networking and data transmission capabilities, the PC monitoring terminal software data collection, intelligent environment adjustment, and alarm functions, and the Android client to remotely obtain environmental information and control the environment, and adjust the function of the equipment. Then, we define the positive domain of one category relative to the other. The final test result shows that the functions of the intelligent monitoring system in the previous design have been successfully realized. Finally, the communication, stability, and function of the system are tested. After verifying that the system is feasible, the system is installed in the entity and compared with traditional manual testing. Experimental tests show that the introduction of ZigBee-based WSN technology into the intelligent network monitoring system is achievable to control the multiparameters that affect the entire process of network address search and matching, which can shorten the plant growth cycle, increase the yield, and meet the system expectations. The system has strong stability, reliable performance, easy deployment, maintenance, and expansion and provides a new type of control method for the automation of network address environment monitoring.



---

*Source: 5618538-2021-12-24.xml*