CN106843958A - Embedded firmware updating method - Google Patents

Embedded firmware updating method Download PDF

Info

Publication number
CN106843958A
CN106843958A CN201710032963.3A CN201710032963A CN106843958A CN 106843958 A CN106843958 A CN 106843958A CN 201710032963 A CN201710032963 A CN 201710032963A CN 106843958 A CN106843958 A CN 106843958A
Authority
CN
China
Prior art keywords
data
segment
terminal
receiving end
receiving
Prior art date
Application number
CN201710032963.3A
Other languages
Chinese (zh)
Inventor
施友岚
钱超
江承利
Original Assignee
成都黑盒子电子技术有限公司
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 成都黑盒子电子技术有限公司 filed Critical 成都黑盒子电子技术有限公司
Priority to CN201710032963.3A priority Critical patent/CN106843958A/en
Publication of CN106843958A publication Critical patent/CN106843958A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/10Network-specific arrangements or communication protocols supporting networked applications in which an application is distributed across nodes in the network
    • H04L67/104Network-specific arrangements or communication protocols supporting networked applications in which an application is distributed across nodes in the network for peer-to-peer [P2P] networking; Functionalities or architectural details of P2P networks
    • H04L67/1074Network-specific arrangements or communication protocols supporting networked applications in which an application is distributed across nodes in the network for peer-to-peer [P2P] networking; Functionalities or architectural details of P2P networks for supporting resource transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterized by resources being split in blocks or fragments

Abstract

The invention discloses an embedded firmware updating method. The method includes the steps of S32, a data end segments integral data and calculates the verification value of each data segment; S33, a receiving end transmits a data request to the data end, and the data end transmits the data segments and the verification values of the data segments to the receiving end after receiving the data request; S34, the receiving end verifies the data segments after receiving the data segments and the verification values of the data segments, requests the data segment again if the verification of the data segment is not passed, and requests the next data segment when the verification of the data segment is passed. The embedded firmware updating method has the advantages that firmware updating efficiency is increased by segmenting the data, the data end does not need to perform timeout retransmission, and the stability of the data end system is increased.

Description

一种嵌入式固件升级方法 An embedded firmware upgrade method

技术领域 FIELD

[0001] 本发明涉及固件升级方法,具体涉及一种嵌入式固件升级方法。 [0001] The present invention relates to a firmware update method, particularly relates to an embedded firmware upgrade method.

背景技术 Background technique

[0002] 随着技术的发展,各种各样的嵌入式设备层出不穷,功能越来越强大,软件越来越复杂。 [0002] With the development of technology, the endless variety of embedded devices, more powerful, more complex software. 在这种情况下,嵌入式固件就不可避免的存在问题,这就需要不断迭代固件,使产品越来越稳定,这就为嵌入式固件升级技术提供了广阔的应用前景。 In this case, the embedded firmware on the inevitable problems, which requires constant iteration firmware, make the product more stable, which offer a broad prospect for embedded firmware upgrade technology.

[0003] 目前的嵌入式固件升级方法多为利用存储介质直接对固件进行升级,或者利用手机、电脑通过网络下载固件升级数据后,再下发给设备进行固件升级。 [0003] The current embedded firmware upgrade for the use of storage media and more directly to the firmware upgrade, or using a mobile phone, a computer after downloading the firmware upgrade data from the network to the device and then the next firmware upgrade. 现有固件升级方法中对数据传输的稳定性、安全性和高效性缺乏研宄,使得固件升级时容易出现固件升级效率低下或在数据传输不稳定时数据端过多超时重发导致数据端系统崩溃。 Existing firmware upgrade study based on the lack of stability of data transmission, safety and efficiency, making it easy to upgrade the firmware when the firmware upgrade is low efficiency, or too much data terminal when the data retransmission timeout cause unstable transmission data end system collapse.

发明内容 SUMMARY

[0004] 本发明所要解决的技术问题是固件升级时容易出现固件升级效率低下或在数据传输不稳定时数据端过多超时重发导致数据端系统不稳定,目的在于提供一种嵌入式固件升级方法,解决上述问题。 [0004] The present invention solves the technical problem prone when the firmware upgrade firmware upgrade inefficient or too much data is unstable end data transmission side data retransmission timeout cause system instability, and aims to provide an embedded firmware upgrade method to solve the problem.

[0005] 本发明通过下述技术方案实现: [0005] The present invention is achieved by the following technical scheme:

