Movatterモバイル変換


[0]ホーム

URL:


CN108401004A - A kind of agricultural intelligent networking gateway design method - Google Patents

A kind of agricultural intelligent networking gateway design method
Download PDF

Info

Publication number
CN108401004A
CN108401004ACN201710069446.3ACN201710069446ACN108401004ACN 108401004 ACN108401004 ACN 108401004ACN 201710069446 ACN201710069446 ACN 201710069446ACN 108401004 ACN108401004 ACN 108401004A
Authority
CN
China
Prior art keywords
data
cmd
communication protocol
app
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710069446.3A
Other languages
Chinese (zh)
Inventor
廖建尚
卢斯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Communications Polytechnic
Original Assignee
Guangdong Communications Polytechnic
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Communications PolytechnicfiledCriticalGuangdong Communications Polytechnic
Priority to CN201710069446.3ApriorityCriticalpatent/CN108401004A/en
Publication of CN108401004ApublicationCriticalpatent/CN108401004A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The present invention provides a kind of agriculture intelligent networking gateway design method, this method builds wireless sensor network using ZigBee technology, network is divided into sensing layer, network layer, information processing layer, integrated application, wireless network is realized by the nodal terminal and coordinator that are arranged in sensing layer, and design transmission and processing that communication protocol completes data, the communication protocol of design includes application layer communication protocol, 3 layers of composition of serial communication protocol and node communication protocol, application layer communication protocol and serial communication protocol are converted by gateway service program, node communication protocol realizes the encapsulation of wireless network data.

Description

