CN112291323A - MQTT communication protocol-based single-chip microcomputer firmware upgrading communication method - Google Patents

MQTT communication protocol-based single-chip microcomputer firmware upgrading communication method Download PDF

Info

Publication number
CN112291323A
CN112291323A CN202011139933.0A CN202011139933A CN112291323A CN 112291323 A CN112291323 A CN 112291323A CN 202011139933 A CN202011139933 A CN 202011139933A CN 112291323 A CN112291323 A CN 112291323A
Authority
CN
China
Prior art keywords
firmware
internet
host
communication field
upper computer
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.)
Granted
Application number
CN202011139933.0A
Other languages
Chinese (zh)
Other versions
CN112291323B (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.)
Shanghai Construction Group Co Ltd
Shanghai Seari Intelligent System Co Ltd
Original Assignee
Shanghai Construction Group Co Ltd
Shanghai Seari Intelligent System 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 Shanghai Construction Group Co Ltd, Shanghai Seari Intelligent System Co Ltd filed Critical Shanghai Construction Group Co Ltd
Priority to CN202011139933.0A priority Critical patent/CN112291323B/en
Publication of CN112291323A publication Critical patent/CN112291323A/en
Application granted granted Critical
Publication of CN112291323B publication Critical patent/CN112291323B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/66Updates of program code stored in read-only memory [ROM]
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a single chip microcomputer firmware upgrading communication method based on an MQTT communication protocol, which comprises an upper computer, an MQTT server and Internet of things equipment, wherein the MQTT server is positioned at the cloud end, the upper computer and the Internet of things equipment are MQTT client ends, and Json data are interacted between the upper computer and the Internet of things equipment through the MQTT server. The invention provides an over-the-air firmware upgrading method under the condition of MQTT low service quality (0 or 1), which overcomes the influence of missing packets and retransmission packets on firmware transmission in the communication process; the invention has low resource occupation on MQTT service terminals, low requirement on service quality and low requirement on the quality of network communication between the two parties; in the invention, the redundant calculation of data checking is undertaken by the upper computer, the requirements on the performance of the single chip microcomputer and the ROM are low, the firmware downloading process is dominated by the single chip microcomputer, and the coupling is low.

Description