[0006] 一种嵌入式固件升级方法,其特征在于,包括以下步骤:S32:整体数据进行网络协议封装之前,数据端先将整体数据分段并计算每个分段数据的校验值;S33:接收端发送数据请求到数据端,数据端收到该数据请求后向接收端发送分段数据和该分段数据的校验值;S34:接收端接收到分段数据和该分段数据的校验值后,将该分段数据进行校验,校验未通过则再次请求本分段数据,校验通过则请求下一个分段数据;数据端只在收到数据请求时才发送数据,而不检测网络状态,也不做超时重发。 [0006] An embedded firmware upgrade method comprising the steps of: S32: The aggregate data network protocol encapsulation, data terminal first and calculates overall data segment checksum value for each data segment; S33 : the receiving end sends a data request to the data terminal, the data checksum value of the transmission end receives the segment data and segment data to the receiving end after the data request; S34: receiving end receives the segment data and segment data after the checksum, the checksum data segment, the calibration is not requested by the data again in this subparagraph, a check by the requesting data segment; data terminal transmits data only when the data request is received, without detecting network status, nor do the timeout retransmission.

[0007] 现有固件升级方法中,如只在整个文件或者数据发送完毕后才进行校验,若最后校验未通过,则需要从头发送整个文件或数据,效率低下;而当数据传输不稳定时,数据端会进行大量的超时重发,容易导致数据端系统崩溃。 [0007] existing firmware upgrade, as carried out only after the entire file or check the data has been sent, if the last verification fails, then the entire file from scratch or transmitting data, inefficient; unstable when the data transmission when the data terminal will be a lot of retransmission timeout, easily lead to the collapse of the system data terminal. 本发明应用时,整体数据进行网络协议封装之前,数据端将整体数据分段并计算每个分段数据的校验值;接收端发送数据请求到数据端,数据端收到该数据请求后向接收端发送分段数据和该分段数据的校验值;接收端接收到分段数据和该分段数据的校验值后,将该分段数据进行校验,校验未通过则再次请求本分段数据,校验通过则请求下一个分段数据。 The receiver sends a data request to the data terminal, the data terminal receives a request to the data; when the present invention prior to application, the entire data network encapsulation protocol, the data terminal calculates the overall data segment and the data segment checksum value for each receiver sends check value data segment and the data segment; check value after the receiving end receives the segment data and segment data, the segment data for verification, the calibration is not requested again by the this segmented data, a parity data segment is requested by the. 本发明将整体数据分段,并对每一个分段数据都进行校验,如果一个分段数据出错,则只需重新传送该分段数据即可,提高了固件升级效率;数据端只需在收到数据请求时发送分段数据,不检测网络状态,不需要做超时重发,减少了数据端系统的工作量,提高了数据端系统的稳定性。 The present invention will be whole data segments, and each segment checksum data, error data if one segment, the segment is simply re-transmitting data to improve the efficiency of the firmware upgrade; simply a data terminal upon receipt of a data request transmitting data segments, the network state is not detected, the timeout retransmission do not need to reduce the workload data terminal system, improve the stability of the system data terminal.

[GOOS]进一步的,所述分段数据的分段长度为可修改值。 [The GOOS] Further, the length of the data segment of the segment values ​​can be modified.

[0009]现有固件升级方法中,数据端的传输速率是固定的,而接收端的内存需要与数据端的传输速率相匹配,这就极大的降低了固件升级设备的通用性。 [0009] In existing firmware upgrade method, the data transmission rate is a fixed end, and the receiver memory needed to match the end of the data transmission rate, which greatly reduces the versatility of the device firmware upgrade. 本发明应用时,分段数据的分段长度可以根据接收端的内存大小进行修改,从而改变数据端的传输速率,提高固件升级设备的通用性,兼容所有嵌入式固件。 When the present invention is applied, the length of segment segment data may be modified based on memory size of the receiving end, thereby changing the transmission rate of the data terminal, firmware upgrade increase the versatility of the device, is compatible with all embedded firmware.

[0010] 再进一步的,所述接收端统计数据出错率;所述数据出错率为未通过校验的分段数据数量与全部分段数据数量的比值。 [0010] Still further, the statistical data error rate of the receiving end; data error rate is the number of unsegmented data check with all segments by the ratio of the number of data.

[0011] 现有固件升级方法中,数据端的传输速率是固定的,当数据的传输受到较大干扰时,数据端无法降低传输速率来提高稳定,使得接收端接收到的数据大量出错重发,降低了数据传输效率。 [0011] In existing firmware upgrade method, the data transfer rate is fixed terminal, when the transmission data is subject to greater interference, data terminal transmission rate can not be reduced to improve stability, such that a large amount of data received by the receiver of a retransmission error, reducing data transmission efficiency. 本发明应用时,当数据的传输受到较大干扰时,接收端统计的数据出错率上升,这时通过降低分段长度来降低传输速率,以达到提高数据传输稳定性,并提高数据传输效率的目的。 Application of the present invention, when the transmission data is subject to greater interference, the receiving end statistical data error rate increased, then the transmission rate is reduced by reducing the length of the segment, in order to improve data transmission reliability, and improving data transmission efficiency purpose.

[0012] 进一步的,本发明还包括以下步骤:S31:数据端计算整体数据的校验值,并在该整体数据的全部分段数据发送完成后,将校验值发送给接收端;S35:接收端接收完全部分段数据后,对整体数据进行校验,校验未通过则执行S33重新接受全部分段数据。 [0012] Further, the present invention further comprises the following steps: S31: calculating a check value data terminal of the entire data, and after all segments of the data of the entire data transmission is completed, the check value sent to the receiving terminal; S35: after completely receiving end receives the data segment section, the overall data validation, the calibration is not performed by the re-acceptance of all the segment data S33.