A kind of agricultural intelligent networking gateway design method
Technical field
The present invention relates to agriculture Internet of Things field, more particularly, to a kind of agriculture intelligent networking gateway design method.
Background technology
Research of the technology of Internet of things in agricultural causes more and more focus of attention, and wherein intelligent gateway is in agriculture objectA more key technology, assumes responsibility for collecting, encapsulate and transmitting for data in networked system, at present agricultural intelligent networking gatewayData encapsulate standard and communication standard and disunity, also considerably less to the research of agriculture intelligent networking gateway.Intelligent gateway refers toA kind of equipment and technology can collect, analyze, encapsulating, forwarding data and information.The U.S., Japan are in terms of precision agriculture fieldThere are commercial application, Holland to there is preferable agricultural high-effiency production system, South Korea to have agriculture sci-tech archive, promote agricultureIndustry technology of Internet of things development [.China is a large agricultural country, and agriculture Internet of Things has also begun to certain development, in environmentMonitoring, precision agriculture etc. have certain application, but also fewer in the research of intelligent gateway.Intelligent gateway is in intelligent familyThere is certain research in the fields such as residence, the control of heat distribution pipe network system, water tank;There is scholar to propose the design of agriculture Internet of things systemMethod, but the design of intelligent gateway is not all mentioned, there is scholar to propose in the greenhouse heterogeneous network based on android systemEnvironmental monitoring intelligent gateway designs, and tentatively realizes greenhouse monitoring, but does not propose detailed agricultural data encapsulation standard;Also scholar etc. devises a kind of Internet of Things network management system based on ZigBee/3G, is used for the monitoring of water tank temperature, but is applyingAspect has certain limitation;Also scholar proposes a kind of configurable wireless sensor network WSN based on WinCE systems(wireless sensor network) gateway architecture ReGA (Re-configurable GatewayArchitecture), visualization of presence equipment and monitoring integrated management can be realized, but its design platform is not useful in otherThe application of the open source systems such as Linux.
Intelligent gateway has certain progress in the research of agriculture Internet of Things, but there is also deficiencies, are mainly reflected in agriculture objectNetworking is related to that technology is more, and data are wide, and data encapsulation format is inconsistent, and communication protocol is not unified, most of agricultural Internet of Things systemThe communication protocol that system is defined using itself, intelligent gateway lack unified communication standard, it is difficult to reach and be widely applied agriculture objectThe technology requirement of networking, does not meet the demand for development of agriculture big data and precision agriculture at present yet.
Invention content
The present invention provides a kind of agriculture intelligent networking gateway design method, and this method can quickly and easily realize agriculturalThe deployment of Internet of things system.
In order to reach above-mentioned technique effect, technical scheme is as follows:
A kind of agricultural intelligent networking gateway design method, process are as follows:
Wireless sensor network is built using ZigBee technology, network is divided into sensing layer, network layer, and information processing layer is comprehensiveApplication is closed, wireless network is realized by the nodal terminal and coordinator that are arranged in sensing layer, and design communication protocol and complete numberAccording to transmission and processing, the communication protocol of design includes 3 layers of application layer communication protocol, serial communication protocol and node communication protocolComposition, application layer communication protocol and serial communication protocol are converted by gateway service program, and node communication protocol realizes nothingThe encapsulation of line network data:
1) communication protocol of the first layer application layer communication protocol between application program and gateway;
2) communication protocol of the second layer serial communication protocol between gateway and coordinator;
3) communication protocol of the third node layer communication protocol between coordinator and ordinary node.
Three layers of communication protocol complete the data sampling and processing of agriculture Internet of Things and send and control, application layer, gateway, associationAdjust the communication protocol relational graph between device and node as shown in Figure 1
Further, the design process of the application layer communication protocol is as follows:
Application layer communication protocol detailed orders format such as following table:
MarkSOPCMDLENDATAFCS
Length (Bit)121N1
Wherein SOP is that order starts to indicate, and it is 0x02 to take fixed value;CMD is order mark code, for distinguishing different livesIt enables, detailed functions such as following table:
CMDTransmission dataResponsive stateResponse data
Value0x29000x69000x6980
Data flowTerminal->GatewayGateway->TerminalGateway->Terminal
LEN:The length of DATA, wherein LEN=0 do not have the domains data then;DATA data formats are EP+APP_MSG, wherein EP1 byte of length, take fixed value be 0x02, wherein APP_MSG be data packet node communication protocol;FCS is from CMD to DATAExclusive or and, application layer director data send format be
Data send 1:Transmission data:SOP+CMD+LEN+EP+APP_MSG+FCS:
After order is sent successfully, gateway returns to 2 message, and the 1st article of information is gateway response message, wherein including response shapeState RET, state 0x00, then represent and respond successfully, then represents response failure for 0x01, after responding successfully, gateway returns to the 2nd articleMessage, message content are the instruction replied application layer and sent;
Data response 1:SOP+CMD+APP_CMD+RET+FCS;
Data response 2:SOP+CMD+LEN+ADD+2B CMD+RESULT+FCS;
Wherein " 2B CMD " sends, function correspondence such as following table different from the value returned:
Further, the design process of the serial communication protocol is as follows:
Gateway service program receives the data frame from application layer and is then packaged into serial port protocol data by parsing, soSerial port protocol data are sent to coordinator, command format such as following table by serial ports afterwards:
MarkSOPLENCMDDATAFCS
Length (B)112N1
Wherein SOP is set as 0xFE;LEN:The length of DATA, CMD command formats such as following table:
DATA data formats are 02+NETADD+APP_CMD+APP_DATA, and wherein NETADD is for 2 byte network of nodeLocation, APP_DATA are data content, and wherein APP_CMD is defined as follows table:
If coordinator inquires network address (APP_CMD 0101) according to sensor node MAC Address, in the domains DATANA1 NA2 are the network address (0000) of coordinator node, and APP_DATA is the MAC Address of the sensor node to be inquired;IfInstruction coordinator according to the network address inquiry MAC Address (APP_CMD 0102) of sensor node, then NA1 in the domains DATANA2 is the network address (0000) of coordinator node, and APP_DATA is the network address of the sensor node to be inquired;IfIndicate that this data of coordinator will be transmitted to the application program (APP_CMD 0000) of sensor node, then NA1 NA2 in the domains DATAFor the network address of sensor node, APP_DATA is the data to be sent, serial ports transmission data and the communication for receiving dataJourney is as follows:
1, serial data is sent, and gives the node transmission data process of MAC Address:
1) network address is inquired by MAC Address, sends 1 instruction, respond 2 instructions, wherein the instruction sent is numberAccording to 2 formats are sent, for inquiring network address, data response 3 is to send successfully return instruction, and data response 4 is with returning to networkLocation;
Data send 2:SOP+LEN+CMD+02+NA1+NA2+APP_CMD+MAC+FCS;
Data response 3:SOP+CMD+APP_CMD+RET+FCS;
Data response 4:
SOP+LEN+CMD+02+NETADD+APP_CMD+MAC+NETADD+FCS;
2) node transmission data, data is given to send 3 and send Send_Data to network address NETADD by network address,Data response 5, which returns, successfully to be instructed.
Data send 3 formats:
SOP+LEN+CMD+02+NETADD+APP_CMD+Send_Data+FCS;
Data respond 5 formats:SOP+CMD+APP_CMD+RET+FCS;
2, serial ports receives the communication of data, there is 2 processes:
1) serial ports receives the data Send_Data that known network addressed nodes are sent
Receive data format 1:
SOP+LEN+CMD+02+NETADD+APP_CMD+Send_Data+FCS
2) it is MAC Address by network address translation, transmission data 4 sends inquiry MAC Address order, and data response 6 is beamed backCorrect to send instruction, MAC Address is beamed back in data response 7:
Data send 4 formats:
SOP+LEN+CMD+02+NETADD+APP_CMD+NETADD+FCS;
Data respond 6 formats:SOP+CMD+APP_CMD+RET+FCS;
Data respond 7 formats:
SOP+LEN+CMD+02+NA1+NA2+APP_CMD+MAC+FCS;
3, gateway sends control command to coordinator or data acquisition command can be carried out equipment control and data are adoptedCollect.
Further, the design process of the node communication protocol is as follows:
Node data frame traffic format:Destination address+order id+ data, as shown in table 7, wherein communication protocol data latticeFormula Uniting is:{ [parameter]=[value], { [parameter]=[value] ... ... }, per data using " { } " as bebinning character;Used between parameter inside " { } " ";" separate:
1) defined variable A0~A7, the information content for transmitting sensor values or carrying, permission are that can only pass through taxValue "" come carry out inquiry current variable numerical value, such as:Temperature Humidity Sensor indicates that temperature value, A1 indicate humidity value using A0;
2) state of 0~A7 of Bit0~Bit7 difference corresponding As of defined variable D0, D0,0 indicates to forbid uploading, and 1 indicates to permitPerhaps active upload;
3) definition control variable CD0/OD0, operates the position of D0, and CD0 indicates that clear 0 operation in position, CD0 indicate position 1Operation, such as exhaust fan, CD0=1 indicate to open exhaust fan;
4)D1:D1 indicate control coding, by assignment "" come carry out inquiry current variable numerical value, according to sensor categoryProperty carrys out custom feature;
5)CD1/OD1:The position of D1 is operated, CD1 indicates that clear 0 operation in position, OD1 indicate that position 1 operates;
Node communication protocol frame format such as following table:
Command contextDestination addressOrder idData
Length2 bytes2 bytes2 bytes
Wherein, destination address is the network short address of node;Order the value and its function such as following table of id:
For different sensor nodes, sensor has data acquisition, alarm class sensor and control class sensor, ifControl command is sent to sensor node, the parameter value of data and its meaning are as follows in APP_MSG:
1, data acquisition sensor, parameter identification 01MMT-0x3FMMT, wherein first 8 represent device type, MM generationsTable function value, wherein 01 represents application layer to bottom transmission acquisition, 02 represents bottom sensor returns to numerical value to upper layerOrder, T is represented reports time interval automatically, acquires class sensor function example such as following table:
2, class sensor, parameter identification 41XXNN-0x6FXXNN are controlled, wherein first 8 represent device type, XX is representedFunction value, wherein 01 represents application layer to bottom transmission control command, 02 represents bottom sensor returns to state of a control to upper layerOrder, NN representatives are turned on or off order, control class sensor example such as following table:
Further, by serial ports and gateway into row data communication, gateway takes the information that coordinator acquires terminal nodeAfter business program receives serial data, serial data is packaged into the IP network packet of Socket;As long as after client-side program operationThe data that bottom coordinator sends over can be read by establishing Socket connections.Application layer terminal instructs to send oneThe terminal node of bottom is controlled, by IP network by data distributing to the gateway service program, then gateway program is by dataIt is sent to serial ports, final coordinator sends information to terminal node after serial ports reads data, by ZigBee-network and carries outData acquire and equipment control.
Compared with prior art, the advantageous effect of technical solution of the present invention is:
1, a kind of agriculture Internet of Things communication protocol standard is established, the past, most of agriculture Internet of things system was defined using itselfCommunication protocol, lack unified communication standard, the present invention proposes a kind of communication protocol standard, is beneficial to promote and is related to technologyExtensive agricultural Internet of Things, realizes that agricultural data is shared, meets the demand for development of agriculture big data and precision agriculture;
2, it is respectively application layer communication protocol, serial communication protocol and node communication to have preferable autgmentability, communication protocolAgreement, three layers of communication protocol are easy extension, and node communication protocol is identified by spreading parameter, can easily realize various acquisition classesData encapsulation and transmission, application layer communication protocol with control class sensor realize the parameter to node using object dictionary modeIt is acquired and controls with state, facilitate and realize various different software application layers, such as the mobile terminals Android or the ends Web of PC machine,It is easy to build various personalization systems;
3, agriculture Internet of things system, which is realized, simplifies, and Internet of Things is built using the intelligent gateway of three layers of communication protocol structureSystem, it is only necessary to which the exploitation that application layer is paid close attention in conjunction with communication protocol can quickly and easily realize the portion of agriculture Internet of things systemAdministration, avoid because the technology of Internet of things system extensively due to cause application to be difficult to promote, reduce agriculture Internet of things system applicationComplexity accelerates the application for promoting agriculture Internet of Things.
Description of the drawings
Communication protocol relational graphs of the Fig. 1 between application layer, gateway, coordinator and node;
Fig. 2 is the communication protocol conspiracy relation figure of application layer communication protocol, serial communication protocol and node;
Fig. 3 is agriculture internet of things functional function diagram;
Fig. 4 is the data flow figure in agriculture Internet of things system;
Fig. 5 is the Socket service structure chart of gateway service program.
Specific implementation mode
The attached figures are only used for illustrative purposes and cannot be understood as limitating the patent;
In order to more preferably illustrate that the present embodiment, the certain components of attached drawing have omission, zoom in or out, actual product is not representedSize;
To those skilled in the art, it is to be appreciated that certain known features and its explanation, which may be omitted, in attached drawing's.
The following further describes the technical solution of the present invention with reference to the accompanying drawings and examples.
Embodiment 1
A kind of agricultural intelligent networking gateway design method, includes the following steps:
Agriculture Internet of things system is designed according to Internet of Things framework, and wireless sense network is built using ZigBee technologyNetwork, network are divided into sensing layer, network layer, information processing layer, integrated application, in the nodal terminal that sensing layer is designed by CC2530Wireless network is realized with coordinator, and designs transmission and processing that a set of communication protocol completes data, and communication protocol includes answeringWith 3 layers of layer communication protocol, serial communication protocol and node communication protocol composition, application layer communication protocol and serial communication protocol are logicalIt crosses gateway service program to be converted, third node layer communication protocol realizes that the encapsulation of wireless network data, detailed design are as follows:
1) communication of the first layer between application program and gateway is designed as application layer communication protocol, application layer and intelligenceIt is communicated between gateway;
2) communication of the second layer between gateway and coordinator, is designed as serial communication protocol;
3) communication of the third layer between coordinator and ordinary node is designed as node communication protocol.
Three layers of communication protocol complete the data sampling and processing of agriculture Internet of Things and send and control, application layer, gateway, associationAdjust the communication protocol relational graph between device and node as shown in Figure 1.
The agriculture intelligent networking gateway communication protocol that the present invention designs is mainly used for realizing that the data of agriculture Internet of Things are adoptedCollect the encapsulation and transmission of terminal control.
Application layer communication protocol designs:
Application layer communication protocol detailed orders format is as shown in table 1.
1 application layer communication protocol format of table
MarkSOPCMDLENDATAFCS
Length (Bit)121N1
Wherein SOP is that order starts to indicate, and it is 0x02 to take fixed value;CMD is order mark code, for distinguishing different livesIt enables, detailed functions are as shown in table 2.
2 application layer communication protocol CMD functions of table
CMDTransmission dataResponsive stateResponse data
Value0x29000x69000x6980
Data flowTerminal->GatewayGateway->TerminalGateway->Terminal
LEN:The length of DATA, wherein LEN=0 do not have the domains data then;DATA data formats are EP+APP_MSG, wherein EP1 byte of length, take fixed value be 0x02, wherein APP_MSG be data packet node communication protocol;FCS is from CMD to DATAExclusive or and, application layer director data send format be:
Data send 1:
Transmission data:SOP+CMD+LEN+EP+APP_MSG+FCS (1)
After order is sent successfully, gateway returns to 2 message, and the 1st article of information is gateway response message, wherein including response shapeState RET, state 0x00, then represent and respond successfully, then represents response failure for 0x01, after responding successfully, gateway returns to the 2nd articleMessage, message content are the instruction replied application layer and sent.
Data response 1:SOP+CMD+APP_CMD+RET+FCS (2)
Data response 2:SOP+CMD+LEN+ADD+2B CMD+RESULT+FCS (3)
Wherein " 2B CMD " is sent different from the value returned, and function correspondence is as shown in table 3.
3 2B CMD function correspondences of table
Serial communication protocol designs:
Gateway service program receives the data frame from application layer and is then packaged into serial port protocol data by parsing, soSerial port protocol data are sent to coordinator by serial ports afterwards, command format is as shown in table 4.
4 serial communication protocol format of table
MarkSOPLENCMDDATAFCS
Length (B)112N1
Wherein SOP is set as 0xFE;LEN:The length of DATA, CMD command formats are as shown in table 5.
5 CMD command functions of table
CMDTransmission dataReceive dataReceive data
Numerical value0x29000x69000x6980
FunctionApplication layer is sentCoordinator is properly received instructionNode returned data
DATA data formats are 02+NETADD+APP_CMD+APP_DATA, and wherein NETADD is for 2 byte network of nodeLocation, APP_DATA are data content, and wherein APP_CMD definition is as shown in table 6.
6 application layer communication protocol format of table
APP_CMDFunction
0000Notice coordinator data need the application program for being transmitted to node
0101Notify coordinator according to given mac address search network address
0102Notify coordinator according to the given addresses network address lookup mac
If coordinator inquires network address (APP_CMD be 01 01) according to sensor node MAC Address, in the domains DATANA1 NA2 are the network address (0000) of coordinator node, and APP_DATA is the MAC Address of the sensor node to be inquired;IfInstruction coordinator according to the network address inquiry MAC Address (APP_CMD 0102) of sensor node, then NA1 in the domains DATANA2 is the network address (0000) of coordinator node, and APP_DATA is the network address of the sensor node to be inquired;IfIndicate that this data of coordinator will be transmitted to the application program (APP_CMD 0000) of sensor node, then NA1 NA2 in the domains DATAFor the network address of sensor node, APP_DATA is the data to be sent.Serial ports transmission data and the communication for receiving dataJourney is as follows
1, serial data is sent, and gives the node transmission data process of MAC Address
1) network address is inquired by MAC Address, sends 1 instruction, respond 2 instructions, wherein the instruction sent is numberAccording to 2 formats are sent, for inquiring network address, data response 3 is to send successfully return instruction, and data response 4 is with returning to networkLocation;
Data send 2:SOP+LEN+CMD+02+NA1+NA2+APP_CMD+MAC+FCS (4)
Data response 3:SOP+CMD+APP_CMD+RET+FCS (5)
Data response 4:
SOP+LEN+CMD+02+NETADD+APP_CMD+MAC+NETADD+FCS (6)
2) node transmission data, data is given to send 3 and send Send_Data to network address NETADD by network address,Data response 5, which returns, successfully to be instructed.
Data send 3 formats:
SOP+LEN+CMD+02+NETADD+APP_CMD+Send_Data+FCS (7)
Data respond 5 formats:SOP+CMD+APP_CMD+RET+FCS (8)
2, serial ports receives the communication of data, there is 2 processes
1) serial ports receives the data Send_Data that known network addressed nodes are sent
Receive data format 1:
SOP+LEN+CMD+02+NETADD+APP_CMD+Send_Data+FCS (9)
2) it is MAC Address by network address translation, transmission data 4 sends inquiry MAC Address order, and data response 6 is beamed backCorrect to send instruction, MAC Address is beamed back in data response 7
Data send 4 formats:
SOP+LEN+CMD+02+NETADD+APP_CMD+NETADD+FCS (10)
Data respond 6 formats:
SOP+CMD+APP_CMD+RET+FCS (11)
Data respond 7 formats:
SOP+LEN+CMD+02+NA1+NA2+APP_CMD+MAC+FCS (12)
3, gateway sends control command to coordinator or data acquisition command can be carried out equipment control and data are adoptedCollect.
For example, when application layer reads photosensitive sensor collected illumination intensity value, serial ports is first sent commands to, from coordinationDevice obtains the network address of photosensitive sensor, then sends a command to the value that network address reads photosensitive sensor.
Node communication protocol design:
Node data frame traffic format:Destination address+order id+ data, as shown in table 7, wherein communication protocol data latticeFormula Uniting is:{ [parameter]=[value], { [parameter]=[value] ... ... }, per data using " { } " as bebinning character;Used between parameter inside " { } " ";" separate.
1) defined variable A0~A7, the information content for transmitting sensor values or carrying, permission are that can only pass through taxValue "" come carry out inquiry current variable numerical value, such as:Temperature Humidity Sensor indicates that temperature value, A1 indicate humidity value using A0;
2) state of 0~A7 of Bit0~Bit7 difference corresponding As of defined variable D0, D0,0 indicates to forbid uploading, and 1 indicates to permitPerhaps active upload;
3) definition control variable CD0/OD0, operates the position of D0, and CD0 indicates that clear 0 operation in position, CD0 indicate position 1Operation, such as exhaust fan, CD0=1 indicate to open exhaust fan;
4)D1:D1 indicate control coding, by assignment "" come carry out inquiry current variable numerical value, according to sensor categoryProperty carrys out custom feature;
5)CD1/OD1:The position of D1 is operated, CD1 indicates that clear 0 operation in position, OD1 indicate that position 1 operates;
7 node communication protocol frame format of table
Command contextDestination addressOrder idData
Length2 bytes2 bytes2 bytes
Wherein, destination address is the network short address of node;Order value and its function of id as shown in table 8.
Table 8 orders id functions
For different sensor nodes, sensor has data acquisition, alarm class sensor and control class sensor, ifControl command is sent to sensor node, the parameter value of data and its meaning are as follows in APP_MSG:
1, data acquisition sensor, parameter identification 01MMT-0x3FMMT, wherein first 8 represent device type, MM generationsTable function value, wherein 01 represents application layer to bottom transmission acquisition, 02 represents bottom sensor returns to numerical value to upper layerOrder, T representatives report time interval automatically, such as to allow photosensitive sensor every 5 seconds active reporting data, then in APP_MSGOrder data part should be:010105, the 0102MM in the order that photosensitive sensor returns indicates that photosensitive sensor is collectedIllumination intensity value is MM, and acquisition class sensor function example is as shown in table 9.
Table 9 acquires class sensor parameters design example
2, class sensor, parameter identification 41XXNN-0x6FXXNN are controlled, wherein first 8 represent device type, XX is representedFunction value, wherein 01 represents application layer to bottom transmission control command, 02 represents bottom sensor returns to state of a control to upper layerOrder, NN representatives are turned on or off order, for example, to allow flame sensor open detection function, then the number in APP_MSGAccording to partly should be:410101,410201 in the order that relay returns open relay, control class sensor example such as tableShown in 10.
Table 10 controls class sensor parameters design example
The communication protocol of application layer communication protocol, serial communication protocol and node, cooperates with each other, the common number for completing gatewayAccording to encapsulation and transmission, the conspiracy relation of three agreements is as shown in Figure 2.
The intelligent gateway course of work:
It is a kind of agriculture internet of things functional function diagram as shown in Figure 3, it is flat that intelligent gateway program operates in AndroidPlatform connects the bridge of application layer and ZigBee wireless networks, and Fig. 4 is the data flow in agriculture Internet of things system, describes in detailFrom ZigBee node to coordinator, the entire data flow of coordinator to gateway and gateway to Android client programTo.
By serial ports and gateway into row data communication, gateway service program receives the information that coordinator acquires terminal nodeAfter serial data, serial data is packaged into the IP network packet of Socket;As long as establishing Socket after client-side program operationConnection can read the data that bottom coordinator sends over.Application layer terminal controls bottom to send an instructionTerminal node, by IP network by data distributing to the gateway service program, then gateway program sends the data to serial ports,Final coordinator sends information progress data acquisition to terminal node by ZigBee-network and sets after serial ports reads dataStandby control.
Intelligent gateway service routine designs:
Gateway service program realizes two functions:It is interacted with ZigBee coordinators;Establish Socket service.GatewaySocket service not only supports the connection of local client, while long-range client being supported to connect, in gateway service programSocket service establishes the bridge transmitted between serial ports and application layer terminal.According to Functional Design, in gateway service programCreate two services:Serial ports monitors service Socket Client, Socket Server services, Socket Server service prisonsIt listens and handles the connections of socket clients and sent with data, the effect of Socket Client is attached to Socket ServerEnd, while handling the data that serial port service thread sends over.Fig. 5 is the Socket service structure chart of gateway service program.
The present invention has following features:
1) a kind of agriculture Internet of Things communication protocol standard is established.Past, most of agriculture Internet of things system was defined using itselfCommunication protocol, lack unified communication standard, the present invention proposes a kind of communication protocol standard, is beneficial to promote and is related to technologyExtensive agricultural Internet of Things, realizes that agricultural data is shared, meets the demand for development of agriculture big data and precision agriculture;
2) there is preferable autgmentability.Communication protocol is respectively application layer communication protocol, serial communication protocol and node communicationAgreement, three layers of communication protocol are easy extension, and node communication protocol is identified by spreading parameter, can easily realize various acquisition classesData encapsulation and transmission, application layer communication protocol with control class sensor realize the parameter to node using object dictionary modeIt is acquired and controls with state, facilitate and realize various different software application layers, such as the mobile terminals Android or the ends Web of PC machine,It is easy to build various personalization systems;
3) preferable communication performance.From test result analysis, intelligent gateway has stronger data-handling capacity and higherCommunication efficiency, using the correct result of test also demonstrate communication protocol correctness and intelligent gateway in the agriculture Internet of Things of structureThe feasibility of net system provides technical support for the agriculture Internet of things system of structure;
4) agriculture Internet of things system, which is realized, simplifies.Internet of Things is built using the intelligent gateway of three layers of communication protocol structureSystem, it is only necessary to which the exploitation that application layer is paid close attention in conjunction with communication protocol can quickly and easily realize the portion of agriculture Internet of things systemAdministration, avoid because the technology of Internet of things system extensively due to cause application to be difficult to promote, reduce agriculture Internet of things system applicationComplexity accelerates the application for promoting agriculture Internet of Things;
5) application field is wide.The intelligent gateway that the present invention designs can be applied in various agriculture fields, and such as field planting is setIn the information collection and environmental Kuznets Curves of applying the fields such as gardening, livestock and poultry cultivation, aquaculture, be conducive to promote agricultural production automaticChange, operation precision and IT application in management lay the foundation for agriculture Internet of Things extensive use.
The same or similar label correspond to the same or similar components;
Position relationship described in attached drawing is used to only for illustration, should not be understood as the limitation to this patent;
Obviously, the above embodiment of the present invention be only to clearly illustrate example of the present invention, and not be pairThe restriction of embodiments of the present invention.For those of ordinary skill in the art, may be used also on the basis of the above descriptionTo make other variations or changes in different ways.There is no necessity and possibility to exhaust all the enbodiments.It is all thisAll any modification, equivalent and improvement etc., should be included in the claims in the present invention made by within the spirit and principle of inventionProtection domain within.