MQTT communication protocol-based single-chip microcomputer firmware upgrading communication method
Technical Field
The invention relates to a singlechip over-the-air firmware upgrading method based on an MQTT communication protocol.
Background
The internet of things is a medium for connecting various objects into a network through an information technology to help people to acquire information of the objects, and is widely applied to various fields such as intelligent logistics, intelligent transportation, financial management and the like. A large amount of low-cost Internet of things equipment adopts a low-cost low-performance single chip microcomputer as a central processing unit, a common communication protocol of The low-cost Internet of things equipment is MQTT, and The Over-The-Air firmware upgrade (firmware update Over The Air) of The single chip microcomputer is an important function.
MQTT (message queue telemetry transport) is a publish/subscribe paradigm based messaging protocol under the ISO standard (ISO/IEC PRF 20922). It works on the TCP/IP suite and is a publish/subscribe messaging protocol designed for remote devices with poor hardware performance and in poor network conditions.
The MQTT protocol is a protocol designed for communication with a large number of remote sensors and control devices that have limited computational power and operate over low-bandwidth, unreliable networks, and has several main characteristics:
feature one) provides one-to-many message publishing using a publish/subscribe message schema, decoupling applications.
Property two) message transmission that is masked from the content of the payload.
Feature three) provides network connectivity using TCP/IP.
Characteristic four) there are three kinds of message publishing service quality, which are:
0: "at most once", message publishing relies entirely on the underlying TCP/IP network. Message loss or duplication can occur. This level can be used in situations where environmental sensor data is lost, so it is not said that a read record is lost once, since a second transmission will occur in the near future.
1: "at least once" ensures that messages arrive, but message repetition may occur.
2: "once only", ensures that a message arrives once. This level can be used for the following cases: in a billing system, message duplication or loss can lead to incorrect results.
Property five) small size transmission, with little overhead (fixed length header is 2 bytes), protocol switching is minimized to reduce network traffic.
Property six) informs about the mechanism of client abort on each side using the Last wil and maintenance properties.
The upgrading of the firmware of the single chip microcomputer is the Application programming of iap (in Application programming), and generally comprises two programs: bootloader program and APP program.
Generally, when a user needs to implement an IAP function, that is, when a user program runs for updating, two item codes need to be written when designing a firmware program: the first project program does not perform normal functional operations, but simply receives the program or data through some kind of communication pipe (e.g., USB, USART), performs an update of the second project code; the second item code is the real function code. The two parts of project codes are simultaneously burned in User Flash, when a chip is powered on, the first project code starts to run, and the following operations are carried out:
step 1, checking whether the second item code needs to be updated, if not, turning to step 3, and if so, turning to step 2;
step 2, rotating step 3 after executing the updating operation;
and 3, jumping to a second item code for execution.
The first item of program code must be burned in by other means, such as JTAG or ISP; the second project code can be burnt in by using the first project code IAP function, or can be burnt in together with the first project code, and then is updated by the first project code when needing program updating.
For STM32, because its interrupt vector table is located in the lowest address area of the program memory, in order for the first item of program code to be able to respond correctly to an interrupt, it is common to arrange for the first item of program code to be in the start area of Flash, and for the second item of program code to follow.
When the second item code starts to execute, the interrupt vector table of the CPU needs to be mapped to the own vector table, and then other operations are executed.
If the IAP program is corrupted, the product must be returned to the factory to re-program the program, which is cumbersome and very time and money consuming. In response to such a requirement, the STM32 automatically sets write protection to the first 4 pages of the user's Flash area while performing read protection on the Flash area, which effectively ensures that the IAP program (first item program code) area is not accidentally destroyed.
The commonly used IPA code is realized on the basis of an RS485 MODBUS communication protocol or a CAN UDS communication protocol, the default communication premise is reliable wired connection, and the method cannot be applied to the communication condition that the MQTT message issuing service quality is 0 or 1.
Disclosure of Invention
The purpose of the invention is: an over-the-air firmware upgrading method under MQTT low service quality is provided.
In order to achieve the above object, the technical solution of the present invention is to provide a communication method for upgrading firmware of a single chip microcomputer based on MQTT communication protocol, including an upper computer, an MQTT server and an internet of things device, where the MQTT server is located at a cloud, the upper computer and the internet of things device are both MQTT clients, and Json data is interacted between the upper computer and the internet of things device through the MQTT server, and the communication method for upgrading firmware of the single chip microcomputer includes the following steps:
step 1, if the new firmware is released, loading a mirror image file of the new firmware after the upper computer is started, and acquiring a version number of the new firmware;
step 2, the upper computer ensures that the firmware version field Ver is updated to the value of the version number of the new firmware through subscription to the firmware version field Ver;
step 3, subscribing the communication field Device and the communication field Host of the Internet of things equipment by the upper computer, and ensuring that the communication field name Host of the upper computer can be successfully updated by subscribing the communication field Host of the upper computer;
step 4, the Internet of things equipment enters a Bootloader program after being powered on and started, the latest firmware version number A is obtained through subscription of the firmware version field name Ver, the firmware version number A is compared with the current firmware version number B of the current Internet of things equipment, if the firmware version number A is larger than the current firmware version number B, the step 5 is entered, and if not, the step 8 is entered;
step 5, the Internet of things equipment applies for downloading the firmware, and the method comprises the following steps:
step 501, updating the value of the communication field Device of the internet of things Device to be a firmware version number A by the internet of things Device;
step 502, the upper computer acquires an updated Internet of things equipment communication field Device, checks the version number in the Internet of things equipment communication field Device and the version number corresponding to the firmware version field Ver, if the version number is consistent with the version number, updates the upper computer communication field Host as a firmware parameter, and otherwise, updates the upper computer communication field Host as a value representing abandoning operation;
step 503, the internet of things equipment acquires an upper computer communication field Host in a period T, if the acquisition fails, the step 505 is executed, and if the acquisition succeeds, the step 504 is executed;
step 504, if the Host computer communication field Host is a firmware parameter, erasing a corresponding ROM, updating the communication field Device of the internet of things equipment to a value representing the content of the (i + 1) th row of the request, and then entering step 6, initializing the value of i to 0, assigning the variable C to the value of i by the internet of things equipment, and if the Host computer communication field Host is a value representing the abandoning operation, entering step 8;
step 505, if the repeated acquisition times exceed the maximum repeated times K, step 8 is entered, otherwise, step 501 is returned;
and 6, carrying out firmware transmission, comprising the following steps:
601, the upper computer acquires a communication field Device of the Internet of things Device, updates the communication field Host of the upper computer after the value i is updated to i +1, and updates the value of the communication field Host of the upper computer to the value i and the content of the ith row of the image file of the new firmware;
step 602, the internet of things equipment acquires an upper computer communication field Host, firstly, whether the value i in the upper computer communication field Host is C +1 is judged, if not, the current data packet is discarded, and the upper computer is requested to retransmit the data packet; if the i value in the Host computer communication field Host is C +1, analyzing the content of the ith row of the image file of the new firmware contained in the Host computer communication field Host, writing the content into a ROM, assigning the variable C to be the updated i value, and entering the step 603;
step 603, judging whether the value of the variable C is smaller than the maximum line number of the image file of the new firmware, if so, updating the communication field Device of the Internet of things equipment to a value representing the content of the (i + 1) th line of the request, returning to the step 601, and if not, entering the step 7;
7, the Internet of things equipment carries out firmware integrity verification, if the integrity verification is successful, the result and the new firmware version number are written into a ROM, the Internet of things equipment communication field Device is updated once to be a value representing the successful updating of the firmware, and the step 8 is skipped; if the integrity check fails, updating the communication field Device of the Internet of things equipment once to be a value representing the failure of firmware update, and restarting the Internet of things equipment;
if the communication field Device of the internet of things equipment acquired by the upper computer is a value representing successful firmware updating or a value representing failed firmware updating, updating the communication field Host of the upper computer to be a null field;
and 8, jumping to enter an App program, and enabling the Internet of things equipment to work normally.
Preferably, in step 2 or step 3, the subscription and update of the firmware version field Ver or the Host computer communication field Host includes the following steps:
step 201: updating the firmware version field Ver or the Host computer communication field Host in a fixed data retransmission cycle T, acquiring the value of the updated firmware version field Ver or the value of the Host computer communication field Host, setting the value of the firmware version field Ver or the value of the Host computer communication field Host updated by the Host computer in the current data retransmission cycle T as V1, and entering the step 202;
step 202: the upper computer obtains the value of a firmware version field Ver or the value of an upper computer communication field Host within the current data retransmission period T as V2, and the step 203 is entered;
step 203: if V1 is equal to V2, the firmware version field Ver or the Host computer communication field is updated successfully, and the subscription to the firmware version field Ver or the Host computer communication field is ended, otherwise, the process returns to step 201.
Preferably, in step 4, the internet of things device operates a self-contained timed restart function.
Compared with the prior art, the invention has the following advantages:
1) the invention provides an over-the-air firmware upgrading method under the condition of low service quality (0 or 1) of MQTT, which overcomes the influence of missing packets and retransmission packets on firmware transmission in the communication process.
2) The invention has low resource occupation of MQTT service end, low requirement on service quality and low requirement on the quality of network communication between the two parties.
3) In the invention, the redundant calculation of data checking is undertaken by the upper computer, the requirements on the performance of the single chip microcomputer and the ROM are low, the firmware downloading process is dominated by the single chip microcomputer, and the coupling is low.
4) The method provided by the invention is based on the Json data exchange format, has good compatibility, is simple in upper computer software development and is easy to test.
5) The invention only requires the firmware file to be ASCII code, and can be applicable to the common image file formats such as HEX, S19 and the like.
Drawings
FIG. 1 is a process of upper computer data retransmission;
FIG. 2 is a power-on starting process of the Internet of things device;
fig. 3 is a process of the internet of things device applying for firmware download;
fig. 4 shows a firmware transfer process.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The single chip microcomputer firmware upgrading communication method based on the MQTT communication protocol mainly comprises an upper computer, an MQTT server and Internet of things equipment. The MQTT server is located at the cloud end, the upper computer and the Internet of things equipment are MQTT clients, and Json data are interacted through the MQTT server.
The invention specifically comprises the following steps:
step 1, if the new firmware is released, loading the image file of the new firmware after the upper computer is started, and acquiring the version number of the new firmware.
And 2, the upper computer ensures that the firmware version field Ver is updated to the value of the version number of the new firmware through subscription of the firmware version field Ver.
And 3, subscribing the communication field Device and the communication field Host of the Internet of things equipment by the upper computer, and ensuring that the communication field name Host of the upper computer can be successfully updated by subscribing the communication field Host of the upper computer.
As shown in fig. 1, in step 2 and step 3, the subscription and update of the firmware version field Ver or the upper computer communication field Host includes the following steps:
step 201: updating the firmware version field Ver or the Host computer communication field Host in a fixed data retransmission period T (in this embodiment, T is 30 seconds), acquiring a value of the updated firmware version field Ver or a value of the Host computer communication field Host, setting the value of the firmware version field Ver or the value of the Host computer communication field Host updated by the Host computer in the current data retransmission period T as V1, and entering step 202;
step 202: the upper computer obtains the value of the updated firmware version field Ver or the value of the upper computer communication field Host within the current data retransmission period T as V2, and the step 203 is entered;
step 203: if V1 is equal to V2, the firmware version field Ver or the Host computer communication field is updated successfully, and the subscription to the firmware version field Ver or the Host computer communication field is ended, otherwise, the process returns to step 201.
And 4, as shown in fig. 2, the internet of things equipment enters a Bootloader program after being powered on and started. The Internet of things equipment runs a self-contained timing restarting function, such as 0-point restarting every day. The Internet of things equipment acquires the latest firmware version number A through subscription of the firmware version field name Ver, the firmware version number A is compared with the current firmware version number B of the current Internet of things equipment, if the firmware version number A is larger than the current firmware version number B, the step 5 is carried out, and if not, the step 8 is carried out.
Step 5, the internet of things equipment applies for downloading the firmware, as shown in fig. 3, the method includes the following steps:
step 501, updating an internet of things Device communication field Device { "Firmware": A (latest Firmware version number) } by the internet of things Device;
step 502, the upper computer acquires an updated internet-of-things equipment communication field Device, checks a latest firmware version number A in the internet-of-things equipment communication field Device and a version number corresponding to a firmware version field Ver, if the latest firmware version number A is consistent with the version number corresponding to the firmware version field Ver, updates the upper computer communication field Host as a firmware parameter (an initial address, a length and a text line number), and otherwise, updates the upper computer communication field Host { "Command": Abort "}, which means to abandon the operation;
step 503, the internet of things equipment acquires an upper computer communication field Host in a period T, if the acquisition fails, the step 505 is executed, and if the acquisition succeeds, the step 504 is executed;
step 504, if the Host computer communication field Host is a firmware parameter, erasing a corresponding ROM, updating the communication field Device of the internet of things to be { "Line": i }, initializing the value of i to be 0, indicating that the content of the (i + 1) th Line is requested, entering step 6, and assigning the variable C to be the current value of i by the internet of things Device. And if the Host computer communication field Host is { "Command": Abort "}, then the step 8 is entered.
And 505, if the repeated acquisition times exceed the maximum repeated times K, entering step 8, otherwise, returning to step 501.
And 6, carrying out firmware transmission, as shown in fig. 4, including the following steps:
601, the upper computer obtains a communication field Device of the Internet of things Device, updates the value of i to i +1, and updates the communication field Host of the upper computer to be { "Line": i, "Content": Content in the ith row) };
step 602, the internet of things equipment acquires an upper computer communication field Host, firstly, whether the value i in the upper computer communication field Host is C +1 is judged, if not, the current data packet is discarded, and the upper computer is requested to retransmit the data packet; if the value i in the Host computer communication field Host is C +1, analyzing the Content of the Content in the Host computer communication field Host, writing the Content into a ROM, assigning the variable C to be the updated value i, and entering the step 603;
step 603, judging whether the value of the variable C is smaller than the maximum Line number of the image file of the new firmware, if so, after updating the communication field Device of the Internet of things to be { "Line": i } (the repeated updating period T is 30 seconds), returning to the step 601, and if not, entering the step 7.
Step 7, the Internet of things equipment carries out firmware integrity check, if the integrity check is successful, the result and the new firmware version number are written into a ROM, the Internet of things equipment communication field Device is updated once to be { ' CRC ': Success ' }, and the step 8 is skipped; if the integrity check fails, updating the communication field Device of the Internet of things equipment to be { "CRC": Fail "} once, and restarting the Internet of things equipment;
if the communication field Device of the Internet of things equipment acquired by the upper computer is { "CRC": XX … … "}, updating the communication field Host of the upper computer to be a null field;
and 8, jumping to enter an App program, and enabling the Internet of things equipment to work normally.
When power failure, crash, communication error and other abnormalities occur in the firmware downloading process of the Internet of things equipment, the firmware upgrading is restarted from the initial power-on process by means of an internal independent watchdog or direct restarting.

Claims (3)

1. The single-chip microcomputer firmware upgrading communication method based on the MQTT communication protocol comprises an upper computer, an MQTT server and Internet of things equipment, wherein the MQTT server is located at the cloud end, the upper computer and the Internet of things equipment are MQTT client sides, and Json data are interacted between the upper computer and the Internet of things equipment through the MQTT server, and the single-chip microcomputer firmware upgrading communication method is characterized by comprising the following steps:
step 1, if the new firmware is released, loading a mirror image file of the new firmware after the upper computer is started, and acquiring a version number of the new firmware;
step 2, the upper computer ensures that the firmware version field Ver is updated to the value of the version number of the new firmware through subscription to the firmware version field Ver;
step 3, subscribing the communication field Device and the communication field Host of the Internet of things equipment by the upper computer, and ensuring that the communication field name Host of the upper computer can be successfully updated by subscribing the communication field Host of the upper computer;
step 4, the Internet of things equipment enters a Bootloader program after being powered on and started, the latest firmware version number A is obtained through subscription of the firmware version field name Ver, the firmware version number A is compared with the current firmware version number B of the current Internet of things equipment, if the firmware version number A is larger than the current firmware version number B, the step 5 is entered, and if not, the step 8 is entered;
step 5, the Internet of things equipment applies for downloading the firmware, and the method comprises the following steps:
step 501, updating the value of the communication field Device of the internet of things Device to be a firmware version number A by the internet of things Device;
step 502, the upper computer acquires an updated Internet of things equipment communication field Device, checks the version number in the Internet of things equipment communication field Device and the version number corresponding to the firmware version field Ver, if the version number is consistent with the version number, updates the upper computer communication field Host as a firmware parameter, and otherwise, updates the upper computer communication field Host as a value representing abandoning operation;
step 503, the internet of things equipment acquires an upper computer communication field Host in a period T, if the acquisition fails, the step 505 is executed, and if the acquisition succeeds, the step 504 is executed;
step 504, if the Host computer communication field Host is a firmware parameter, erasing a corresponding ROM, updating the communication field Device of the internet of things equipment to a value representing the content of the (i + 1) th row of the request, and then entering step 6, initializing the value of i to 0, assigning the variable C to the value of i by the internet of things equipment, and if the Host computer communication field Host is a value representing the abandoning operation, entering step 8;
step 505, if the repeated acquisition times exceed the maximum repeated times K, step 8 is entered, otherwise, step 501 is returned;
and 6, carrying out firmware transmission, comprising the following steps:
601, the upper computer acquires a communication field Device of the Internet of things Device, updates the communication field Host of the upper computer after the value i is updated to i +1, and updates the value of the communication field Host of the upper computer to the value i and the content of the ith row of the image file of the new firmware;
step 602, the internet of things equipment acquires an upper computer communication field Host, firstly, whether the value i in the upper computer communication field Host is C +1 is judged, if not, the current data packet is discarded, and the upper computer is requested to retransmit the data packet; if the i value in the Host computer communication field Host is C +1, analyzing the content of the ith row of the image file of the new firmware contained in the Host computer communication field Host, writing the content into a ROM, assigning the variable C to be the updated i value, and entering the step 603;
step 603, judging whether the value of the variable C is smaller than the maximum line number of the image file of the new firmware, if so, updating the communication field Device of the Internet of things equipment to a value representing the content of the (i + 1) th line of the request, returning to the step 601, and if not, entering the step 7;
7, the Internet of things equipment carries out firmware integrity verification, if the integrity verification is successful, the result and the new firmware version number are written into a ROM, the Internet of things equipment communication field Device is updated once to be a value representing the successful updating of the firmware, and the step 8 is skipped; if the integrity check fails, updating the communication field Device of the Internet of things equipment once to be a value representing the failure of firmware update, and restarting the Internet of things equipment;
if the communication field Device of the internet of things equipment acquired by the upper computer is a value representing successful firmware updating or a value representing failed firmware updating, updating the communication field Host of the upper computer to be a null field;
and 8, jumping to enter an App program, and enabling the Internet of things equipment to work normally.
2. The single-chip microcomputer firmware upgrading communication method based on the MQTT communication protocol, as claimed in claim 1, wherein in step 2 or step 3, the subscription and update of the firmware version field Ver or the upper computer communication field Host includes the following steps:
step 201: updating the firmware version field Ver or the Host computer communication field Host in a fixed data retransmission cycle T, acquiring the value of the updated firmware version field Ver or the value of the Host computer communication field Host, setting the value of the firmware version field Ver or the value of the Host computer communication field Host updated by the Host computer in the current data retransmission cycle T as V1, and entering the step 202;
step 202: the upper computer obtains the value of a firmware version field Ver or the value of an upper computer communication field Host within the current data retransmission period T as V2, and the step 203 is entered;
step 203: if V1 is equal to V2, the firmware version field Ver or the Host computer communication field is updated successfully, and the subscription to the firmware version field Ver or the Host computer communication field is ended, otherwise, the process returns to step 201.
3. The method for upgrading communication of firmware of a single chip microcomputer based on MQTT communication protocol according to claim 1, wherein in step 4, the internet of things device operates with a self-contained timed restart function.
CN202011139933.0A 2020-10-22 2020-10-22 Singlechip firmware upgrading communication method based on MQTT communication protocol Active CN112291323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011139933.0A CN112291323B (en) 2020-10-22 2020-10-22 Singlechip firmware upgrading communication method based on MQTT communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011139933.0A CN112291323B (en) 2020-10-22 2020-10-22 Singlechip firmware upgrading communication method based on MQTT communication protocol

Publications (2)

Publication Number Publication Date
CN112291323A true CN112291323A (en) 2021-01-29
CN112291323B CN112291323B (en) 2023-05-05

Family

ID=74424147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011139933.0A Active CN112291323B (en) 2020-10-22 2020-10-22 Singlechip firmware upgrading communication method based on MQTT communication protocol

Country Status (1)

Country Link
CN (1) CN112291323B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279001A (en) * 2015-11-20 2016-01-27 杭州云柚科技有限公司 Software remote upgrading method for network terminal devices
US20180052677A1 (en) * 2016-08-22 2018-02-22 Intraway R&D S.A. System and Method for Providing Automatic Firmware Update Management
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
CN110244970A (en) * 2019-05-16 2019-09-17 芜湖智久机器人有限公司 A kind of single-chip microcontroller and its upgrade-system, upgrade method
CN110262820A (en) * 2019-06-13 2019-09-20 陕西瑞迅电子信息技术有限公司 Method, apparatus, system and storage medium based on MQTT protocol realization OTA upgrading
CN110855774A (en) * 2019-11-11 2020-02-28 卡乐电子(苏州)有限责任公司 Internet of things system capable of being automatically configured based on MQTT protocol
CN110908683A (en) * 2019-10-22 2020-03-24 深圳市广和通无线通信软件有限公司 Software system upgrading method and device of hardware module, storage medium and terminal
CN111565122A (en) * 2020-04-29 2020-08-21 四川虹美智能科技有限公司 Internet of things equipment firmware upgrading method, device and system
US20200280436A1 (en) * 2019-03-01 2020-09-03 John A. Nix Public key exchange with authenticated ecdhe and security against quantum computers

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279001A (en) * 2015-11-20 2016-01-27 杭州云柚科技有限公司 Software remote upgrading method for network terminal devices
US20180052677A1 (en) * 2016-08-22 2018-02-22 Intraway R&D S.A. System and Method for Providing Automatic Firmware Update Management
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
US20200280436A1 (en) * 2019-03-01 2020-09-03 John A. Nix Public key exchange with authenticated ecdhe and security against quantum computers
CN110244970A (en) * 2019-05-16 2019-09-17 芜湖智久机器人有限公司 A kind of single-chip microcontroller and its upgrade-system, upgrade method
CN110262820A (en) * 2019-06-13 2019-09-20 陕西瑞迅电子信息技术有限公司 Method, apparatus, system and storage medium based on MQTT protocol realization OTA upgrading
CN110908683A (en) * 2019-10-22 2020-03-24 深圳市广和通无线通信软件有限公司 Software system upgrading method and device of hardware module, storage medium and terminal
CN110855774A (en) * 2019-11-11 2020-02-28 卡乐电子(苏州)有限责任公司 Internet of things system capable of being automatically configured based on MQTT protocol
CN111565122A (en) * 2020-04-29 2020-08-21 四川虹美智能科技有限公司 Internet of things equipment firmware upgrading method, device and system

Also Published As

Publication number Publication date
CN112291323B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
US7388518B2 (en) Vehicle tracking system
AU742817B2 (en) Process and apparatus for downloading data from a server computer to a client computer
CN109768970B (en) Configurable universal protocol generation method
US20030121032A1 (en) Method and system for remotely updating function of household device
US6804773B1 (en) System and method for transferring information over a network
US20070025347A1 (en) Communication protocol
CN109964215B (en) Flow control in remote direct memory access data communications with ring buffer mirroring
CN113630372A (en) Cloud edge coordination system for edge computing
US20070028104A1 (en) Communication protocol and method for authenticating a system
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN113434175B (en) Data processing method, device, storage medium and equipment
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
CN116088901A (en) Firmware upgrading method and device, electronic equipment and computer storage medium
US8793651B2 (en) Remote card content management using synchronous server-side scripting
CN114844814A (en) Pressure testing method and device
CN108600378B (en) File downloading method, device, terminal and storage medium
Kramer Advanced message queuing protocol (AMQP)
CN112291323B (en) Singlechip firmware upgrading communication method based on MQTT communication protocol
CN115335803A (en) Equipment upgrading method, intelligent equipment and computer readable storage medium
CN114860480A (en) Web service proxy method, device and storage medium based on Serverless
CN113645175B (en) Data communication method, device, equipment and computer readable storage medium
Rajbharti The Microchip TCP/IP Stack
CN110971708B (en) Android and Ubuntu system information transmission method, system, device and medium
CN111552907A (en) Message processing method, device, equipment and storage medium
TWI791316B (en) Method and system for implementing inter-process communications

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