[0013] 本发明应用时,整体数据的全部分段数据发送完成后,对该整体数据进行校验,提高了数据的准确性。 [0013] When the present invention is applied, after all segments of the data of the entire data transmission is completed, the overall data checksum to improve data accuracy.

[0014] 再进一步的,接收端的存储器在结构上包括第一区域和第二区域,当接收端运行在第一区域时,通过权利要求4所述所有步骤接收升级数据,并对第二区域升级,然后将接收端跳转到第二区域运行。 [0014] Still further, the receiving end includes a first memory region and a second region in the structure, when the receiving terminal operating in the first region, through all the steps of claim 4 receives upgrade data and upgrade the second region and then jumps to the receiving end a second operating region.

[0015] 现有技术中,进行嵌入式固件升级时,往往需要接收端脱机。 [0015] In the prior art, when an embedded firmware upgrade, often require the receiving offline. 本发明应用时,通过接收端在第一区域和第二区域之间的跳转,实现了接收端不脱机的完成固件升级。 When the present invention is applied, by the receiving end jump between the first region and the second region, the receiver does not achieve the offline firmware upgrade.

[0016] 再进一步的,所述接收端设置定时器;所述接收端发送数据请求并接收到数据后, 定时器归零,当定时器到达定时时间时,再执行后续步骤。 [0016] Still further, the receiving end is provided a timer; after the receiver sends a data request and data is received, the timer to zero, when the timer times the time, proceeding to the next step.

[0017] 本发明应用时,接收端的操作间隔由定时器控制,防止接收端向数据端过于频繁的发送数据请求,降低了数据端的负载。 [0017] The application of the present invention, the receiving end the control operation by the timer interval, the receiving end to prevent too frequent data terminal sends a data request, reduces the load on the data side.

[0018] 进一步的,如数据端打断数据传输过程,在数据端恢复数据传输后,接收端重新请求数据端打断数据传输过程时传输的分段数据。 [0018] Further, as the data terminal to interrupt data transfer process, after data terminal resume data transmission, the receiver re-request data terminal to interrupt data transmission when the data segment transmission.

[0019] 现有技术中,当数据端因繁忙、断电或故障等原因打断数据传输过程,在数据端恢复数据传输后,需要重新发送整段数据,降低了数据传输效率。 [0019] In the prior art, because when the data terminal is busy, power failure or other reasons to interrupt the data transmission process, resume data transmission in the data terminal, the whole data needs to be resent, it reduces the data transmission efficiency. 本发明应用时,接收端在数据端恢复数据传输后,重新请求数据端打断数据传输过程时传输的分段数据,实现了数据端打断数据传输过程时的断点续传。 When the present invention is applied, the data terminal at the receiving end to recover the data transfer, re-requesting the data terminal to interrupt data transmission segment data transfer process, HTTP realized when the data terminal to interrupt data transmission.

[0020]本发明与现有技术相比,具有如下的优点和有益效果: [0020] Compared with the prior art the present invention has the following advantages and beneficial effects:

[0021] 1、本发明一种嵌入式固件升级方法,通过对数据进行分段,提高了固件升级效率, 数据端不需要做超时重发,提高了数据端系统的稳定性; [0021] 1, the present invention is an embedded firmware update method, the data segment, the firmware upgrade to improve efficiency, the data do not need to end the timeout retransmission to improve the stability of the data end system;

[0022] 2、本发明一种嵌入式固件升级方法,分段长度可以根据接收端的内存大小进行修改,提高固件升级设备的通用性,兼容所有嵌入式固件; [0022] 2, the present invention is an embedded firmware upgrade method, the segment length can be carried out according to the memory size of the reception terminal modifications, increase the versatility of the device firmware upgrade, compatible with all embedded firmware;

[0023] 3、本发明一种嵌入式固件升级方法,通过降低分段长度来降低传输速率,提高了在较大干扰情况下数据传输稳定性,并提高数据传输效率; [0023] 3, the present invention is an embedded firmware upgrade method to reduce the transmission rate by reducing the segment size, to improve the stability of data transmission at larger interference, and improving data transmission efficiency;

[0024] 4、本发明一种嵌入式固件升级方法,通过整体数据的全部分段数据发送完成后, 对该整体数据进行校验,提高了数据的准确性; [0024] 4, the present invention is an embedded firmware upgrade method, after completion of transmission, the overall data checksum data by all segments of the overall data to improve the accuracy of the data;

[0025] 5、本发明一种嵌入式固件升级方法,通过接收端在第一区域和第二区域之间的跳转,实现了接收端不脱机的完成固件升级; [0025] 5, the present invention is an embedded firmware upgrade method, by a receiving end in a branch between the first and second regions, the receiver does not achieve the offline firmware upgrade;

