CN111836277B - Lora communication method, lora node and Lora communication system - Google Patents

Lora communication method, lora node and Lora communication system Download PDF

Info

Publication number
CN111836277B
CN111836277B CN201910681768.2A CN201910681768A CN111836277B CN 111836277 B CN111836277 B CN 111836277B CN 201910681768 A CN201910681768 A CN 201910681768A CN 111836277 B CN111836277 B CN 111836277B
Authority
CN
China
Prior art keywords
lora
node
time
gateway
lora gateway
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.)
Active
Application number
CN201910681768.2A
Other languages
Chinese (zh)
Other versions
CN111836277A (en
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.)
Wuhan Suowei Technology Co ltd
Original Assignee
Wuhan Suowei Technology Co ltd
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 Wuhan Suowei Technology Co ltd filed Critical Wuhan Suowei Technology Co ltd
Publication of CN111836277A publication Critical patent/CN111836277A/en
Application granted granted Critical
Publication of CN111836277B publication Critical patent/CN111836277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0203Power saving arrangements in the radio access network or backbone network of wireless communication networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a Lora communication method, a Lora node and a Lora communication system, wherein the method comprises the following steps: the method comprises the steps that a Lora node needing real-time control obtains configuration information issued by a Lora gateway and synchronizes time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to uploading data of the Lora node and a transmission period; switching the communication frequency of the Lora node to the receiving frequency of the Lora gateway in a corresponding time window of the Lora node to be controlled in real time, and uploading the acquired data to the Lora gateway; after the acquired data is successfully uploaded to the Lora gateway by the Lora node needing real-time control, switching the communication frequency of the Lora node to the instruction sending frequency of the Lora gateway, and monitoring the control instruction issued by the Lora gateway in real time; the Lora gateway receiving frequency is different from the Lora gateway command sending frequency. The invention can solve the problem that the Lora communication cannot be controlled in real time.

Description

