CN111970136B - Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium - Google Patents

Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium Download PDF

Info

Publication number
CN111970136B
CN111970136B CN201910419439.0A CN201910419439A CN111970136B CN 111970136 B CN111970136 B CN 111970136B CN 201910419439 A CN201910419439 A CN 201910419439A CN 111970136 B CN111970136 B CN 111970136B
Authority
CN
China
Prior art keywords
terminal
upgrading
mode
firmware
sending
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
CN201910419439.0A
Other languages
Chinese (zh)
Other versions
CN111970136A (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.)
Shenzhen Kaifa Technology Co Ltd
Original Assignee
Shenzhen Kaifa 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 Shenzhen Kaifa Technology Co Ltd filed Critical Shenzhen Kaifa Technology Co Ltd
Priority to CN201910419439.0A priority Critical patent/CN111970136B/en
Publication of CN111970136A publication Critical patent/CN111970136A/en
Application granted granted Critical
Publication of CN111970136B publication Critical patent/CN111970136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal

Abstract

The invention discloses a firmware upgrading method, a LoRa gateway, a LoRa system and a computer readable storage medium, wherein the method comprises the following steps: the LoRa gateway acquires the firmware of the new version from the server; respectively comparing the new version with the existing versions of the firmware of all terminals to determine the terminal needing to be upgraded, and sending an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode; the invention can not affect the operation of the terminal which does not need to be upgraded, and can upgrade the terminal which needs to be upgraded on line, and in conclusion, the whole upgrading process does not affect the operation of the LoRa system.