[0026] 6、本发明一种嵌入式固件升级方法,通过接收端的操作间隔由定时器控制,防止接收端向数据端过于频繁的发送数据请求,降低了数据端的负载; [0026] 6, the present invention is an embedded firmware upgrade method, by the receiving end the control operation by the timer interval, the receiving end to prevent too frequent data terminal sends a data request, reduces the load data terminal;

[0027] 7、本发明一种嵌入式固件升级方法,接收端在数据端恢复数据传输后,重新请求数据端打断数据传输过程时传输的分段数据,实现了数据端打断数据传输过程时的断点续传。 [0027] 7. The present invention provides a method for the embedded firmware upgrade, at the receiving end the data terminal resume data transmission, a request to re-segment the data terminal to interrupt data transmission when the data transmission process, to achieve a data terminal to interrupt data transfer process HTTP when.

附图说明 BRIEF DESCRIPTION

[0028] 此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,并不构成对本发明实施例的限定。 [0028] The drawings described herein are provided for further understanding of embodiments of the present invention, part of the application is not intended to limit embodiments of the present invention. 在附图中: In the drawings:

[0029] 图1为本发明步骤示意图。 [0029] Step 1 a schematic view of the present invention FIG.

具体实施方式 Detailed ways

[0030] 为使本发明的目的、技术方案和优点更加清楚明白,下面结合实施例和附图,对本发明作进一步的详细说明,本发明的示意性实施方式及其说明仅用于解释本发明,并不作为对本发明的限定。 [0030] To make the objectives, technical solutions, and advantages of the present invention will become apparent from, the following Examples and accompanying drawings, the present invention will be further described in detail, and exemplary embodiments of the present invention is described only for explaining the present invention , not intended to limit the present invention.

[0031] 实施例1 [0031] Example 1

[0032] 如图1所示,一种嵌入式固件升级方法,其特征在于,包括以下步骤:S32:整体数据进行网络协议封装之前,数据端先将整体数据分段并计算每个分段数据的校验值;S33:接收端发送数据请求到数据端,数据端收到该数据请求后向接收端发送分段数据和该分段数据的校验值;S34:接收端接收到分段数据和该分段数据的校验值后,将该分段数据进行校验,校验未通过则再次请求本分段数据,校验通过则请求下一个分段数据;数据端只在收到数据请求时才发送数据,而不检测网络状态,也不做超时重发。 [0032] As shown, an embedded firmware upgrade method, wherein 1, comprising the steps of: S32: The aggregate data network protocol encapsulation, data terminal first calculates overall data segments and each data segment check value; S33: the receiving end sends a data request to the data terminal, the data transmitting end receives a check value data segment and the data segment after the data request to the receiving end; S34: segmented data received by the receiver and the check value of the data segment, the data segment checksum, the calibration is not requested by the data again in this subparagraph, a check by the requesting data segment; data terminal only receives the data sending only the requested data, without detecting the state of the network, nor do the timeout retransmission.

[0033] 本实施例实施时,校验优选为CRC校验,需要传输的文件大小为l〇〇kb,数据端将分段大小定为5kb,并将文件分为20段,同时计算每个分段的CRC校验值;接收端发送数据请求,数据端收到请求后将第一个分段及其CRC校验值发送给接收端;接收端收到第一个分段及其CRC校验值后,计算该分段的CRC校验值并对比接收到的CRC校验值,发现两者相同,然后向数据端请求下一个分段数据。 [0033] When the embodiments of the present embodiment, the CRC check is preferably, to be transmitted l〇〇kb file size, the size of the data segment as the end 5kb, and the document is divided into 20 segments, each also calculated the CRC check value segment; receiver sends a data request, and sends the first segment to the CRC checksum data receiving terminal after receiving the request; the receiver receives the first segment and the CRC posteriori value to calculate the segment CRC checksum and comparison of the received CRC checksum, both found to be identical, then the next segment data request to the data terminal.

[0034] 数据端收到请求后将第二个分段及其CRC校验值发送给接收端,接收端收到第二个分段及其CRC校验值后,计算该分段的CRC校验值并对比接收到的CRC校验值,发现两者不同,然后向数据端再次请求本分段数据,数据端收到请求后将第二个分段及其CRC校验值发送给接收端,如此循环,直至20个分段数据全部传输完毕。 After the [0034] data after receipt of the request terminal and the second segment CRC checksum sent to the receiver, the receiver receives the second segment and the CRC value, the CRC calculated for the segment check value and comparing the received CRC checksum, the two different found, then this segment data request again to the data terminal, and transmitting a second segment CRC checksum data after receiving the request to the receiving end , and so on, until all 20 segments the data transfer is completed.

[0035] 实施例2 [0035] Example 2

