Font Size: a A A

Research On ZigBee-WiFi Northward Interface Based On Callback Mechanism

Posted on:2022-05-18Degree:MasterType:Thesis
Country:ChinaCandidate:L Y YaoFull Text:PDF
GTID:2518306563961179Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the development of science and technology,Internet of Things(Io T)is applied to military,medical,smart home,logistic,industrial monitoring and other fields increasingly.When developing a monitoring system based on Io T,due to the large number of nodes and limited power supply,strict requirements are put forward on the quantity and frequency of data transmission.In a monitoring system,a large number of nodes need to be arranged,and there are strict requirements on the quantity and frequency of data transmission.Among many wireless communication technologies,ZigBee is widely used in the Io T because of its low power consumption,low cost and long transmission distance.WiFi is the most widely used wireless communication technology at present,which can be used to upload the data collected by ZigBee to terminals such as laptops and smart phones for data processing there.However,ZigBee and WiFi cannot communication directly.Therefore,through the study of the two kinds of heterogeneous networks,this paper designs the ZigBee-WiFi northward interface,to realize the interconnection of the two heterogeneous networks.The main research contents of this paper are as follows:In this paper,CC2530 is used as the master chip of the ZigBee node and CC2530 implements ZigBee transmission.The WiFi chip is added to the ZigBee coordinator,and configure the server in the starting procedure of the CC2530 to make coordinator become ZigBee-WiFi gateway.The ZigBee device state change event processing function is designed,and the device information of all nodes in the ZigBee network is uploaded to the coordinator to prepare for the subsequent start-up environment monitoring.By triggering the ZigBee device state change event,the problem of network anomaly when new nodes join the network after staring detection is solved.Data acquisition is designed to provide data for environment monitoring.The northward interface of ZigBee-WiFi is constructed,which is the WiFi link between ZigBee and monitoring host.The monitoring host can send instructions such as start detection,stop detection and sleep detection to the ZigBee node through the northward interface.Through the data format received by the WiFi chip on the ZigBee coordinator,the callback function is called to parse the operation instructions.Depending on the type of instruction being parsed,the corresponding event is called in the coordinator microcontroller operating system to process the instruction.The PDU of operational instruction is sent to the sensor nodes in the transparent transmission mode through ZigBee.Sensor nodes receive the instructions according to the Cluster ID which in the PDU,and call the corresponding system event processing function to carry out the preset data transmission control.The synchronization protocol based on callback mechanism is designed to solve the problem of receiving the data synchronously which were sent at different times.The synchronization protocol includes synchronization mechanism based on mutex and WiFi-COM control mechanism based on timing control.The mutex mainly realizes the atomicity of sending data through the northward interface and solves the conflict between the data arriving randomly from different nodes.The timing control mechanism mainly coordinates the different transmission capacities and transmission schedules of WiFi and serial port,so that the coordinator can send data to the monitoring host in an orderly manner in coordination with WiFi instructions and serial port.The experimental results show that the microcontroller operating system can parse the event types correctly and trigger the corresponding system events.The data display on the monitoring host verifies the accuracy of the data transmission module.Experiments show that by designing synchronous data transmission mechanism,the packet loss rate and the network latency of the northward interface has been reduced.
Keywords/Search Tags:ZigBee, WiFi, Northbound interface, Event, Synchronous mechanism
PDF Full Text Request
Related items