Description

Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium
Technical Field
The invention relates to the field of software upgrading of an LoRa system, in particular to a firmware upgrading method, an LoRa gateway, an LoRa system and a computer readable storage medium.
Background
The networking scheme of the internet of things based on LoRa communication is widely applied at present, and the number of terminals in a set of LoRa communication system is generally many. LoRa terminal does not generally have the interface to carry out firmware upgrading, in case the terminal needs to be upgraded because of the product problem, needs big recalls, and the cost is huge. Even if the terminal has an upgrading interface (a serial port, a USB and the like), workers are required to upgrade one by one on site, and the time consumption is huge.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a firmware upgrading method, an LoRa gateway, an LoRa system, and a computer readable storage medium, aiming at the defect of inconvenient upgrading in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in one aspect, a method of firmware upgrade is constructed, the method comprising:
the LoRa gateway acquires the firmware of the new version from the server;
respectively comparing the new version with the existing versions of the firmware of all terminals to determine the terminal needing to be upgraded, and sending an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode;
and sending the firmware of the new version to the terminal needing to be upgraded for upgrading, and informing the terminal which finishes upgrading to exit the upgrading mode.
Preferably, the new version of firmware is sent to the terminal needing to be upgraded for upgrading, and the terminal after upgrading is informed to exit the upgrading mode, including;
sending the upgrading information of the firmware of the new version to the terminal needing upgrading in a broadcast sending mode, and confirming that the terminal needing upgrading receives the upgrading information in a unicast confirming mode;
dividing the firmware of the new edition into a plurality of data packets, and sending the data packets to a terminal needing to be upgraded by adopting a broadcast sending mode, wherein: the terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets;
sequentially inquiring whether each terminal needing to be upgraded has loss or not by adopting a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit an upgrading mode for the terminal without a missing data packet;
and for the terminal lacking the data packet, sending the missing data packet to the terminal in a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit the upgrading mode after the transmission of all the missing data packets is finished.
Preferably, the sending the plurality of data packets to the terminal needing to be upgraded in a broadcast sending manner includes: performing N rounds of transmissions, each round of transmission comprising: and sending the data packets to the terminal needing to be upgraded in a broadcast sending mode one by one.
Preferably, the sending an upgrade command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrade mode includes: and sending an upgrading command to the terminal needing upgrading one by one in a unicast confirmation-needed mode so as to enable the terminal needing upgrading to enter an upgrading mode one by one.
Preferably, the obtaining, by the LoRa gateway, the new version of firmware from the server includes: the LoRa gateway communicates with the server through Ethernet or WiFi, and periodically detects whether the remote server has the firmware of a new version, and if the remote server has the firmware of the new version, the LoRa gateway downloads the firmware of the new version to the LoRa gateway.
In another aspect, a LoRa gateway is configured, including:
the new version acquisition module is used for acquiring the new version of firmware from the server;
the upgrading starting module is used for respectively comparing the new version with the existing versions of the firmware of all the terminals to determine the terminal needing upgrading, and sending an upgrading command to the terminal needing upgrading so that the terminal needing upgrading enters an upgrading mode;
and the upgrading module is used for sending the firmware of the new version to the terminal needing upgrading for upgrading and informing the terminal after upgrading to exit the upgrading mode.
Preferably, the upgrade module includes:
the upgrading pre-preparation unit is used for sending upgrading information of the firmware of the new version to the terminal needing upgrading in a broadcast sending mode and confirming that the terminal needing upgrading receives the upgrading information in a unicast confirming mode;
the upgrading unit is used for dividing the firmware of the new version into a plurality of data packets and sending the data packets to the terminal needing upgrading in a broadcast sending mode, wherein: the terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets;
the upgrading result confirming unit is used for sequentially inquiring whether each terminal needing upgrading has deletion by adopting a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit an upgrading mode for the terminal without the missing data packet;
and the upgrading supplementing unit is used for sending the missing data packets to the terminal in a unicast confirmation-needed mode for the terminal missing the data packets, and sending a command to enable the terminal to exit the upgrading mode after the transmission of all the missing data packets is finished.
In three aspects, a LoRa gateway is constructed comprising a processor and a memory, the memory storing a computer program executable by the processor to implement the steps of the method as described in any one of the preceding claims.
In a fourth aspect, an LoRa system is constructed, and the LoRa system includes a server, a gateway, and a terminal, where the gateway is the LoRa gateway.
In a fifth aspect, a computer-readable storage medium is constructed, comprising a computer program executable by a processor to implement the steps of the method as claimed in any one of the preceding claims.
The firmware upgrading method, the LoRa gateway, the LoRa system and the computer readable storage medium have the following advantages that: the LoRa gateway acquires the firmware of the new edition from the server and determines the terminal needing to be upgraded, firstly sends an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode, then sends the firmware of the new edition to the terminal needing to be upgraded for upgrading, and finally informs the terminal after upgrading to exit the upgrading mode so as to realize automatic upgrading of the terminal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only examples of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts:
FIG. 1 is a flow chart of a firmware upgrade method of the present invention;
FIG. 2 is a flow chart of a preferred way of implementing step S103 of FIG. 1;
fig. 3 is a functional block diagram of the LoRa gateway of the present invention;
FIG. 4 is a functional block diagram of a preferred manner of upgrading the module of FIG. 3.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Exemplary embodiments of the invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The general idea of the invention is as follows: the LoRa gateway firstly acquires the firmware of a new version from the server, then compares the new version with the existing versions of the firmware of all the terminals respectively to determine the terminal needing to be upgraded, sends an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode, finally sends the firmware of the new version to the terminal needing to be upgraded for upgrading, and informs the terminal after upgrading to exit the upgrading mode.
In order to better understand the technical solutions, the technical solutions will be described in detail below with reference to the drawings and the specific embodiments of the specification, and it should be understood that the embodiments and specific features of the embodiments of the present invention are detailed descriptions of the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features of the embodiments and examples of the present invention may be combined with each other without conflict.
Example one
Referring to fig. 1, it is a flowchart of the firmware upgrading method of the present invention, where an execution subject of the firmware upgrading method of the present invention is an LoRa gateway, and the method includes:
s101, the LoRa gateway acquires a new version of firmware from a server;
specifically, the LoRa gateway communicates with the server through the ethernet or WiFi, and periodically detects whether the remote server has a new firmware version, and if the new firmware version exists, the new firmware version is downloaded to the LoRa gateway, and the specific downloading method may be a method of directly downloading a firmware file in TFTP, FTP, or the like, or a method of dividing the firmware into a plurality of data blocks on the server side, and then downloading the data blocks one by one. After downloading, checking whether the downloaded firmware is damaged (generally, a check code is added at the end of the file when the file is downloaded, and a downloading party can judge whether the downloaded file is complete according to the check code), if the firmware is complete, entering the next step, otherwise, downloading the firmware again.
S102, respectively comparing the new version with the existing versions of the firmware of all terminals to determine the terminal needing to be upgraded, and sending an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode;
specifically, if the existing version of the terminal is lower than the new version, the terminal is determined to be the terminal needing to be upgraded. And for those terminals which do not need to be upgraded, normal work is still performed.
Specifically, in this embodiment, sending the upgrade command is in a unicast mode requiring confirmation, and the upgrade commands are sent to the terminals requiring upgrade one by one, so that the terminals requiring upgrade enter an upgrade mode one by one.
The unicast acknowledgement-required mode is that after the sender sends an LoRa packet, the receiver is required to respond with an ACK to indicate that the LoRa packet is received, and if the receiver does not respond with an ACK, the sender is required to send the LoRa packet again.
The upgrade mode in this embodiment refers to a mode that the terminal can receive data and write firmware into a corresponding software installation area, for example, when the terminal enters the upgrade mode, the terminal can switch from the currently running software to the BootLoader.
And S103, sending the firmware of the new version to the terminal needing to be upgraded for upgrading, and informing the terminal after upgrading to exit the upgrading mode.
The firmware sending method is not limited, and referring to fig. 2, in a preferred embodiment, the step S103 specifically includes;
s1031, sending the upgrading information of the firmware of the new version to the terminal needing upgrading in a broadcast sending mode, and confirming that the terminal needing upgrading receives the upgrading information in a unicast confirming mode;
specifically, the upgrade information includes a file name, a file size, an MD5 value, and a version of the firmware.
S1032, dividing the firmware of the new version into a plurality of data packets, and sending the data packets to a terminal needing to be upgraded in a broadcast sending mode;
preferably, in this embodiment, when the plurality of data packets are sent to the terminal that needs to be upgraded in a broadcast sending manner, a multi-round broadcast form is adopted, specifically: performing N rounds of transmissions, each round of transmission comprising: and sending the data packets to the terminal needing to be upgraded in a broadcast sending mode one by one. The LoRa gateway may determine how many broadcasting rounds are appropriate according to the time required for firmware transmission, that is, determine the value of N, for example, the smaller the time required for transmission, the larger the value of N.
The terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets. Since the terminal already knows the file size in step S1031, the terminal can know the number of packets according to the size of the received packets, determine that the received packet is the several packets of the firmware by the sequence number of the received packet, and record which packets are not received.
In addition, when each data packet is received by the terminal, the data packet is directly written into the corresponding software installation area, so that after all the data packets are received, the writing of the whole firmware is finished, and the upgrading is finished.
S1033, sequentially inquiring whether each terminal needing to be upgraded has deficiency or not by adopting a unicast mode needing confirmation, and sending a command to enable the terminal to exit an upgrading mode for the terminal without a deficient data packet;
and inquiring in a unicast mode needing confirmation, wherein the inquiry is mainly to confirm that each LoRa terminal is upgraded successfully.
If the missing packet does not exist, the terminal replies a message indicating that the missing packet does not exist to the gateway. And for the missing condition, the terminal needs to find the data packet missing by the gateway, and when the data packet missing by the terminal needs to be found, the terminal also adopts a unicast mode needing confirmation to send the message to the gateway.
S1034, for the terminal missing the data packet, adopting a unicast mode needing to be confirmed to send the missing data packet to the terminal, and after the transmission of all the missing data packets is completed, sending a command to make the terminal exit the upgrading mode.
It can be seen that, in this embodiment, the firmware is downloaded to the local gateway first, and then the terminal to be upgraded is determined by comparing the version with the gateway, so as to control the terminal to be upgraded to enter the upgrade mode, in the upgrade process, the upgrade information is sent to the terminal in a unicast mode requiring confirmation first, then the firmware is divided into a plurality of data packets and sent in a broadcast toronto mode, so as to improve the data packet sending efficiency, in order to ensure that each terminal is upgraded, a query in a unicast mode requiring confirmation is adopted, and the missed data packets are re-sent in a unicast mode requiring confirmation, and the upgrade mode exits after the upgrade success, so that the whole process realizes the online automatic upgrade of the terminal, and the upgrade efficiency is improved while the completeness and reliability of the upgrade are ensured.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above.
Example two
Referring to fig. 3, a schematic block diagram of the LoRa gateway of the present invention is shown, where the LoRa gateway of the present invention includes:
and a new version obtaining module 301, configured to obtain a new version of firmware from the server.
An upgrade starting module 302, configured to compare the new version with existing versions of firmware of all terminals respectively to determine a terminal that needs to be upgraded, and send an upgrade command to the terminal that needs to be upgraded so that the terminal that needs to be upgraded enters an upgrade mode.
And the upgrading module 303 is configured to send the firmware of the new version to the terminal that needs to be upgraded for upgrading, and notify the terminal that is upgraded to exit the upgrading mode.
With regard to the new version acquisition module 301:
specifically, the LoRa gateway communicates with the server through the ethernet or WiFi, the new version obtaining module 201 periodically detects whether the remote server has a new version of firmware, and if the remote server has the new version of firmware, the new version of firmware is downloaded to the LoRa gateway, and the specific downloading mode may be a mode of directly downloading a firmware file such as TFTP or FTP, or a mode of dividing the firmware into a plurality of data blocks on the server side, and then downloading the data blocks one by one. After downloading, checking whether the downloaded firmware is damaged (generally, a check code is added at the end of the file when the file is downloaded, and a downloading party can judge whether the downloaded file is complete according to the check code), if the firmware is complete, entering the next step, otherwise, downloading the firmware again.
With respect to upgrade initiation module 302:
specifically, if the existing version of the terminal is lower than the new version, the terminal is determined to be the terminal needing to be upgraded. And for those terminals which do not need to be upgraded, normal work is still performed.
Specifically, in this embodiment, sending the upgrade command is in a unicast mode requiring confirmation, and the upgrade commands are sent to the terminals requiring upgrade one by one, so that the terminals requiring upgrade enter an upgrade mode one by one.
The unicast acknowledgement method is that after the sender sends a LoRa packet, the receiver needs to respond with an ACK to indicate that the packet is received, and if the receiver does not respond with an ACK, the sender needs to send the LoRa packet again.
The upgrade mode in this embodiment refers to a mode that the terminal can receive data and write firmware into a corresponding software installation area, for example, when the terminal enters the upgrade mode, the terminal can switch from the currently running software to the BootLoader.
With respect to upgrade module 303:
the sending manner of the firmware of the upgrade module 303 is not limited, and referring to fig. 4, in a preferred manner, the upgrade module 303 includes:
an upgrade pre-preparation unit 3031, configured to send the upgrade information of the firmware in the new version to the terminal that needs to be upgraded in a broadcast sending manner, and confirm that all the terminals that need to be upgraded receive the upgrade information in a unicast manner that needs to be confirmed. Specifically, the upgrade information includes a file name, a file size, an MD5 value, and a version of the firmware.
An upgrade unit 3032, configured to divide the firmware in the new version into a plurality of data packets, and send the data packets to a terminal that needs to be upgraded in a broadcast sending manner, where: the terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets;
preferably, in this embodiment, when the plurality of data packets are sent to the terminal that needs to be upgraded in a broadcast sending manner, a multi-round broadcast form is adopted, specifically: performing N rounds of transmissions, each round of transmission comprising: and sending the data packets to the terminal needing to be upgraded in a broadcast sending mode one by one. The LoRa gateway may determine how many broadcasting rounds are appropriate according to the time required for firmware transmission, that is, determine the value of N, for example, the smaller the time required for transmission, the larger the value of N.
The terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets. Since the terminal already knows the file size based on the upgrade information sent by the upgrade preparation unit 3031, the terminal can know the number of packets according to the size of the received packets, determine that the received packet is the second packet of the firmware by the sequence number of the received packet, and record which packets are not received.
In addition, when each data packet is received by the terminal, the data packet is directly written into the corresponding software installation area, so that after all the data packets are received, the writing of the whole firmware is finished, and the upgrading is finished.
An upgrade result confirmation unit 3033, configured to sequentially inquire, in a unicast confirmation-needed manner, whether each terminal that needs to be upgraded has a missing part, and send a command to enable the terminal to exit the upgrade mode for terminals that do not have missing data packets.
And an upgrade supplementing unit 3034, configured to send, to a terminal that lacks a data packet, the missing data packet to the terminal in a unicast manner that needs to be confirmed, and send a command to enable the terminal to exit the upgrade mode after transmission of all the missing data packets is completed.
And inquiring in a unicast mode needing confirmation, wherein the inquiry is mainly to confirm that each LoRa terminal is upgraded successfully.
If the missing packet does not exist, the terminal replies a message indicating that the missing packet does not exist to the gateway. And for the missing situation, the terminal needs to find the data packet which is missing by the gateway, and when the terminal needs the missing data packet, the terminal also adopts a unicast mode which needs to confirm to send the message to the gateway.
The functions of the functional modules of the apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the description related to the foregoing method embodiment, which is not described herein again.
The above description relates to various modules, and it should be noted that the above description of various modules is divided into these modules for clarity of illustration. However, in actual implementation, the boundaries of the various modules may be fuzzy. For example, any or all of the functional modules herein may share various hardware and/or software elements. Also for example, any and/or all of the functional modules herein may be implemented in whole or in part by a common processor executing software instructions. Additionally, various software sub-modules executed by one or more processors may be shared among the various software modules. Accordingly, the scope of the present invention is not limited by the mandatory boundaries between the various hardware and/or software elements, unless explicitly claimed otherwise.
EXAMPLE III
The present embodiment discloses an LoRa gateway, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the steps of the method according to the first embodiment.
Example four
The embodiment discloses an LoRa system, which comprises a server, a gateway and a terminal, wherein the gateway is the LoRa gateway described in the third embodiment, and the terminal is the terminal mentioned in the first embodiment.
EXAMPLE five
The present embodiment discloses a computer-readable storage medium comprising a computer program executable by a processor to perform the steps of the method according to the first embodiment.
In summary, the firmware upgrading method, the LoRa gateway, the LoRa system, and the computer readable storage medium of the present invention have the following advantages: the LoRa gateway acquires the firmware of the new edition from the server and determines the terminal needing to be upgraded, firstly sends an upgrading command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrading mode, then sends the firmware of the new edition to the terminal needing to be upgraded for upgrading, and finally informs the terminal after upgrading to exit the upgrading mode so as to realize automatic upgrading of the terminal.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (7)