[0036]如图1所示,本实施例在实施例1的基础上,所述分段数据的分段长度为可修改值。 [0036] 1, in this embodiment, on the basis of the embodiment 1, the length of the data segment of the segment values ​​can be modified. [0037] 本实施例实施时,接收端内存为2kb,需要传送的文件大小为100kb,数据端将分段大小定为2kb,并将文件分为50段,并完成数据传输。 [0037] Example embodiments of the present time, the receiving end 2KB of memory, the size of the file to be transferred is 100KB, the size of the data segment as the end of 2KB, and the document is divided into 50 sections, and data transmission is completed.

[0038] 实施例3 [0038] Example 3

[0039]如图1所示,本实施例在实施例1的基础上,所述分段数据的分段长度为可修改值。 [0039] 1, in this embodiment, on the basis of the embodiment 1, the length of the data segment of the segment values ​​can be modified. [0040] 本实施例实施时,接收端内存为10kb,需要传送的文件大小为l〇〇kb,数据端将分坎入/」、疋7310kb,开将又仵分为1〇段,并完成数据传输,同样大小的文件,本实施例比起实施例2,由于文件段数变少,接收端请求的次数变少,提高了传输速度。 [0040] When the embodiments of the present embodiment, the receiving end 10KB of memory, required to be transmitted l〇〇kb file size, the data terminal will be divided into the ridge / "Cloth 7310kb, Wu and open into the section 1〇, and complete data transmission, the same size of the file, the present embodiment than Example 2, since the file number of stages is reduced, the number of requests the receiving end is reduced, improving the transmission speed.

[0041]实施例4 [0041] Example 4

[0042]本实施例在实施例3的基础上,所述接收端统计数据出错率;所述数据出错率为未通过校验的分段数据数量与全部分段数据数量的比值。 [0042] In the present embodiment, on the basis of the embodiment 3, statistical data error rate of the receiving end; data error rate is the number of segments of data is not verified and all segments by the ratio of the number of data.

[0043]本实施例实施时,接收端内存为10kb,需要传送的文件有两个,大小分别为10〇kb 和3〇Okb,数据端将分段大小定为10kb,并将100kb的文件分为10段并传送,传送中,遇到干扰,接收端统计数据出错率超过50%,于是数据端在传输3〇〇kb的文件时,缩小分段大小,将分段大小定为5kb,并将300kb的文件分为60段并传送。 [0043] When the embodiments of the present embodiment, the receiving end 10KB of memory, there are two file transfer needs, size and 3〇Okb 10〇kb respectively, the end of the data segment size as 10KB, and the sub-file 100kb 10 segments and transmits, transmission, encounter interference, the receiving end more than 50% error rate statistics, so that data transfer at the end of the file 3〇〇kb, reduce the segment size, the segment size as 5kb, and the 300kb file is divided into 60 sections and transmission.

[0044] 实施例5 [0044] Example 5

[0045]本实施例在实施例4的基础上,接收端内存为l〇kb,需要传送的文件为lOOOkb。 [0045] In the present embodiment, on the basis of the embodiment 4, the receiving end of l〇kb memory, file transfer needs to lOOOkb. [0046]本实施例实施时,数据端将分段大小定为l〇kb,并将1000kb的文件分为100段并传送,传送中,遇到干扰,接收端统计数据出错率超过30%,于是数据端将该文件还未传输的部分的分段重新定义为4kb,并对剩余部分重新分段传送。 [0046] Example embodiments of the present time, the end of the data segment size as l〇kb, 100 and 1000kb file is divided into sections and transmission, transmission, encounter interference, the receiving end more than 30% error rate statistics, segment end portion of the file so that data transfer has not been redefined as 4kb, and transmits the remaining portion of re-segmentation.

[0047] 实施例6 [0047] Example 6

[0048]如图1所示,本实施例在实施例1的基础上,还包括以下步骤:S31 :数据端计算整体数据的校验值,并在该整体数据的全部分段数据发送完成后,将校验值发送给接收端;S35: 接收端接收完全部分段数据后,对整体数据进行校验,校验未通过则执行S33重新接受全部分段数据。 After the end of the data check value calculated overall data, and the data transmission is complete in all segments of the overall data: [0048] As shown in FIG 1, in this embodiment, on the basis of the embodiment 1, further comprising the steps of: S31 the check value sent to the receiving terminal; S35: after the receiving end receives the data complete paragraph, the overall data validation, the calibration is not performed by the re-acceptance of all the segment data S33.