Lora communication method, lora node and Lora communication system
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a Lora communication method, a Lora node and a Lora communication system.
Background
The field of internet of things has many wireless communication modes, and Long Range Radio (Long Range Radio) has been actively developed due to its low power consumption, long Range and strong anti-interference capability. The LoraWan protocol widely adopted in LORA communication is designed for operators, and the system is heavy and incomparable, because most people cannot roam and charge, and only upload and download wireless data. For lightweight applications, such as timed acquisition reporting of data from sensors, simpler systems are needed. Furthermore, the above-mentioned lorewan protocol has a disadvantage that it cannot be controlled in real time. Class A in the LoraWAN protocol performs downlink interaction through two time slots after data is actively uploaded, and actions such as valve control and the like which need to be performed in real time are not talking once the two time slots are missed and the next uplink time window is needed.
Disclosure of Invention
The invention provides a Lora communication method, a Lora node and a Lora communication system, which can solve the problem that real-time control cannot be realized in Lora communication.
The invention provides a Lora communication method, which comprises the following steps:
the method comprises the steps that a Lora node needing real-time control obtains configuration information issued by a Lora gateway and synchronizes time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to uploading data of the Lora node and a transmission period;
switching the communication frequency of the Lora node to the Lora gateway receiving frequency in a corresponding time window of the Lora node to be controlled in real time, and uploading acquired data to the Lora gateway;
after the acquired data is successfully uploaded to the Lora gateway by the Lora node needing real-time control, switching the communication frequency of the Lora node to the instruction sending frequency of the Lora gateway, and monitoring the control instruction issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
Preferably, the method further comprises the following steps:
the non-real-time controlled Lora node acquires the configuration information issued by the Lora gateway and synchronizes time with the Lora gateway;
the non-real-time controlled Lora node uploads the acquired data to the Lora gateway in a corresponding time window;
and controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, wherein the set time period is positioned outside a time window corresponding to the non-real-time controlled Lora node.
Preferably, the method further comprises the following steps:
when a control instruction which is from an upper computer or a cloud and is used for controlling the non-real-time controlled Lora node is cached in the Lora gateway, the non-real-time controlled Lora node receives the control instruction issued by the Lora gateway in a time window corresponding to the Lora node.
Preferably, the method further comprises the following steps:
after uploading data to the Lora gateway, if a data receiving success response returned by the Lora gateway is not received, uploading the acquired data to the Lora gateway again in a time window corresponding to the Lora node;
when each Lora node re-uploads the acquired data to the Lora gateway and after the set times, the login request is sent to the Lora gateway so as to re-acquire the configuration information issued by the Lora gateway if the data receiving success response returned by the Lora gateway is not received yet;
after each Lora node executes the control instruction issued by the Lora gateway, sending a response of the completion of instruction execution to the Lora gateway so as to inform the Lora gateway of deleting the executed control instruction.
Preferably, the method further comprises the following steps:
each Lora node receives node transmitting power data issued by the Lora gateway and adjusts the transmitting power of the node transmitting power data according to the node transmitting power data; the node transmitting power data is calculated according to the signal intensity and the signal-to-noise ratio transmitted by the node.
Preferably, the method further comprises the following steps:
and the Lora gateway records the time corresponding to the time synchronization between the Lora gateway and each Lora node, and after a set time length from the time, the Lora gateway re-transmits a clock synchronization instruction to each Lora node so as to inform each Lora node of synchronizing time with the Lora gateway again.
The invention also provides a Lora node comprising:
the configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period;
the data uploading module is used for switching the communication frequency of the data uploading module to the receiving frequency of the Lora gateway in a time window corresponding to the Lora node, and uploading the acquired data to the Lora gateway;
the command interception module is used for switching the communication frequency of the Lora node to the command sending frequency of the Lora gateway after the Lora node successfully uploads the acquired data to the Lora gateway, and intercepting the control command issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
The invention also provides a Lora communication system, which comprises: the Lora gateway and at least one Lora node needing real-time control; the Lora node needing real-time control comprises:
the first configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period;
the first data uploading module is used for switching the communication frequency of the Lora node to be controlled in real time to the Lora gateway receiving frequency in a time window corresponding to the Lora node to be controlled in real time, and uploading the acquired data to the Lora gateway;
the first instruction interception module is used for switching the communication frequency of the Lora node to be controlled in real time to the instruction sending frequency of the Lora gateway after the acquired data is successfully uploaded to the Lora gateway by the Lora node to be controlled in real time, and intercepting the control instruction issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
Preferably, the method further comprises at least one Lora node which is not controlled in real time; the non-real-time controlled Lora node comprises:
the second configuration module is used for acquiring the configuration information issued by the Lora gateway and synchronizing time with the Lora gateway;
the second data uploading module is used for acquiring data in the data acquisition time and uploading the acquired data to the Lora gateway in a time window corresponding to the Lora node controlled in non-real time;
the sleep control module is used for controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, and the set time period is located outside a time window corresponding to the non-real-time controlled Lora node.
Preferably, the non-real-time controlled Lora node further comprises:
and the second instruction interception module is used for receiving the control instruction issued by the Lora gateway at a time window corresponding to the Lora node by the Lora node controlled in non-real time when the control instruction which is from an upper computer or a cloud end and is used for controlling the Lora node controlled in non-real time is cached in the Lora gateway.
In the Lora communication method, the Lora node and the Lora communication system provided by the invention, after the Lora node uploads the acquired data to the Lora gateway, the communication frequency is switched to the Lora gateway instruction sending frequency, so that the control instruction issued by the Lora gateway can be monitored and executed in real time, and the real-time control of the Lora gateway is realized.
Drawings
Fig. 1 is a flow chart of a method of Lora communication provided by the present invention;
fig. 2 is a flow chart of a communication method of a Lora node to be controlled in real time according to an embodiment of the present invention;
FIG. 3 is a flow chart of a communication method of a Lora node controlled in non-real time in an embodiment provided by the invention;
FIG. 4 is a schematic diagram of calculation of a time window provided by the present invention;
fig. 5 is a schematic block diagram of a Lora communication system provided by the present invention;
fig. 6 is a schematic diagram of the operation of the Lora network provided by the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention and do not limit the application scope of the present invention, and it is possible for those skilled in the art to apply the present invention to other similar scenarios according to these drawings without inventive effort.
As used in this specification and the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that the steps and elements are explicitly identified, and they do not constitute an exclusive list, as other steps or elements may be included in a method or apparatus. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment". Related definitions of other terms will be given in the description below.
The invention provides a Lora communication method, which is shown in figure 1 and comprises the following steps:
the method comprises the steps that a Lora node needing real-time control obtains configuration information issued by a Lora gateway and synchronizes time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to uploading data of the Lora node and a transmission period; here, the Lora node to be controlled in real time may initiate a login request to the Lora gateway, and the Lora gateway issues configuration information to the Lora node according to the login request.
And switching the communication frequency of the Lora node to the Lora gateway receiving frequency in a corresponding time window of the Lora node to be controlled in real time, and uploading the acquired data to the Lora gateway.
After the collected data is successfully uploaded to the Lora gateway by the Lora node needing real-time control, the communication frequency of the Lora node is switched to the instruction sending frequency of the Lora gateway, and the control instruction issued by the Lora gateway is monitored in real time.
The Lora gateway receiving frequency is different from the Lora gateway command sending frequency, the Lora gateway is a single-channel Lora gateway, and the Lora gateway is also connected with an upper computer terminal or a cloud terminal.
The Lora communication method further comprises the following steps:
the method comprises the steps that a non-real-time controlled Lora node obtains configuration information issued by a Lora gateway and synchronizes time with the Lora gateway;
the non-real-time controlled Lora node collects data in the data collection time, and the collected data is uploaded to the Lora gateway in a corresponding time window;
and controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, wherein the set time period is positioned outside a time window corresponding to the non-real-time controlled Lora node.
In general, the Lora node may be divided into a Lora node to be controlled in real time and a non-real time-controlled Lora node, and in another embodiment, the flow of the communication method of the Lora node to be controlled in real time is shown in fig. 2, and the flow of the communication method of the non-real time-controlled Lora node is shown in fig. 3; all the Lora nodes needing real-time control start to acquire data when reaching the whole point acquisition time, and start to upload data in a time window, but the time for receiving the instruction and executing the instruction is not limited; all the Lora nodes which are not controlled in real time start to collect data at the initial time of a transmission period, upload the data in a time window, and keep in a sleep state at other times.
The time window corresponding to the data uploaded by the Lora nodes can be calculated according to the total number of the Lora nodes and the transmission period, and the specific calculation method can refer to fig. 4, and the maximum node number in fig. 4 is the total number of the Lora nodes.
The Lora communication method further comprises the following steps:
when a control instruction which is from an upper computer or a cloud and is used for controlling the Lora node which is not controlled in real time is cached in the Lora gateway, the Lora node which is not controlled in real time receives the control instruction issued by the Lora gateway in a time window corresponding to the Lora node, and the control instruction is executed after the control instruction is received.
The Lora communication method further comprises the following steps:
after uploading data to the Lora gateway, if a successful data receiving response returned by the Lora gateway is not received, uploading the acquired data to the Lora gateway again in a time window corresponding to the Lora node; after each Lora node uploads data to the Lora gateway, if a data receiving success response returned by the Lora gateway is received, the Lora node is considered to successfully upload the data to the Lora gateway;
when each Lora node re-uploads the acquired data to the Lora gateway and after the set times, the data receiving success response returned by the Lora gateway is not received, a login request is sent to the Lora gateway so as to re-acquire the configuration information issued by the Lora gateway;
after each Lora node executes the control instruction issued by the Lora gateway, sending a response of the completion of instruction execution to the Lora gateway so as to inform the Lora gateway of deleting the control instruction after the completion of the execution.
The Lora communication method further comprises the following steps:
each Lora node receives node transmitting power data issued by the Lora gateway and adjusts the transmitting power of the node according to the node transmitting power data; the node transmitting power data is calculated according to the signal intensity and the signal-to-noise ratio transmitted by the node.
The Lora gateway also records the time corresponding to the time synchronization between the Lora gateway and each Lora node, and after a set time length from the time, the Lora gateway re-issues a clock synchronization instruction to each Lora node so as to inform each Lora node of synchronizing time with the Lora gateway again.
The invention also provides a Lora node, which comprises: the device comprises a configuration module, a data uploading module and an instruction interception module.
The configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period.
The data uploading module is used for switching the communication frequency of the data uploading module to the receiving frequency of the Lora gateway in a time window corresponding to the Lora node, and uploading the acquired data to the Lora gateway.
The command interception module is used for switching the communication frequency of the Lora node to the command sending frequency of the Lora gateway after the Lora node successfully uploads the acquired data to the Lora gateway, and intercepting the control command issued by the Lora gateway in real time.
The Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
The present invention also provides a Lora communication system corresponding to the above communication method, the communication system including the following steps as shown in fig. 5: the Lora gateway and at least one Lora node needing real-time control do not use an SX1301Lora gateway chip, and an SX1276/1278 single-channel Lora chip is adopted. The gateway has interfaces such as 4G/WIFI/net gape, possesses the ability of accessing the internet. The Lora gateway is responsible for collecting data of the Lora node and uploading the data to the cloud or an upper computer, and meanwhile receiving a control instruction of the cloud or the upper computer and issuing the control instruction to the designated Lora node.
Wherein, the Lora node that needs real-time control includes: the device comprises a first configuration module, a first data uploading module and a first instruction interception module.
The first configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period.
The first data uploading module is used for switching the communication frequency of the Lora node to be controlled in real time to the Lora gateway receiving frequency in a time window corresponding to the Lora node to be controlled in real time, and uploading the acquired data to the Lora gateway.
The first instruction interception module is used for switching the communication frequency of the Lora node to be controlled in real time to the instruction sending frequency of the Lora gateway after the Lora node to be controlled in real time successfully uploads the acquired data to the Lora gateway, intercepting the control instruction issued by the Lora gateway in real time, and executing the instruction after receiving the control instruction.
The Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
Here, the Lora node to be controlled in real time adopts external power, and has interfaces such as a relay, 485, IIC, etc., and is externally connected with a sensor and various devices. The Lora node has two functions, namely, the data of a sensor or equipment is required to be periodically collected and uploaded, and the actions such as switching equipment and equipment mode switching are required to be performed immediately in response to the instruction of an upper computer or a cloud.
The above-mentioned Lora communication system further includes at least one Lora node controlled in non-real time as shown in fig. 5; wherein, the Lora node of non real-time control includes: the system comprises a second configuration module, a second data uploading module and a sleep control module.
The second configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway.
The second data uploading module is used for collecting data in the data collecting time, and uploading the collected data to the Lora gateway in a time window corresponding to the Lora node which is not controlled in real time.
The sleep control module is used for controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, and the set time period is located outside a time window corresponding to the non-real-time controlled Lora node.
The non-real-time control Lora node is a low-power consumption Lora node, the low-power consumption Lora node is powered by a battery, an STM8 low-power consumption chip is adopted, and an I2C, RS485 interface is arranged and used for collecting environmental data such as sensing data of temperature, pressure, temperature and humidity. The main requirement is that the time points of the acquisition of all nodes are synchronous, and the data is periodically acquired and uploaded at low frequency (such as every 3 min).
In order to extend the battery life of low power consumption Lora nodes, it is desirable to minimize power consumption. The power consumption of the low-power-consumption Lora node mainly comprises MCU (Microcontroller Unit, micro control unit) power consumption, lora chip power consumption and power consumption of other peripheral devices. In order to reduce the power consumption, the MCU and the Lora chip are in a sleep mode for a long time, and wake up work at regular time. The low-power consumption Lora node is externally connected with a low-power consumption sensor, the sensor is powered by the IO (Input/Output) of the MCU, and the power supply of the sensor is turned off when the MCU sleeps, so that the electric quantity is further saved.
As shown in fig. 6, when the Lora network operates, node configuration and node login are required, and then the node performs operations of uploading data and executing instructions.
Node configuration, namely configuring low-power consumption Lora nodes and Lora nodes needing real-time control in a system through an upper computer terminal, wherein each piece of configuration information comprises a node ID (unique in the system), a node type (low-power consumption node or real-time control node), a sensor type (temperature, pressure and equipment) and additional parameters;
the node logs in, namely the Lora node sends a login request to the Lora gateway, if the node is an unconfigured node, the Lora gateway considers the node as an illegal node, and the Lora gateway does not respond; if the node is configured, the Lora gateway responds to the node request and transmits other configuration information of the node to the node; after the nodes are successfully logged in, data acquisition and uploading are periodically carried out, and control instructions of an upper computer or a cloud end are needed to be executed for the real-time control nodes.
When logging in a Lora node, the Lora gateway distributes a time window for the node and issues a time stamp and the time window; the Lora node adjusts the local time according to the time stamp to realize clock synchronization; and calculating sleep time according to the time window and sleeping, so that all nodes wake up at the same time to acquire data, and wake up at the beginning of each independent time window to upload data.
The Lora node (including the Lora node with real-time response and the Lora node with non-real-time response) also comprises a transmitting power adjusting module; the transmitting power adjusting module is also used for adjusting the transmitting power of the Lora node according to the transmitting power data of the node after receiving the transmitting power data of the node transmitted by the Lora gateway; the node transmitting power data is calculated according to the signal intensity and the signal-to-noise ratio transmitted by the node.
The power consumption of each time of Lora node transmission can be reduced by adjusting the transmission power of the Lora node, when the node logs in, the Lora node transmits with the maximum power, the Lora gateway records the signal strength and the signal to noise ratio of the Lora node transmission, calculates the most suitable transmission power of the Lora node according to the signal strength and the signal to noise ratio of the established times, and transmits configuration information to the Lora node through the Lora gateway when the Lora node uploads data next time, and transmits the new transmission power to the Lora node, and the Lora node adjusts the transmission power; correspondingly, if the adjusted signal strength is detected to be at the limit of the reception of the Lora gateway or the situation of occasional communication failure exists, a command is issued to enable the Lora node to increase the transmitting power.
And all the Lora nodes and the Lora gateway have the same communication parameters, and in order to prevent communication conflict among the nodes, the message communication is carried out in a time division multiplexing mode. The low-power consumption Lora nodes carry out message communication in a time division multiplexing mode, and when different time windows are used, the Lora gateway is respectively communicated with the different low-power consumption Lora nodes; and the Lora gateway divides each transmission period into a plurality of corresponding time windows according to the number of the Lora nodes with the maximum low power consumption.
The first data uploading module and/or the second data uploading module are/is further configured to, after the Lora node uploads the data to the Lora gateway, re-upload the collected data to the Lora gateway in a time window corresponding to the Lora node if a successful data receiving response returned by the Lora gateway is not received.
The first configuration module and/or the second configuration module are/is further configured to send a login request to the Lora gateway when each Lora node re-uploads the collected data to the Lora gateway and after the number of times of setting, the login request does not receive a response of successful data reception returned by the Lora gateway, so as to re-acquire configuration information issued by the Lora gateway.
After uploading data in each time window, the low-power-consumption Lora node sends an OK response (namely a successful data receiving response) to the low-power-consumption Lora node by the Lora gateway; if the data received by the Lora gateway is wrong, the low-power consumption Lora node does not receive the OK response issued by the Lora, and the low-power consumption Lora node retransmits the OK response; if the Lora gateway does not receive the effective data of the node after two transmission periods, the low-power consumption Lora node is considered to be disconnected, and the upper computer terminal is notified.
In order to reduce the power consumption of the low-power-consumption Lora node, firstly, the sending time and the receiving time of the Lora node are reduced, and secondly, parameters of the Lora node are adjusted to reduce the power consumption. In order to reduce the sending time and the receiving time of the Lora node, the communication message between the gateway and the node is simplified. The communication messages of the gateway and the node are as follows:
NodeId(1) Cmd(1) Payload(n) Crc(1)
NodeId: node ID, which uniquely represents a node, 1 byte, in the network;
cmd: the type of data;
PayLoad: a payload, data collected by the sensor;
crc, cyclic redundancy check, ensuring the accuracy of the data.
0 OK, normal response
1 Data, data upload
2 Config, configuration issue
3 Sync, time synchronization
4 Reboot, node restart
5 Disable, node Disable
6 Action, data instruction
For data security, each Lora node is assigned a different key and is simply encrypted.
Time synchronization is particularly important in the networks described herein. After logging in the Lora node to obtain the time stamp, the Lora node is time-synchronized with the gateway. Due to the problem of temperature drift of the crystal oscillator, the time between nodes must deviate with the passage of time between the nodes and the gateway. The gateway records the time corresponding to the time synchronization of the node each time, and when the current time synchronization exceeds a certain time, the gateway issues a clock synchronization instruction to the node when uploading the node data, and the time is re-synchronized.
The non-real-time controlled Lora node further comprises: and a second instruction interception module.
The second instruction interception module is used for receiving a control instruction issued by the Lora gateway at a time window corresponding to the Lora node by the Lora node controlled in non-real time when the control instruction which is from an upper computer or a cloud end and is used for controlling the Lora node controlled in non-real time is cached in the Lora gateway.
The first instruction interception module and/or the second instruction interception module are/is further used for sending a response of completing instruction execution to the Lora gateway after each Lora node executes the control instruction issued by the Lora gateway.
For the low-power consumption Lora node, the instruction of the upper computer or the cloud is not required to be responded in real time. When the Lora gateway receives an instruction sent by the upper computer terminal, the instruction is not immediately sent to the low-power-consumption Lora node, but is cached, and when the low-power-consumption Lora node uploads data, the instruction is sent to the corresponding low-power-consumption Lora node as a response in a time window of the corresponding communication of the low-power-consumption Lora node; the low-power consumption Lora node executes after receiving the instruction and replies an OK response (namely a response of completing instruction execution) to the Lora gateway; after receiving the response, the Lora gateway considers that the instruction is successfully executed, clears the cache, and otherwise, continues to issue the instruction when the next time window of the low-power consumption Lora node uploads data.
For a real-time control Lora node requiring real-time response, the power consumption is not needed to be considered and the Lora node is dormant for a long time due to the fact that the external power supply is adopted for supplying power. After the configuration information is acquired, the real-time control Lora node performs time synchronization, and then the real-time control Lora node is switched to a receiving mode to intercept an instruction issued by a gateway. In order to avoid that the system is busy for a long time when receiving communication messages of the gateway and other nodes, when listening to the instruction, the real-time control Lora node adopts different frequency with normal data uploading and downloading. For the gateway, when receiving an instruction sent by the upper computer or the cloud, the frequency of the real-time control Lora node is switched, and then the instruction is directly issued to the corresponding node. And after receiving the instruction and successfully executing the action, the real-time control Lora node replies OK to the gateway. If the gateway does not receive the reply, the gateway retransmits until the real-time control Lora node replies or the maximum retransmission times are reached.
And the real-time control Lora node is similar to the low-power consumption Lora node, and also performs data acquisition at the whole point and data uploading at the time window. The difference is that, at the beginning of the time window, the real-time node needs to switch its frequency to the frequency received by the gateway, i.e. the frequency of normal data uploading, and after the data uploading is successful, switch back to the frequency of the receiving instruction (i.e. the frequency of the Lora gateway instruction sending), and continuously monitor the instruction of the gateway. Thus, the requirements of timing data uploading and real-time response are met.
In summary, according to the Lora communication method, the Lora node and the Lora communication system provided by the invention, after the Lora node uploads the acquired data to the Lora gateway, the communication frequency is switched to the Lora gateway instruction sending frequency, so that the instruction issued by the Lora gateway can be monitored in real time, and the real-time control of the Lora gateway is realized.
Further, after the non-real-time control Lora node wakes up in a corresponding time window, the collected data is uploaded to the Lora gateway, and the Lora node is kept in a sleep state in a set time period outside the time window, so that the power consumption is reduced, and the energy-saving effect is achieved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (10)