Claims (5)

If coordinator inquires network address (APP_CMD 0101) according to sensor node MAC Address, NA1NA2 in the domains DATAFor the network address (0000) of coordinator node, APP_DATA is the MAC Address of the sensor node to be inquired;If instruction associationAdjust device according to the network address inquiry MAC Address (APP_CMD 0102) of sensor node, then NA1NA2 is to coordinate in the domains DATAThe network address (0000) of device node, APP_DATA are the network address of the sensor node to be inquired;If instruction is coordinatedThis data of device will be transmitted to the application program (APP_CMD 0000) of sensor node, then NA1NA2 is sensor in the domains DATAThe network address of node, APP_DATA are the data to be sent, and serial ports transmission data and the communication process for receiving data are as follows:
5. agricultural intelligent networking gateway design method according to claim 4, which is characterized in that coordinator is by terminal sectionThe information acquired is put by serial ports and gateway into row data communication, after gateway service program receives serial data, by serial ports numberAccording to the IP network packet for being packaged into Socket;As long as establishing Socket connections after client-side program operation reads bottom associationThe data for adjusting device to send over.Application layer terminal controls the terminal node of bottom to send an instruction, passes through IP networkBy data distributing to the gateway service program, then gateway program sends the data to serial ports, and final coordinator is read from serial portsAfter data, information is sent to terminal node by ZigBee-network and carries out data acquisition and equipment control.
CN201710069446.3A2017-02-082017-02-08A kind of agricultural intelligent networking gateway design methodPendingCN108401004A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710069446.3ACN108401004A (en)2017-02-082017-02-08A kind of agricultural intelligent networking gateway design method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710069446.3ACN108401004A (en)2017-02-082017-02-08A kind of agricultural intelligent networking gateway design method