[0049] 本实施例实施时,校验优选为CRC校验,需要传输的文件大小为100kb,数据端计算整体数据的CRC值,并将分段大小定为5kb,并将文件分为20段,同时计算每个分段的CRC校验值;接收端发送数据请求,数据端收到请求后将第一个分段及其CRC校验值发送给接收端;接收端收到第一个分段及其CRC校验值后,计算该分段的CRC校验值并对比接收到的CRC 校验值,发现两者相同,然后向数据端请求下一个分段数据。 [0049] When the embodiments of the present embodiment, the CRC check is preferably necessary to transmit the file size is 100KB, the entire data of the data terminal calculates the CRC value, and the segment size set to 5kb, the file is divided into 20 segments while the calculated CRC checksum for each segment; receiver sends a data request, the data terminal receives a request sent by the receiver after a first segment and a CRC checksum; receiver receives a first partial and the CRC checksum segment, the segment CRC checksum calculation and comparison of the received CRC checksum, both found to be identical, then the next segment data request to the data terminal. 数据端收到请求后将第二个分段及其CRC校验值发送给接收端,接收端收到第二个分段及其CRC校验值后,计算该分段的CRC校验值并对比接收到的CRC校验值,发现两者不同,然后向数据端再次请求本分段数据, 数据端收到请求后将第二个分段及其CRC校验值发送给接收端,如此循环,直至20个分段数据全部传输完毕。 After the data request is received after the end of the second segment and the CRC value sent to the receiver, the receiver receives the second segment and the CRC checksum, CRC checksum is calculated and the segment Comparative CRC checksum received, two different found, then this segment data request again to the data terminal, after receiving the request, transmitting data segments and a second CRC checksum to the receiver, so the cycle until all the segments of data transmission 20 is completed. 分段数据全部传输完毕后,数据端将整体数据的CRC值发送给接收端,接收端计算整体文件的CRC值并与数据端传送的CRC值对比,发现两者相同,结束传输。 After all the segment data transmission is completed, the data terminal transmits the CRC value of the entire data to the receiving end, the receiving end of the CRC value comparison is calculated CRC value with the whole file and transfer the data terminal, both found to be identical, the transfer is complete.

[0050] 实施例7 [0050] Example 7

[0051] 本实施例在实施例6的基础上,接收端的存储器在结构上包括第一区域和第二区域,当接收端运行在第一区域时,通过实施例6所述所有步骤接收升级数据,并对第二区域升级,然后将接收端跳转到第二区域运行。 [0051] In the present embodiment, on the basis of Example 6, the receiving end includes a first memory region and a second region in the structure, when the receiving terminal operating in the first region, the step of receiving all the upgrade data described in Example 6 , and a second zone to upgrade, and then jump to the receiving end a second operating region.

[0052] 本实施例实施时,第一区域为启动装载区,第二区域为用户装载区,接收端运行在启动装载区时,接收数据并对用户装载区进行升级,升级完成后,接收端跳转到用户装载区运行。 [0052] When the embodiments of the present embodiment, the first region is a promoter region of the loading, the loading area of ​​the second region for the user, the receiving terminal starts running at the loading area, the reception data loading area and the user upgrade, the upgrade is complete, the receiving end Go to run user loading area.

[0053] 实施例8 [0053] Example 8

[0054]本实施例在实施例1的基础上,所述接收端设置定时器;所述接收端发送数据请求并接收到数据后,定时器归零,当定时器到达定时时间时,再执行后续步骤。 [0054] In the present embodiment, on the basis of the embodiment 1, the receiving end is provided a timer; after the receiver sends a data request and data is received, the timer to zero, when the timer reaches the timer time, then execute subsequent step.

[0055] 本实施例实施时,定时器的定时时间优选为Is,接收端发送数据请求并接收到数据后,定时器归零,当定时器的时间到达Is时,接收端校验该数据,如果校验通过就请求下一数据,如果校验未通过,则再次请求该数据。 After [0055] Example embodiment of the present embodiment when the timer time is preferably of the timing Is, the receiving end sends a data request and data is received, the timer to zero, when the timer time reaches Is, verifies the data receiving end, If the check on the next data request, if the check is not passed, the data is requested again.

[0056] 实施例9 [0056] Example 9

[0057]本实施例在实施例1的基础上,如数据端打断数据传输过程,在数据端恢复数据传输后,接收端重新请求数据端打断数据传输过程时传输的分段数据。 [0057] In the present embodiment, on the basis of the embodiment 1, such as the data terminal to interrupt data transfer process, after data terminal resume data transmission, the receiver re-request data terminal to interrupt data transmission when the data segment transmission.

[0058]本实施例实施时,在发送第四个分段数据时,数据端因繁忙中断了数据传输过程, 并在2〇秒后恢复数据传输,接收端重新请求第四个分段数据,并完成数据传输,实现了断点续传。 When [0058] Example embodiments of the present embodiment, when transmitting a fourth data segments, the data terminal is busy due to data transmission interrupt process, and resume data transmission after 2〇 seconds, the receiver re-request the fourth segment data, and data transfer is complete, implements HTTP.

[0059]以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而己,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 [0059] The foregoing specific embodiments, objectives, technical solutions, and advantages of the invention will be further described in detail, it should be understood that the above descriptions are merely specific embodiments of the present invention and have not used limit the scope of the present invention, all within the spirit and principle of the present invention, any changes made, equivalent substitutions and improvements should be included within the scope of the present invention.

Claims (7)