1. A method of firmware upgrade, the method comprising:
the LoRa gateway acquires the firmware of the new version from the server;
respectively comparing the new version with the existing versions of the firmware of all terminals to determine the terminal needing to be upgraded, and sending an upgrade command to the terminal needing to be upgraded so that the terminal needing to be upgraded enters an upgrade mode, wherein the upgrade mode comprises the following steps: sending an upgrading command to the terminal to be upgraded one by one in a unicast mode needing to be confirmed so as to enable the terminal to be upgraded to enter an upgrading mode one by one, wherein the upgrading mode is a mode which can receive data and write firmware into a corresponding software installation area;
sending the firmware of the new version to a terminal needing to be upgraded for upgrading, and informing the upgraded terminal to exit an upgrading mode, wherein the upgrading mode comprises the following steps: sending the upgrading information of the firmware of the new version to the terminal needing upgrading in a broadcast sending mode, and confirming that the terminal needing upgrading receives the upgrading information in a unicast confirming mode; dividing the firmware of the new edition into a plurality of data packets, and sending the data packets to a terminal needing to be upgraded by adopting a broadcast sending mode, wherein: the terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets; sequentially inquiring whether each terminal needing to be upgraded has loss or not by adopting a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit an upgrading mode for the terminal without a missing data packet; and for the terminal lacking the data packet, sending the missing data packet to the terminal in a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit the upgrading mode after the transmission of all the missing data packets is finished.
2. The method according to claim 1, wherein said sending the plurality of data packets to the terminal needing to be upgraded by broadcast transmission comprises: performing N rounds of transmissions, each round of transmission comprising: and sending the data packets to the terminal needing to be upgraded in a broadcast sending mode one by one.
3. The method of claim 1, wherein the LoRa gateway obtains the new version of firmware from the server, comprising: the LoRa gateway communicates with the server through Ethernet or WiFi, and periodically detects whether the remote server has the firmware of a new version, and if the remote server has the firmware of the new version, the LoRa gateway downloads the firmware of the new version to the LoRa gateway.
4. A LoRa gateway, comprising:
the new version acquisition module is used for acquiring the new version of firmware from the server;
the upgrade starting module is used for respectively comparing the new version with the existing versions of the firmware of all the terminals to determine the terminal needing to be upgraded and sending an upgrade command to the terminal needing to be upgraded so that the terminal needing to be upgraded can enter an upgrade mode, and the upgrade starting module comprises the following steps: sending an upgrading command to the terminal to be upgraded one by one in a unicast mode needing to be confirmed so as to enable the terminal to be upgraded to enter an upgrading mode one by one, wherein the upgrading mode is a mode which can receive data and write firmware into a corresponding software installation area;
the upgrading module is used for sending the firmware of the new version to the terminal needing upgrading for upgrading and informing the terminal after upgrading to exit the upgrading mode;
wherein, the upgrading module includes:
the upgrading pre-preparation unit is used for sending upgrading information of the firmware of the new version to the terminal needing upgrading in a broadcast sending mode and confirming that the terminal needing upgrading receives the upgrading information in a unicast confirming mode;
the upgrading unit is used for dividing the firmware of the new version into a plurality of data packets and sending the data packets to the terminal needing upgrading in a broadcast sending mode, wherein: the terminal can determine whether the data packet received by the terminal is missing or not and the missing data packet according to the upgrading information and all the received data packets;
the upgrading result confirming unit is used for sequentially inquiring whether each terminal needing upgrading has deletion by adopting a unicast mode needing to be confirmed, and sending a command to enable the terminal to exit an upgrading mode for the terminal without the missing data packet;
and the upgrading supplementing unit is used for sending the missing data packets to the terminal in a unicast confirmation-needed mode for the terminal missing the data packets, and sending a command to enable the terminal to exit the upgrading mode after the transmission of all the missing data packets is finished.
5. A LoRa gateway comprising a processor and a memory, the memory storing a computer program executable by the processor to perform the steps of the method of any of claims 1-3.
6. An LoRa system, comprising a server, a gateway, and a terminal, wherein the gateway is the LoRa gateway of claim 5.
7. A computer-readable storage medium, characterized in that it comprises a computer program which is executable by a processor to implement the steps of the method according to any one of claims 1-3.
CN201910419439.0A 2019-05-20 2019-05-20 Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium Active CN111970136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910419439.0A CN111970136B (en) 2019-05-20 2019-05-20 Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910419439.0A CN111970136B (en) 2019-05-20 2019-05-20 Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111970136A CN111970136A (en) 2020-11-20
CN111970136B true CN111970136B (en) 2022-12-30