Publications (1)

Publication NumberPublication Date
CN108401004Atrue CN108401004A (en)2018-08-14

Family

ID=63094340

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710069446.3APendingCN108401004A (en)2017-02-082017-02-08A kind of agricultural intelligent networking gateway design method

Country Status (1)

CountryLink
CN (1)CN108401004A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109257367A (en)*2018-10-182019-01-22浙江大学台州研究院A kind of data communication protocol and implementation method for industrial internet-of-things terminal
CN110290208A (en)*2019-06-272019-09-27无锡职业技术学院 Home Security Communication Platform and Method Based on Remote Internet of Things
CN111953586A (en)*2020-07-082020-11-17杭州医惠物联网科技有限公司One drags eight thing networking gateways
CN113381999A (en)*2021-06-082021-09-10杭州昊美科技有限公司Communication method and device and electronic equipment
CN113473404A (en)*2021-07-022021-10-01华南农业大学Agricultural Internet of things communication method and device based on wide-band and narrow-band fusion
CN113630406A (en)*2021-07-302021-11-09黄山罗米测控技术有限公司Embedded gateway self-defined protocol implementation based on serial port
CN115866013A (en)*2022-05-312023-03-28中兴通讯股份有限公司Communication node, data transmission method and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110202189A1 (en)*2010-02-152011-08-18General Electric CompanyLow cost and flexible energy management system providing user control arrangement in a plurality of modes
CN104680220A (en)*2015-03-242015-06-03南通大学Commodity anti-counterfeiting code batch generation method
CN105610998A (en)*2016-02-292016-05-25嘉应学院Wireless sensor network based data identification method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110202189A1 (en)*2010-02-152011-08-18General Electric CompanyLow cost and flexible energy management system providing user control arrangement in a plurality of modes
CN104680220A (en)*2015-03-242015-06-03南通大学Commodity anti-counterfeiting code batch generation method
CN105610998A (en)*2016-02-292016-05-25嘉应学院Wireless sensor network based data identification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
廖建尚: "基于物联网的温室大棚环境监控系统设计方法", 《农业工程学报》*
魏钢: "基于联创中控物联网平台应用程序与ZigBee网关通信协议的研究", 《山东工业技术》*

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109257367A (en)*2018-10-182019-01-22浙江大学台州研究院A kind of data communication protocol and implementation method for industrial internet-of-things terminal
CN110290208A (en)*2019-06-272019-09-27无锡职业技术学院 Home Security Communication Platform and Method Based on Remote Internet of Things
CN110290208B (en)*2019-06-272022-03-08无锡职业技术学院Home security communication platform and method based on remote Internet of things
CN111953586A (en)*2020-07-082020-11-17杭州医惠物联网科技有限公司One drags eight thing networking gateways
CN111953586B (en)*2020-07-082023-10-20杭州医惠物联网科技有限公司One drags eight thing networking gateway
CN113381999A (en)*2021-06-082021-09-10杭州昊美科技有限公司Communication method and device and electronic equipment
CN113381999B (en)*2021-06-082023-04-28杭州昊美科技有限公司Communication method and device and electronic equipment
CN113473404A (en)*2021-07-022021-10-01华南农业大学Agricultural Internet of things communication method and device based on wide-band and narrow-band fusion
CN113473404B (en)*2021-07-022023-06-09华南农业大学 A communication method and device for agricultural internet of things based on broadband and narrowband integration
CN113630406A (en)*2021-07-302021-11-09黄山罗米测控技术有限公司Embedded gateway self-defined protocol implementation based on serial port
CN115866013A (en)*2022-05-312023-03-28中兴通讯股份有限公司Communication node, data transmission method and storage medium