1. 一种嵌入式固件升级方法,其特征在于,包括以下步骤: S32:整体数据进行网络协议封装之前,数据端先将整体数据分段并计算每个分段数据的校验值; S33:接收端发送数据请求到数据端,数据端收到该数据请求后向接收端发送分段数据和该分段数据的校验值; S34:接收端接收到分段数据和该分段数据的校验值后,将该分段数据进行校验,校验未通过则再次请求本分段数据,校验通过则请求下一个分段数据; 数据端只在收到数据请求时才发送数据,而不检测网络状态,也不做超时重发。 An embedded firmware upgrade method comprising the steps of: S32: The aggregate data network protocol encapsulation, the entire first data terminal and the data segment checksum value is calculated for each data segment; S33: receiver sends a data request to the data terminal, the data checksum value of the transmission end receives the segment data and segment data after the data request to the receiving end; S34: receiving end receives the correction data segment and the data segment posterior value, the check data segment, the calibration is not requested by the data again in this subparagraph, a check by the requesting segment data; a data transmitting terminal only when requested data in the received data, and It does not detect network status, nor do the timeout retransmission.
2. 根据权利要求1所述的一种嵌入式固件升级方法,其特征在于,所述分段数据的分段长度为可修改值。 2. An embedded firmware update method according to claim 1, characterized in that the length of the data segment of the segment values ​​can be modified.
3. 根据权利要求2所述的一种嵌入式固件升级方法,其特征在于,所述接收端统计数据出错率;所述数据出错率为未通过校验的分段数据数量与全部分段数据数量的比值。 An embedded firmware upgrade method according to claim 2, wherein the receiving end of statistical data error rate; data error rate is the number of unsegmented data checking data segment to all the ratio of the number.
4. 根据权利要求1所述的一种嵌入式固件升级方法,其特征在于,还包括以下步骤: S31:数据端计算整体数据的校验值,并在该整体数据的全部分段数据发送完成后,将校验值发送给接收端; S35:接收端接收完全部分段数据后,对整体数据进行校验,校验未通过则执行S33重新接受全部分段数据。 4. An embedded firmware update method according to claim 1, characterized by further comprising the steps of: S31: data terminal calculates overall data check value, and the data transmission is complete in all segments of the overall data after the check value sent to the receiving terminal; S35: after the receiving end receives the data complete paragraph, the overall data validation, the calibration is not performed by the re-acceptance of all the segment data S33.
5.根据权利要求4所述的一种嵌入式固件升级方法,其特征在于,接收端的存储器在结构上包括第一区域和第二区域,当接收端运行在第一区域时,通过权利要求4所述所有步骤接收升级数据,并对第二区域升级,然后将接收端跳转到第二区域运行。 5. An embedded firmware upgrade method according to claim 4, wherein the receiving side comprises a first region and a second memory region in the structure, when the receiving terminal operating in the first zone, as claimed in claim 4 by said step of receiving all the data upgrade, the upgrade and the second region, and then jumps to the receiving end a second operating region.
6.根据权利要求1至5任一权利要求所述的一种嵌入式固件升级方法,其特征在于,所述接收端设置定时器;所述接收端发送数据请求并接收到数据后,定时器归零,当定时器到达定时时间时,再执行后续步骤。 6. An embedded firmware upgrade method according to any one of claims 5 claim, wherein the receiving end is provided a timer; the receiving terminal sends a data request and data is received, the timer zero, when the timer times the time, proceeding to the next step.
7.根据权利要求1所述的一种嵌入式固件升级方法,其特征在于,如数据端打断数据传输过程,在数据端恢复数据传输后,接收端重新请求数据端打断数据传输过程时传输的分段数据。 7. An embedded firmware update method according to claim 1, characterized in that, as the data terminal to interrupt data transfer process, after data terminal resume data transmission, the receiver re-request data terminal to interrupt data transmission when segment of data transmission.
CN201710032963.3A 2017-01-18 2017-01-18 Embedded firmware updating method CN106843958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710032963.3A CN106843958A (en) 2017-01-18 2017-01-18 Embedded firmware updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710032963.3A CN106843958A (en) 2017-01-18 2017-01-18 Embedded firmware updating method

Publications (1)

Publication Number Publication Date
CN106843958A true CN106843958A (en) 2017-06-13

Family

ID=59123660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710032963.3A CN106843958A (en) 2017-01-18 2017-01-18 Embedded firmware updating method

Country Status (1)