Family

ID=73357803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910419439.0A Active CN111970136B (en) 2019-05-20 2019-05-20 Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111970136B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527366B (en) * 2020-11-25 2024-03-19 江苏华创微系统有限公司 Update rollback fault tolerant design technique for embedded processor boot

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060427A (en) * 2006-04-19 2007-10-24 华为技术有限公司 A system and method for realizing the remote software updating
CN106411619A (en) * 2016-12-02 2017-02-15 北京博大光通物联科技股份有限公司 Wireless equipment upgrading method based on low-power-consumption wide area network
CN107835088A (en) * 2017-09-26 2018-03-23 深圳市亿兆互联技术有限公司 A kind of LoRa terminal devices over-the-air upgrade method and system
CN108173685A (en) * 2017-12-26 2018-06-15 金卡智能集团股份有限公司 Upgrade method, system and corresponding terminal device and server based on LoRa communications

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937242B (en) * 2016-12-27 2020-01-07 四川雷克斯智慧科技股份有限公司 Fire scene entrance control method based on Internet of things

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060427A (en) * 2006-04-19 2007-10-24 华为技术有限公司 A system and method for realizing the remote software updating
CN106411619A (en) * 2016-12-02 2017-02-15 北京博大光通物联科技股份有限公司 Wireless equipment upgrading method based on low-power-consumption wide area network
CN107835088A (en) * 2017-09-26 2018-03-23 深圳市亿兆互联技术有限公司 A kind of LoRa terminal devices over-the-air upgrade method and system
CN108173685A (en) * 2017-12-26 2018-06-15 金卡智能集团股份有限公司 Upgrade method, system and corresponding terminal device and server based on LoRa communications