1. A method of Lora communication, comprising the steps of:
the method comprises the steps that a Lora node needing real-time control obtains configuration information issued by a Lora gateway and synchronizes time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to uploading data of the Lora node and a transmission period;
switching the communication frequency of the Lora node to the Lora gateway receiving frequency in a corresponding time window of the Lora node to be controlled in real time, and uploading acquired data to the Lora gateway;
after the acquired data is successfully uploaded to the Lora gateway by the Lora node needing real-time control, switching the communication frequency of the Lora node to the instruction sending frequency of the Lora gateway, and monitoring the control instruction issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
2. The method of Lora communication according to claim 1, further comprising the step of:
the non-real-time controlled Lora node acquires the configuration information issued by the Lora gateway and synchronizes time with the Lora gateway;
the non-real-time controlled Lora node uploads the acquired data to the Lora gateway in a corresponding time window;
and controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, wherein the set time period is positioned outside a time window corresponding to the non-real-time controlled Lora node.
3. The Lora communication method according to claim 2, characterized by further comprising the steps of:
when a control instruction which is from an upper computer or a cloud and is used for controlling the non-real-time controlled Lora node is cached in the Lora gateway, the non-real-time controlled Lora node receives the control instruction issued by the Lora gateway in a time window corresponding to the Lora node.
4. The method of Lora communication according to claim 1, further comprising the step of:
after uploading data to the Lora gateway, if a data receiving success response returned by the Lora gateway is not received, uploading the acquired data to the Lora gateway again in a time window corresponding to the Lora node;
when each Lora node re-uploads the acquired data to the Lora gateway and after the set times, the login request is sent to the Lora gateway so as to re-acquire the configuration information issued by the Lora gateway if the data receiving success response returned by the Lora gateway is not received yet;
after each Lora node executes the control instruction issued by the Lora gateway, sending a response of the completion of instruction execution to the Lora gateway so as to inform the Lora gateway of deleting the executed control instruction.
5. The method of Lora communication according to claim 1, further comprising the step of:
each Lora node receives node transmitting power data issued by the Lora gateway and adjusts the transmitting power of the node transmitting power data according to the node transmitting power data; the node transmitting power data is calculated according to the signal intensity and the signal-to-noise ratio transmitted by the node.
6. The method of Lora communication according to claim 1, further comprising the step of:
and the Lora gateway records the time corresponding to the time synchronization between the Lora gateway and each Lora node, and after a set time length from the time, the Lora gateway re-transmits a clock synchronization instruction to each Lora node so as to inform each Lora node of synchronizing time with the Lora gateway again.
7. A Lora node to be controlled in real time, comprising:
the configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period;
the data uploading module is used for switching the communication frequency of the data uploading module to the receiving frequency of the Lora gateway in a time window corresponding to the Lora node, and uploading the acquired data to the Lora gateway;
the command interception module is used for switching the communication frequency of the Lora node to the command sending frequency of the Lora gateway after the Lora node successfully uploads the acquired data to the Lora gateway, and intercepting the control command issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
8. A Lora communications system, comprising: the Lora gateway and at least one Lora node needing real-time control; the Lora node needing real-time control comprises:
the first configuration module is used for acquiring configuration information issued by the Lora gateway and synchronizing time with the Lora gateway, wherein the configuration information comprises a time stamp, a time window corresponding to the uploading data of the Lora node and a transmission period;
the first data uploading module is used for switching the communication frequency of the Lora node to be controlled in real time to the Lora gateway receiving frequency in a time window corresponding to the Lora node to be controlled in real time, and uploading the acquired data to the Lora gateway;
the first instruction interception module is used for switching the communication frequency of the Lora node to be controlled in real time to the instruction sending frequency of the Lora gateway after the acquired data is successfully uploaded to the Lora gateway by the Lora node to be controlled in real time, and intercepting the control instruction issued by the Lora gateway in real time;
the Lora gateway receiving frequency is different from the Lora gateway command sending frequency.
9. The Lora communication system of claim 8, further comprising at least one non-real time controlled Lora node; the non-real-time controlled Lora node comprises:
the second configuration module is used for acquiring the configuration information issued by the Lora gateway and synchronizing time with the Lora gateway;
the second data uploading module is used for acquiring data in the data acquisition time and uploading the acquired data to the Lora gateway in a time window corresponding to the Lora node controlled in non-real time;
the sleep control module is used for controlling the non-real-time controlled Lora node to be kept in a sleep state in a set time period, and the set time period is located outside a time window corresponding to the non-real-time controlled Lora node.
10. The Lora communication system of claim 9, wherein the non-real time controlled Lora node further comprises:
and the second instruction interception module is used for receiving the control instruction issued by the Lora gateway at a time window corresponding to the Lora node by the Lora node controlled in non-real time when the control instruction which is from an upper computer or a cloud end and is used for controlling the Lora node controlled in non-real time is cached in the Lora gateway.
CN201910681768.2A 2019-04-19 2019-07-26 Lora communication method, lora node and Lora communication system Active CN111836277B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910317705.9A CN110072247A (en) 2019-04-19 2019-04-19 A kind of LoRa network of low-power consumption and real-time
CN2019103177059 2019-04-19