Country Link
CN (1) CN106843958A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019080840A1 (en) * 2017-10-24 2019-05-02 西安中兴新软件有限责任公司 Method and device for repairing firmware
WO2019085365A1 (en) * 2017-10-30 2019-05-09 厦门亿联网络技术股份有限公司 Increment upgrade method based on eigenvalue table look-up method

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1458764A (en) * 2003-05-30 2003-11-26 西安通视数据有限责任公司 Forward error correcting method in one-way broadcast file transmission
CN1567199A (en) * 2003-06-16 2005-01-19 纬创资通股份有限公司 Staggered form firmware upgrading method
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN102281121A (en) * 2010-06-13 2011-12-14 中兴通讯股份有限公司 A data file transfer and verification method, apparatus and system for
US8127100B1 (en) * 2007-04-16 2012-02-28 Marvell International Ltd Unlimited sub-segment support in a buffer manager
CN103248424A (en) * 2012-02-14 2013-08-14 深圳市卓翼科技股份有限公司 Optical module firmware upgrading method and system
CN103853565A (en) * 2012-11-28 2014-06-11 京信通信系统(中国)有限公司 Method and device for firmware upgrading based on ARM
CN104484200A (en) * 2014-12-09 2015-04-01 小米科技有限责任公司 Method and device for updating firmware
CN104579556A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Inter-multiple-node data integral transmission system
CN105335166A (en) * 2015-12-04 2016-02-17 上海斐讯数据通信技术有限公司 System of embedded device and remote upgrading method of embedded device
US20160113514A1 (en) * 2014-10-25 2016-04-28 ARC Devices, Ltd Hand-Held Medical-Data Capture-Device Having a Digital Infrared Sensor with No A/D Converter and Having Interoperation with Electronic Medical Record Systems on a Specific Segment of a Network
CN106020905A (en) * 2016-05-31 2016-10-12 上海庆科信息技术有限公司 Microcontroller firmware developing and updating method and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1458764A (en) * 2003-05-30 2003-11-26 西安通视数据有限责任公司 Forward error correcting method in one-way broadcast file transmission
CN1567199A (en) * 2003-06-16 2005-01-19 纬创资通股份有限公司 Staggered form firmware upgrading method
US8127100B1 (en) * 2007-04-16 2012-02-28 Marvell International Ltd Unlimited sub-segment support in a buffer manager
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN102281121A (en) * 2010-06-13 2011-12-14 中兴通讯股份有限公司 A data file transfer and verification method, apparatus and system for
CN103248424A (en) * 2012-02-14 2013-08-14 深圳市卓翼科技股份有限公司 Optical module firmware upgrading method and system
CN103853565A (en) * 2012-11-28 2014-06-11 京信通信系统(中国)有限公司 Method and device for firmware upgrading based on ARM
US20160113514A1 (en) * 2014-10-25 2016-04-28 ARC Devices, Ltd Hand-Held Medical-Data Capture-Device Having a Digital Infrared Sensor with No A/D Converter and Having Interoperation with Electronic Medical Record Systems on a Specific Segment of a Network
CN104579556A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Inter-multiple-node data integral transmission system
CN104484200A (en) * 2014-12-09 2015-04-01 小米科技有限责任公司 Method and device for updating firmware
CN105335166A (en) * 2015-12-04 2016-02-17 上海斐讯数据通信技术有限公司 System of embedded device and remote upgrading method of embedded device
CN106020905A (en) * 2016-05-31 2016-10-12 上海庆科信息技术有限公司 Microcontroller firmware developing and updating method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019080840A1 (en) * 2017-10-24 2019-05-02 西安中兴新软件有限责任公司 Method and device for repairing firmware
WO2019085365A1 (en) * 2017-10-30 2019-05-09 厦门亿联网络技术股份有限公司 Increment upgrade method based on eigenvalue table look-up method

Similar Documents

Publication Publication Date Title
JP4268969B2 (en) Media message upload control method via the wireless communication network
JP4248550B2 (en) tcp congestion control system and method using multi-tcp acknowledgment
CN101309128B (en) Method and related apparatus for handling re-establishment of radio link control entitiy in a wireless communications system
JPH10198571A (en) Method for grading up software with remote operation on network
CN1300719C (en) Comptuer software updating method
CN101179393A (en) Method and system for implementing document breakpoint transmission
CN101616077B (en) Fast transmission method of internet larger file
CN102314369B (en) Self-upgrade method for equipment in remote online monitoring system
EP1938115B1 (en) Method for recovery of a controlled failover of a border gateway protocol speaker
CN103051723B (en) An incremental upgrade method and a server terminal
CN102158544A (en) Method and device for remote upgrading of vehicle-mounted electronic device
EP2528274A1 (en) Method and system for upgrading network device
CN102137139A (en) Method and device for selecting cache replacement strategy, proxy server and system
WO2009107000A2 (en) Method, system and apparatus for remote software upgrade of an embedded device
US20050187959A1 (en) Method for transferring a message file between a client and a server
CN103843418B (en) Species service agent method, a modem and a terminal
CN103019788A (en) Remote online upgrading method based on CAN (Controller Area Network) bus
CN101860545A (en) System and method for implementing automatic configuration of equipment
CN102291808B (en) Network communication method, communication equipment and middleware of communication equipment
CN104915237A (en) Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN101171799B (en) Method and apparatus for keeping information in routing tables consistent throughout a wireless network
CN101241364B (en) Local controller, remote management controller and method for automatically updating the local controller of an air conditioner system
CN102271327A (en) An indication of the method and device software version updates
CN102238093B (en) Service interruption prevention method and device
US9173071B2 (en) Rate adaptive transmission of wireless broadcast packets

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information