Also Published As

Publication number Publication date
CN111970136A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN110032382A (en) A kind of vehicle electronic control unit upgrade method, system and terminal device
CN109831338B (en) Vehicle machine system upgrading method, cloud server and mobile terminal
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
US20080196023A1 (en) Local controller, remote management controller and method for automatically updating the local controller of an air conditioner system
US10684932B2 (en) Program update system, distribution device, and program update method
CN101958799A (en) Method, device and system for updating terminal
CN112737847B (en) Node upgrading method and device, storage medium and electronic device
CN102664950A (en) Data communication method between welding power sources and computers
CN111970136B (en) Firmware upgrading method, loRa gateway, loRa system and computer readable storage medium
CN113238791A (en) OTA differential upgrading method and system of master-slave architecture
CN113721966A (en) Node upgrading method and device, storage medium and electronic device
CN108153561B (en) Ethernet loading method and signal processing system for DSP and FPGA
CN112114524B (en) Centralized control network-based equipment control and access method and equipment thereof
CN104580360A (en) System and method for updating firmware through heterogeneous network
CN116938712A (en) Device upgrade method, device upgrade apparatus, and computer-readable storage medium
CN114745740B (en) Intelligent household appliance upgrading system and method
CN115550427A (en) Equipment upgrading method, device, equipment and storage medium
CN107171915B (en) Communication protocol changing method and device
CN113676496B (en) Data transmission method, system, readable storage medium and computer equipment
CN112767722B (en) Control method and device of traffic signal machine, computer equipment and storage medium
CN113794751A (en) Data interaction method, system, equipment and storage medium of Internet of things system
US20070268057A1 (en) Methods and apparatus for applying changes to a group of objects
CN114301781A (en) Wired router terminal upgrading method and device, computer equipment and storage medium
CN109960657B (en) Test environment deployment method and related device
CN115604113B (en) FAN network equipment rapid upgrading method, system, equipment and medium

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