Similar Documents

PublicationPublication DateTitle
CN108401004A (en)A kind of agricultural intelligent networking gateway design method
CN107948194B (en)Data access method and system
CN209605863U (en)Agricultural Environmental Monitoring system
CN109922150A (en)Virtual device information processing method, device, gateway of internet of things and Internet of Things communication system
CN107317859A (en)A kind of orchard environment intelligent monitor system
CN112995153A (en)Multi-source heterogeneous IoT (Internet of things) equipment data unified access and storage system and method
CN102307222A (en)Intelligent greenhouse demonstration measurement and control system based on Internet of things technology
CN206461640U (en)A kind of gateway system of compatible multiplex roles
CN101742536A (en)Cultural relic conservation environment multi-parameter intelligent real-time monitoring system and method thereof
CN106254437A (en)Internet of Things communication means
CN105005215A (en)Protocol conversion device and data acquisition control system for industrial bus equipment
CN104507134A (en)Wireless data information acquisition system based on Internet of things
CN103297256A (en)Method and system for managing perceiving layer node of internet of things
CN105827439B (en)The method for realizing wireless device ad hoc network
CN110012112A (en) A networking system for terminal equipment based on the Internet of Things
CN106371383A (en)Greenhouse remote monitoring system and method
CN107948332A (en)A kind of agriculture Internet of things system and control method based on IPv6
CN113783870A (en)Remote multi-loop gateway based on intelligent road rods and use method thereof
CN107161567A (en)A kind of intelligent garbage bin management system
CN113382007A (en)Industrial internet data acquisition and transmission method and system
CN116193295A (en)Multi-element Internet of things data fusion and unified data processing method
CN104007726A (en)Fish pond control method based on wireless sensor network and Android mobile phone platform
CN111787122A (en) A communication system and method for wireless networking of agricultural Internet of Things
CN111432370B (en)Data collection method for environment control system of modern farm
CN104574896A (en)Self-organizing networking method of wireless data information collection system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20180814


[8]ページ先頭

©2009-2025 Movatter.jp