Publications (2)

Publication Number Publication Date
CN111836277A CN111836277A (en) 2020-10-27
CN111836277B true CN111836277B (en) 2024-01-26

Family

ID=67368114

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910317705.9A Withdrawn CN110072247A (en) 2019-04-19 2019-04-19 A kind of LoRa network of low-power consumption and real-time
CN201910681768.2A Active CN111836277B (en) 2019-04-19 2019-07-26 Lora communication method, lora node and Lora communication system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201910317705.9A Withdrawn CN110072247A (en) 2019-04-19 2019-04-19 A kind of LoRa network of low-power consumption and real-time

Country Status (1)

Country Link
CN (2) CN110072247A (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290574B (en) * 2019-08-13 2022-01-25 厦门四信通信科技有限公司 Data transmission method, device, equipment, system and storage medium
CN112399425B (en) * 2019-08-16 2023-03-24 武汉所为科技有限公司 Lora communication method and Lora communication system
CN110568793A (en) * 2019-09-16 2019-12-13 江苏大学 sow shed Internet of things system based on time division multiplexing networking and fault tree and control method thereof
CN110572841B (en) * 2019-09-17 2022-08-12 河南世友信息技术有限公司 Networking method of master-slave low-power-consumption wireless ad hoc network
CN110972222B (en) * 2019-11-26 2021-12-10 武汉慧联无限科技有限公司 Downlink gateway selection method, device and computer storage medium
CN110662250B (en) * 2019-11-29 2020-04-17 武汉慧联无限科技有限公司 Information processing method, related device and storage medium
CN111372215B (en) * 2020-03-16 2022-06-03 南京荣泰电气自动化有限公司 LORA-based single-channel synchronous information acquisition system and method
CN112489403A (en) * 2020-10-22 2021-03-12 武汉所为科技有限公司 Remote meter reading method and device
CN112822735B (en) * 2020-12-31 2022-02-01 广州技象科技有限公司 Gateway switching management method, device, equipment and storage medium based on Internet of things
CN112954782A (en) * 2021-03-26 2021-06-11 珠海瑞德电子科技有限公司 Motor control method and device based on LoRa unit
CN113676862A (en) * 2021-08-19 2021-11-19 全球能源互联网欧洲研究院 Converter valve safety monitoring system and method
CN113848791B (en) * 2021-09-29 2023-06-06 金陵科技学院 Low-power consumption general agricultural environment monitoring terminal
CN113938998A (en) * 2021-09-30 2022-01-14 深圳市三航物联科技有限公司 Communication control method, acquisition terminal and communication system based on Lora

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851785A (en) * 2017-03-15 2017-06-13 福州东日信息技术有限公司 A kind of wireless communications method and system
CN107590987A (en) * 2017-10-23 2018-01-16 天津云拓网络科技有限公司 A kind of long-distance meter-reading system based on low-power consumption Internet of Things
CN107820334A (en) * 2017-11-07 2018-03-20 深圳市中兴物联科技有限公司 A kind of radio network gateway
CN109246636A (en) * 2018-08-06 2019-01-18 广东优世联合控股集团股份有限公司 Method for receiving ⒉ 4G communication-based sensing data by Lora gateway and repeater

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862068A (en) * 2018-12-12 2019-06-07 四川长虹电器股份有限公司 A kind of LORA data acquisition control system based on TDMA

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851785A (en) * 2017-03-15 2017-06-13 福州东日信息技术有限公司 A kind of wireless communications method and system
CN107590987A (en) * 2017-10-23 2018-01-16 天津云拓网络科技有限公司 A kind of long-distance meter-reading system based on low-power consumption Internet of Things
CN107820334A (en) * 2017-11-07 2018-03-20 深圳市中兴物联科技有限公司 A kind of radio network gateway
CN109246636A (en) * 2018-08-06 2019-01-18 广东优世联合控股集团股份有限公司 Method for receiving ⒉ 4G communication-based sensing data by Lora gateway and repeater

Also Published As

Publication number Publication date
CN111836277A (en) 2020-10-27
CN110072247A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN111836277B (en) Lora communication method, lora node and Lora communication system
US8134942B2 (en) Communication protocol for low-power network applications and a network of sensors using the same
US11265814B2 (en) Implementation method of low power consumption internet of things based on proxy apparatus
EP2547166B1 (en) Method for controlling discontinuous reception in mobile communication device and corresponding terminal
US8223744B2 (en) Communication protocol for low-power network applications and a network of sensors using the same
US10326518B1 (en) Repeater and node utilization
CN102740427B (en) Method for awakening wireless sensor, wireless sensor and wireless sensor system
CN102143570B (en) Wireless sensor network scheduling method and system for realizing real-time monitoring of low-power-consumption nodes
CN103237337B (en) A kind of wireless senser adaptive network dormancy control method
US20200336878A1 (en) Gateway device for iot sensors or actuators
KR101845534B1 (en) Internet of things wireless communication system based long range
CN104936273A (en) Synchronous sleep low power consumption communication method for Mesh self-organization wireless sensor network
WO2006060667A2 (en) Wireless communication synchronization
CN110572841B (en) Networking method of master-slave low-power-consumption wireless ad hoc network
US20160112955A1 (en) Communication protocol between access point and wireless station
CN109792688A (en) Manage the sleep cycle in wireless communication system
CN103036659A (en) Method and system for recovering from DRX timing de-synchronization in LTE-active
CN110062433A (en) A kind of LoRa recurrent network of low-power consumption
CN110798534A (en) Control method and control system of intelligent power-taking switch
US10687390B2 (en) Node bridge
US20230209185A1 (en) Transmission and confirmation of camera configuration data and commands through a network
Qin et al. Cross-interface scheduling toward energy-efficient device-to-gateway communications in IoT
GB2556844A (en) Random access repeater, relay system and relay method therefor
JP2010231566A (en) Wireless sensor terminal and control method
CN108650701A (en) A kind of method and apparatus of data transmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant