[go: up one dir, main page]

CN103246536B - The wireless firmware upgrade method of thing connection positioning system - Google Patents

The wireless firmware upgrade method of thing connection positioning system Download PDF

Info

Publication number
CN103246536B
CN103246536B CN201310154542.XA CN201310154542A CN103246536B CN 103246536 B CN103246536 B CN 103246536B CN 201310154542 A CN201310154542 A CN 201310154542A CN 103246536 B CN103246536 B CN 103246536B
Authority
CN
China
Prior art keywords
firmware
data
upgrade
area
temporary storage
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
CN201310154542.XA
Other languages
Chinese (zh)
Other versions
CN103246536A (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.)
Changzhou High-Tech Research Institute Of Nanjing University
Nanjing Heguang Intelligent Manufacturing Research Institute Co ltd
Nanjing University
Original Assignee
JIANGSU DONN TECHNOLOGY Co Ltd
Changzhou High-Tech Research Institute Of Nanjing University
Nanjing University
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 JIANGSU DONN TECHNOLOGY Co Ltd, Changzhou High-Tech Research Institute Of Nanjing University, Nanjing University filed Critical JIANGSU DONN TECHNOLOGY Co Ltd
Priority to CN201310154542.XA priority Critical patent/CN103246536B/en
Publication of CN103246536A publication Critical patent/CN103246536A/en
Application granted granted Critical
Publication of CN103246536B publication Critical patent/CN103246536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本发明涉及一种物联定位系统的固件无线升级方法,该方法将固件(微处理器)的程序存储器分为三个区,即Bootloader区、APP区以及数据暂存区。程序开始更新时,利用flash模拟eeprom功能将更新的程序首先写入数据暂存区,此区域内容掉电也不丢失,能够很好保存已传输的数据,等程序传输完毕再将更新的程序搬移至APP区,完成固件的无线升级。本发明具有快捷有效,且在断电断网后可继续升级等优点。

The invention relates to a firmware wireless upgrading method of an IoT positioning system. The method divides the program memory of the firmware (microprocessor) into three areas, namely a Bootloader area, an APP area and a data temporary storage area. When the program starts to be updated, the updated program is first written into the data temporary storage area by using the flash simulation eeprom function. The content in this area will not be lost when the power is turned off, and the transmitted data can be well preserved. After the program transfer is completed, the updated program will be moved Go to the APP area to complete the wireless upgrade of the firmware. The invention has the advantages of fast and effective, and can continue to be upgraded after the power is cut off and the network is cut off.

Description

物联定位系统的固件无线升级方法Firmware wireless upgrade method of IoT positioning system

技术领域 technical field

本发明具体涉及一种物联定位系统的固件无线升级方法。 The invention specifically relates to a firmware wireless upgrading method of an IoT positioning system.

背景技术 Background technique

目前大多数微处理器固件升级都是采用微处理器自带的烧写器进行固件更新,在这种情况下,固件的更新需要具有电脑、烧写器、开发环境等工具才能完成,由此给技术人员和客户带来了许多不便,延缓项目进度。 At present, most microprocessor firmware upgrades use the microprocessor’s own programmer to update the firmware. In this case, the firmware update needs to be completed with tools such as a computer, programmer, and development environment. It has brought a lot of inconvenience to technicians and customers, and delayed the progress of the project.

现有的微处理器程序存储区域大多分为两个区:Bootloader区和APP区;所述APP区即为应用程序所在的区域,执行用户程序;而Bootloader区即为程序引导区,用于加载应用程序,进行应用程序的更新。现阶段方便快捷的固件升级方式均采用Bootloader区引导,擦除已有应用程序,更新用户程序的方式,但此种升级方法存在较高的风险性,一旦程序升级失败,现有的程序已被擦出,情况严重时,会导致整个设备瘫痪,必须返厂。并且大多数升级方法均需要其他设备的配合,如串口线等,这对固件升级也带来了些许不便。 Most of the existing microprocessor program storage areas are divided into two areas: the Bootloader area and the APP area; the APP area is the area where the application program is located, and executes the user program; and the Bootloader area is the program guide area for loading application to update the application. At this stage, the most convenient and fast firmware upgrade method is to use the bootloader area to guide, erase the existing application program, and update the user program. However, this upgrade method has a high risk. Once the program upgrade fails, the existing program has been deleted. If it is wiped out, in serious cases, the entire device will be paralyzed and must be returned to the factory. And most of the upgrade methods require the cooperation of other devices, such as serial cables, etc., which also brings some inconvenience to the firmware upgrade.

发明内容 Contents of the invention

本发明的目的是,提供一种快捷有效,且在断电断网后可继续升级的物联定位系统的固件无线升级方法,以克服现有技术的不足。 The purpose of the present invention is to provide a quick and effective firmware wireless upgrade method for an IoT positioning system that can continue to be upgraded after the power is cut off and the network is cut off, so as to overcome the shortcomings of the prior art.

为了达到上述目的,本发明的技术方案是:一种物联定位系统的固件无线升级方法,包括存储有程序的固件,所述固件的程序存储器分为Bootloader区、APP区和数据暂存区,而Bootloader区是引导程序区,APP区是用户程序区或者是应用程序区;其特征在于:所述固件无线升级的步骤是: In order to achieve the above object, the technical solution of the present invention is: a firmware wireless upgrade method of an IoT positioning system, including firmware stored with a program, the program memory of the firmware is divided into a Bootloader area, an APP area and a temporary data storage area, And the Bootloader area is a guide program area, and the APP area is a user program area or an application program area; it is characterized in that: the steps of wireless upgrading of the firmware are:

步骤a、固件上电开机后,运行Bootloader区; Step a, after the firmware is powered on, run the Bootloader area;

步骤b、检测数据暂存区的第一个字节,若第一个字节为1,则表示固件开始升级,执行步骤c;若第一个字节为2,则表示该固件上次升级被打断,执行步骤f;若第一个字节为0,则表示该固件无需升级,跳转到APP区执行用户程序; Step b. Detect the first byte of the data temporary storage area. If the first byte is 1, it means that the firmware has started to be upgraded, and then perform step c; if the first byte is 2, it means that the firmware was upgraded last time. is interrupted, execute step f; if the first byte is 0, it means that the firmware does not need to be upgraded, and jumps to the APP area to execute the user program;

步骤c、将固件的数据暂存区的第二个字节开始之后的区域擦除,并等待服务器发出无线升级控制信号,而无线升级控制信号分为开始升级信号和结束升级信号,直到固件接收到开始升级信号为止; Step c, erase the area after the second byte of the temporary data storage area of the firmware, and wait for the server to send a wireless upgrade control signal, and the wireless upgrade control signal is divided into a start upgrade signal and an end upgrade signal, until the firmware receives until the upgrade signal is started;

步骤d、当固件接收到开始升级信号时,等待接收服务器发出无线升级数据包,所述固件将接收到的无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,所述固件的数据暂存区在擦除后的数据位为无效数据位,当写入数据后的数据位为有效数据位,并执行步骤e; Step d. When the firmware receives the upgrade signal, it waits for the receiving server to send the wireless upgrade data packet, and the firmware continuously writes the received wireless upgrade data packet into the data temporary storage area, and the written address is the data temporary storage area The first invalid data bit retrieved from the beginning to the end, the data bit in the data temporary storage area of the firmware after erasing is an invalid data bit, when the data bit after writing the data is a valid data bit, and step e is performed ;

若固件在升级过程中出现断电或断网现象而导致升级超时的情况下,固件的数据暂存区会保存已接收到的无线升级数据包,且数据暂存区的第一个字节更改为2,等待再次升级,执行步骤f; If there is a power failure or network disconnection during the firmware upgrade process and the upgrade times out, the firmware data temporary storage area will save the received wireless upgrade data packet, and the first byte of the data temporary storage area will be changed. If it is 2, wait for the upgrade again, and execute step f;

步骤e、当固件接收到所有无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级; Step e, when the firmware receives all the wireless upgrade data packets and the end upgrade signal sent by the server, first erase the data in the APP area of the firmware, and then erase the data in the data temporary storage area starting from the second byte Copy all the data to the APP area, and finally erase all the contents of the data temporary storage area and reset, completing the firmware wireless upgrade;

步骤f、检索数据暂存区的第一个无效数据位,并通过第一个无效数据位的位置得出固件已经接收到多少个由服务器发出的无线升级数据包,也就得知固件还应该继续接收多少个剩余数据包索引,执行步骤g; Step f, retrieve the first invalid data bit in the data temporary storage area, and obtain how many wireless upgrade data packets sent by the server the firmware has received through the position of the first invalid data bit, and know that the firmware should still Continue to receive how many remaining data packet indexes, execute step g;

步骤g、待继续升级的固件等待服务器再次发出无线升级数据包,直到接收到对应上述索引的数据包为止,在此过程中等待若干分钟; Step g, the firmware to be upgraded waits for the server to send a wireless upgrade data packet again until the data packet corresponding to the above index is received, and waits for several minutes in the process;

若在等待的时间段之后仍未收到有效的无线升级数据包,则擦除数据暂存区的所有内容并复位,该固件运行升级前的APP区存储的程序; If no effective wireless upgrade data package is received after the waiting time period, all contents of the data temporary storage area will be erased and reset, and the firmware runs the program stored in the APP area before the upgrade;

若固件接收到由服务器发出的有效的无线升级数据包时,则固件将接收到的有效无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,当固件接收到所有有效的无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级。 If the firmware receives valid wireless upgrade data packets sent by the server, the firmware will continuously write the received valid wireless upgrade data packets into the data temporary storage area, and the written address is retrieved from the beginning to the end of the data temporary storage area. The first invalid data bit, when the firmware receives all valid wireless upgrade data packets and the end upgrade signal sent by the server, it first erases the data in the APP area of the firmware, and then erases the data in the temporary storage area All data starting from the second byte is copied to the APP area, and finally all the contents of the data temporary storage area are erased and reset, and the firmware wireless upgrade is completed.

在上述技术方案中,固件在升级过程中,或者是升级完毕之前,仍然运行APP区内已存储的程序。 In the above technical solution, the firmware still runs the program stored in the APP area during the upgrade process or before the upgrade is completed.

在上述技术方案中,所述固件的程序存储器是以扇区为单位划分Bootloader区、APP区和数据暂存区,而扇区的1~3扇区为Bootloader区,4~9扇区为APP区,9~12扇区为数据暂存区。 In the above technical solution, the program memory of the firmware is divided into a Bootloader area, an APP area, and a data temporary storage area in units of sectors, and the 1-3 sectors of the sector are the Bootloader area, and the 4-9 sectors are the APP area. area, and sectors 9~12 are data temporary storage areas.

本发明所具有的积极效果是:由于采用了上述固件无线升级方法后,本发明具有以下优点:第一、操作简单,且快捷高效;第二、无需任何其它设备,方便用户操作;第三、由于固件的程序存储器划分为三个区,使得固件升级更加安全,也确保了升级数据包的完整性;第四、断电断网后保存固件已有的升级数据包,再下次升级时,可继续升级,节约了断电断网后再次重新升级的时间。 The positive effects of the present invention are: after adopting the above-mentioned firmware wireless upgrade method, the present invention has the following advantages: first, the operation is simple, fast and efficient; second, it does not need any other equipment, which is convenient for users to operate; third, Since the program memory of the firmware is divided into three areas, the firmware upgrade is safer and the integrity of the upgrade data package is ensured; fourth, after the power is off and the network is disconnected, the existing upgrade data package of the firmware is saved, and when the next upgrade is performed, It can continue to be upgraded, which saves the time of re-upgrading after power failure and network disconnection.

附图说明 Description of drawings

图1是本发明固件的程序存储器的结构示意图; Fig. 1 is the structural representation of the program memory of firmware of the present invention;

图2是本发明固件无线升级的流程图。 Fig. 2 is a flow chart of wireless firmware upgrade in the present invention.

具体实施方式 detailed description

以下结合附图以及给出的实施例,对本发明作进一步的说明,但并不局限于此。 The present invention will be further described below in conjunction with the accompanying drawings and given embodiments, but is not limited thereto.

如图1、2所示,一种物联定位系统的固件无线升级方法,包括存储有程序的固件,所述固件的程序存储器分为Bootloader区、APP区和数据暂存区,而Bootloader区是引导程序区,APP区是用户程序区或者是应用程序区;其特征在于:所述固件无线升级的步骤是: As shown in Figures 1 and 2, a firmware wireless upgrade method for an IoT positioning system includes firmware stored with a program. The program memory of the firmware is divided into a Bootloader area, an APP area, and a temporary data storage area, and the Bootloader area is The boot program area, the APP area is a user program area or an application program area; it is characterized in that: the steps of the firmware wireless upgrade are:

步骤a、固件上电开机后,运行Bootloader区; Step a, after the firmware is powered on, run the Bootloader area;

步骤b、检测数据暂存区的第一个字节,若第一个字节为1,则表示固件开始升级,执行步骤c;若第一个字节为2,则表示该固件上次升级被打断,执行步骤f;若第一个字节为0,则表示该固件无需升级,跳转到APP区执行用户程序; Step b. Detect the first byte of the data temporary storage area. If the first byte is 1, it means that the firmware has started to be upgraded, and then perform step c; if the first byte is 2, it means that the firmware was upgraded last time. is interrupted, execute step f; if the first byte is 0, it means that the firmware does not need to be upgraded, and jumps to the APP area to execute the user program;

步骤c、将固件的数据暂存区的第二个字节开始之后的区域擦除,并等待服务器发出无线升级控制信号,而无线升级控制信号分为开始升级信号和结束升级信号,直到固件接收到开始升级信号为止; Step c, erase the area after the second byte of the temporary data storage area of the firmware, and wait for the server to send a wireless upgrade control signal, and the wireless upgrade control signal is divided into a start upgrade signal and an end upgrade signal, until the firmware receives until the upgrade signal is started;

步骤d、当固件接收到开始升级信号时,等待接收服务器发出无线升级数据包,所述固件将接收到的无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,所述固件的数据暂存区在擦除后的数据位为无效数据位,当写入数据后的数据位为有效数据位,并执行步骤e; Step d. When the firmware receives the upgrade signal, it waits for the receiving server to send the wireless upgrade data packet, and the firmware continuously writes the received wireless upgrade data packet into the data temporary storage area, and the written address is the data temporary storage area The first invalid data bit retrieved from the beginning to the end, the data bit in the data temporary storage area of the firmware after erasing is an invalid data bit, when the data bit after writing the data is a valid data bit, and step e is performed ;

若固件在升级过程中出现断电或断网现象而导致升级超时的情况下,固件的数据暂存区会保存已接收到的无线升级数据包,且数据暂存区的第一个字节更改为2,等待再次升级,执行步骤f; If there is a power failure or network disconnection during the firmware upgrade process and the upgrade times out, the firmware data temporary storage area will save the received wireless upgrade data packet, and the first byte of the data temporary storage area will be changed. If it is 2, wait for the upgrade again, and execute step f;

步骤e、当固件接收到所有无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级; Step e, when the firmware receives all the wireless upgrade data packets and the end upgrade signal sent by the server, first erase the data in the APP area of the firmware, and then erase the data in the data temporary storage area starting from the second byte Copy all the data to the APP area, and finally erase all the contents of the data temporary storage area and reset, completing the firmware wireless upgrade;

步骤f、检索数据暂存区的第一个无效数据位,并通过第一个无效数据位的位置得出固件已经接收到多少个由服务器发出的无线升级数据包,也就得知固件还应该继续接收多少个剩余数据包索引,执行步骤g; Step f, retrieve the first invalid data bit in the data temporary storage area, and obtain how many wireless upgrade data packets sent by the server the firmware has received through the position of the first invalid data bit, and know that the firmware should still Continue to receive how many remaining data packet indexes, execute step g;

步骤g、待继续升级的固件等待服务器再次发出无线升级数据包,直到接收到对应上述索引的数据包为止,在此过程中等待若干分钟; Step g, the firmware to be upgraded waits for the server to send a wireless upgrade data packet again until the data packet corresponding to the above index is received, and waits for several minutes in the process;

若在等待的时间段之后仍未收到有效的无线升级数据包,则擦除数据暂存区的所有内容并复位,该固件运行升级前的APP区存储的程序; If no effective wireless upgrade data package is received after the waiting time period, all contents of the data temporary storage area will be erased and reset, and the firmware runs the program stored in the APP area before the upgrade;

若固件接收到由服务器发出的有效的无线升级数据包时,则固件将接收到的有效无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,当固件接收到所有有效的无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级。 If the firmware receives valid wireless upgrade data packets sent by the server, the firmware will continuously write the received valid wireless upgrade data packets into the data temporary storage area, and the written address is retrieved from the beginning to the end of the data temporary storage area. The first invalid data bit, when the firmware receives all valid wireless upgrade data packets and the end upgrade signal sent by the server, it first erases the data in the APP area of the firmware, and then erases the data in the temporary storage area All data starting from the second byte is copied to the APP area, and finally all the contents of the data temporary storage area are erased and reset, and the firmware wireless upgrade is completed.

本发明固件在升级过程中,或者是升级完毕之前,仍然运行APP区内已存储的程序。 During the upgrade process of the firmware of the present invention, or before the upgrade is completed, the program stored in the APP area is still run.

本发明所述固件的程序存储器是以扇区为单位划分Bootloader区、APP区和数据暂存区,而扇区的1~3扇区为Bootloader区,4~9扇区为APP区,9~12扇区为数据暂存区,当固件接收到服务器发出的开始升级信号时会先复位,在准备升级,而固件存储的程序重新开始是从Bootloader区开始执行。 The program memory of the firmware described in the present invention divides the Bootloader area, the APP area and the data temporary storage area with the sector as the unit, and the 1 ~ 3 sectors of the sector are the Bootloader area, the 4 ~ 9 sectors are the APP area, and the 9 ~ 9 sectors are the APP area. Sector 12 is the data temporary storage area. When the firmware receives the upgrade start signal from the server, it will be reset first, and it is preparing for the upgrade. The program stored in the firmware is restarted from the Bootloader area.

本发明物联定位系统的固件无线升级方法是基于物联定位系统已有设备基础上的,无需任何其他设备配合并具有明显的特点。首先,该方法将固件(微处理器)的程序存储器分为三个区,即Bootloader区、App区以及数据暂存区。程序开始更新时,利用flash模拟eeprom功能将更新的程序首先写入数据暂存区,此区域内容掉电也不丢失,能够很好保存已传输的数据,等程序传输完毕再将更新的程序搬移至APP区,确保升级失败后之前的APP程序一样可以运行;其次,该方法使用无线射频方式传输升级数据包,而服务器的射频模块具有严格的硬件校验机制,确保数据包的完整性;最后,该方法支持断电断网续传功能,确保程序更新成功。 The firmware wireless upgrade method of the IOT positioning system of the present invention is based on the existing equipment of the IOT positioning system, does not require any other equipment to cooperate, and has obvious characteristics. First, the method divides the program memory of the firmware (microprocessor) into three areas, namely, the Bootloader area, the App area, and the temporary data storage area. When the program starts to be updated, the updated program is first written into the data temporary storage area by using the flash simulation eeprom function. The content in this area will not be lost when the power is turned off, and the transferred data can be well preserved. After the program transfer is completed, the updated program will be moved Go to the APP area to ensure that the previous APP program can still run after the upgrade fails; secondly, this method uses wireless radio frequency to transmit the upgrade data package, and the server's radio frequency module has a strict hardware verification mechanism to ensure the integrity of the data package; finally , this method supports the function of resuming transmission when the power is off and the network is disconnected, so as to ensure that the program update is successful.

以上所述仅是本发明的优选实施方式,应当指出:对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications are also possible. It should be regarded as the protection scope of the present invention.

Claims (3)

1.一种物联定位系统的固件无线升级方法,包括存储有程序的固件,所述固件的程序存储器分为Bootloader区、APP区和数据暂存区,而Bootloader区是引导程序区,APP区是应用程序区;其特征在于:所述固件无线升级的步骤是: 1. A firmware wireless upgrade method of a positioning system of the Internet of Things, comprising storing the firmware of the program, the program memory of the firmware is divided into a Bootloader area, an APP area and a data temporary storage area, and the Bootloader area is a boot program area, and the APP area It is an application program area; it is characterized in that: the steps of wireless upgrading of the firmware are: 步骤a、固件上电开机后,运行Bootloader区; Step a, after the firmware is powered on, run the Bootloader area; 步骤b、检测数据暂存区的第一个字节,若第一个字节为1,则表示固件开始升级,执行步骤c;若第一个字节为2,则表示该固件上次升级被打断,执行步骤f;若第一个字节为0,则表示该固件无需升级,跳转到APP区执行用户程序; Step b. Check the first byte of the data temporary storage area. If the first byte is 1, it means that the firmware has started to be upgraded, and then perform step c; if the first byte is 2, it means that the firmware was upgraded last time. is interrupted, execute step f; if the first byte is 0, it means that the firmware does not need to be upgraded, and jumps to the APP area to execute the user program; 步骤c、将固件的数据暂存区的第二个字节开始之后的区域擦除,并等待服务器发出无线升级控制信号,而无线升级控制信号分为开始升级信号和结束升级信号,直到固件接收到开始升级信号为止; Step c, erase the area after the second byte of the temporary data storage area of the firmware, and wait for the server to send a wireless upgrade control signal, and the wireless upgrade control signal is divided into a start upgrade signal and an end upgrade signal, until the firmware receives until the upgrade signal is started; 步骤d、当固件接收到开始升级信号时,等待接收服务器发出无线升级数据包,所述固件将接收到的无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,所述固件的数据暂存区在擦除后的数据位为无效数据位,当写入数据后的数据位为有效数据位,并执行步骤e; Step d. When the firmware receives the upgrade signal, it waits for the receiving server to send the wireless upgrade data packet, and the firmware continuously writes the received wireless upgrade data packet into the data temporary storage area, and the written address is the data temporary storage area The first invalid data bit retrieved from the beginning to the end, the data bit in the data temporary storage area of the firmware after erasing is an invalid data bit, when the data bit after writing the data is a valid data bit, and step e is performed ; 若固件在升级过程中出现断电或断网现象而导致升级超时的情况下,固件的数据暂存区会保存已接收到的无线升级数据包,且数据暂存区的第一个字节更改为2,等待再次升级,执行步骤f; If there is a power failure or network disconnection during the firmware upgrade process and the upgrade times out, the firmware data temporary storage area will save the received wireless upgrade data packet, and the first byte of the data temporary storage area will be changed. If it is 2, wait for the upgrade again, and execute step f; 步骤e、当固件接收到所有无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级; Step e, when the firmware receives all the wireless upgrade data packets and the end upgrade signal sent by the server, first erase the data in the APP area of the firmware, and then erase the data in the data temporary storage area starting from the second byte Copy all the data to the APP area, and finally erase all the contents of the data temporary storage area and reset, completing the firmware wireless upgrade; 步骤f、检索数据暂存区的第一个无效数据位,并通过第一个无效数据位的位置得出固件已经接收到多少个由服务器发出的无线升级数据包,也就得知固件还应该继续接收多少个剩余数据包索引,执行步骤g; Step f, retrieve the first invalid data bit in the data temporary storage area, and obtain how many wireless upgrade data packets sent by the server the firmware has received through the position of the first invalid data bit, and know that the firmware should still Continue to receive how many remaining data packet indexes, execute step g; 步骤g、待继续升级的固件等待服务器再次发出无线升级数据包,直到接收到对应上述索引的数据包为止,在此过程中等待若干分钟; Step g, the firmware to be upgraded waits for the server to send a wireless upgrade data packet again until the data packet corresponding to the above index is received, and waits for several minutes in the process; 若在等待的时间段之后仍未收到有效的无线升级数据包,则擦除数据暂存区的所有内容并复位,该固件运行升级前的APP区存储的程序; If no effective wireless upgrade data package is received after the waiting time period, all contents of the data temporary storage area will be erased and reset, and the firmware runs the program stored in the APP area before the upgrade; 若固件接收到由服务器发出的有效的无线升级数据包时,则固件将接收到的有效无线升级数据包连续写入数据暂存区,而写入的地址为数据暂存区从头到尾检索到的第一个无效数据位,当固件接收到所有有效的无线升级数据包,并收到由服务器发出的结束升级信号后,先将固件的APP区内的数据擦除,再将数据暂存区第二个字节开始的所有数据复制到APP区,最后再擦除数据暂存区所有内容并复位,完成了固件无线升级。 If the firmware receives valid wireless upgrade data packets sent by the server, the firmware will continuously write the received valid wireless upgrade data packets into the data temporary storage area, and the written address is retrieved from the beginning to the end of the data temporary storage area. The first invalid data bit, when the firmware receives all valid wireless upgrade data packets and the end upgrade signal sent by the server, it first erases the data in the APP area of the firmware, and then erases the data in the temporary storage area All data starting from the second byte is copied to the APP area, and finally all the contents of the data temporary storage area are erased and reset, and the firmware wireless upgrade is completed. 2.根据权利要求1所述的物联定位系统的固件无线升级方法,其特征在于:固件在升级完毕之前,仍然运行APP区内已存储的程序。 2. The firmware wireless upgrade method of the IoT positioning system according to claim 1, wherein the firmware still runs the stored program in the APP area before the upgrade is completed. 3.根据权利要求1所述的物联定位系统的固件无线升级方法,其特征在于:所述固件的程序存储器是以扇区为单位划分Bootloader区、APP区和数据暂存区,而扇区的1~3扇区为Bootloader区,4~9扇区为APP区,9~12扇区为数据暂存区。 3. the firmware wireless upgrade method of IoT positioning system according to claim 1, is characterized in that: the program memory of described firmware divides Bootloader area, APP area and data temporary storage area with sector as unit, and sector Sectors 1~3 are Bootloader area, Sectors 4~9 are APP area, Sectors 9~12 are data temporary storage area.
CN201310154542.XA 2013-04-28 2013-04-28 The wireless firmware upgrade method of thing connection positioning system Active CN103246536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310154542.XA CN103246536B (en) 2013-04-28 2013-04-28 The wireless firmware upgrade method of thing connection positioning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310154542.XA CN103246536B (en) 2013-04-28 2013-04-28 The wireless firmware upgrade method of thing connection positioning system

Publications (2)

Publication Number Publication Date
CN103246536A CN103246536A (en) 2013-08-14
CN103246536B true CN103246536B (en) 2016-01-06

Family

ID=48926068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310154542.XA Active CN103246536B (en) 2013-04-28 2013-04-28 The wireless firmware upgrade method of thing connection positioning system

Country Status (1)

Country Link
CN (1) CN103246536B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2515364B (en) * 2013-12-20 2015-06-17 Nordic Semiconductor Asa Updatable integrated-circuit radio
CN103995712B (en) * 2014-04-16 2018-05-04 潍柴动力股份有限公司 A kind of bootloader devices automatically updated and update method
CN104407903B (en) * 2014-12-12 2017-12-19 四川华拓光通信股份有限公司 A kind of QSFP optical module remote upgrade methods based on Bootloader
CN106909352A (en) * 2015-12-22 2017-06-30 北京谊安医疗系统股份有限公司 A kind of firmware upgrade method of embedded device
CN105760165B (en) * 2016-02-22 2019-09-06 深圳威迈斯新能源股份有限公司 A kind of method that self backup load of MCU refreshes
CN105930752B (en) * 2016-04-15 2018-05-25 电子科技大学 Based on the passive wireless reprogramming method for calculating RFID system
WO2018120213A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Firmware updating method and controller
CN108762774A (en) * 2018-05-22 2018-11-06 深圳市先河系统技术有限公司 A kind of method of firmware burning and the equipment of firmware burning
CN111078122B (en) * 2018-10-18 2024-01-12 阿里巴巴集团控股有限公司 Data processing method, device and equipment
CN110888759A (en) * 2019-11-19 2020-03-17 深圳来电科技有限公司 Firmware upgrade protection method and mobile power supply rental equipment
CN111880817B (en) * 2020-07-27 2023-04-07 北京环境特性研究所 Remote programming method for photoelectric monitoring system
CN111913699B (en) * 2020-08-14 2023-04-28 电子科技大学中山学院 Electric tuning antenna controller software design method for realizing compatibility of AISG-V3 and AISG-V2 protocols
CN112148339A (en) * 2020-09-29 2020-12-29 苏州海鹏科技有限公司 Dual-core chip and program updating method thereof
WO2022094855A1 (en) * 2020-11-05 2022-05-12 深圳市大疆创新科技有限公司 Firmware upgrade method and electronic device
EP4006718B1 (en) 2020-11-30 2024-05-01 Carrier Corporation Failsafe update of bootloader firmware
CN112910948B (en) * 2021-01-12 2023-05-09 拉扎斯网络科技(上海)有限公司 Protocol upgrade method, device, electronic equipment, storage medium and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466047A (en) * 2002-06-28 2004-01-07 联想(北京)有限公司 Semiopen automatic upgrading method for embedded type operation system
CN101770384A (en) * 2010-01-18 2010-07-07 深圳市航盛电子股份有限公司 Car audio system and software upgrading method thereof
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102467401A (en) * 2010-11-08 2012-05-23 泰商泰达电子公司 Firmware update method and system for micro-controller unit in power supply unit
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating
CN102945173A (en) * 2012-10-31 2013-02-27 青岛海信宽带多媒体技术有限公司 User program on-line upgrading system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI363298B (en) * 2008-02-29 2012-05-01 Hon Hai Prec Ind Co Ltd Communication device and firmware update method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466047A (en) * 2002-06-28 2004-01-07 联想(北京)有限公司 Semiopen automatic upgrading method for embedded type operation system
CN101770384A (en) * 2010-01-18 2010-07-07 深圳市航盛电子股份有限公司 Car audio system and software upgrading method thereof
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102467401A (en) * 2010-11-08 2012-05-23 泰商泰达电子公司 Firmware update method and system for micro-controller unit in power supply unit
CN102945173A (en) * 2012-10-31 2013-02-27 青岛海信宽带多媒体技术有限公司 User program on-line upgrading system and method
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LXI仪器固件远程升级设计与实现;刘兆庆等;《测控技术》;20120731;第31卷(第7期);全文 *

Also Published As

Publication number Publication date
CN103246536A (en) 2013-08-14

Similar Documents

Publication Publication Date Title
CN103246536B (en) The wireless firmware upgrade method of thing connection positioning system
CN109460245B (en) Remote upgrading method for embedded system
JP5838527B2 (en) Method, apparatus and communication device for updating firmware
US20110004871A1 (en) Embedded electronic device and firmware updating method thereof
CN104407878B (en) C6000 digital signal processor online upgrading methods
US8136108B2 (en) Updating firmware with multiple processors
CN103365696B (en) BIOS image file acquisition methods and device
KR101640207B1 (en) Bootloader and embedded system upgrade method
CN102945174A (en) The Method of Upgrading the Program of Single-chip Microcomputer by Attaching the External Flash
CN102650947A (en) Continuous increment over-the-air upgrade method of Android handheld equipment
CN113900693B (en) Firmware upgrading method, device and system, electronic equipment and storage medium
AU2013407292A1 (en) Devices, updaters, methods for controlling a device, and methods for controlling an updater
CN103106092A (en) System software updating method and device in terminal appliance
CN102004657B (en) A kind of electronic equipment and upgrade method thereof
CN108762797A (en) A kind of SSD firmwares online updating method, system and SSD
CN108572830A (en) Upgrade method, the system of a kind of embedded system and its bootstrap
CN104978223B (en) The method for realizing Web mode updating apparatus firmwares
CN111897560A (en) Program upgrade system, method, device and storage medium based on NB-IoT module
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN104461589A (en) Single-chip microcomputer updating method and system
CN109992280A (en) An embedded software upgrade method, terminal device and storage device
CN110134423B (en) Firmware updating method and device and computer readable storage medium
CN110457058A (en) Control node online upgrade method, device, host computer, system and electronic equipment
US10732887B2 (en) Cable modem and operating method thereof
CN107479917A (en) A kind of batch refresh PSU FW method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201113

Address after: 213000 No. 801 middle Wu Road, Changzhou, Jiangsu

Patentee after: CHANGZHOU HIGH-TECH RESEARCH INSTITUTE OF NANJING University

Patentee after: Nanjing Heguang Intelligent Manufacturing Research Institute Co.,Ltd.

Patentee after: NANJING University

Address before: 213164, B building, block 3, science and Education Hall, science and Education City, Wujin District, Changzhou, Jiangsu

Patentee before: CHANGZHOU HIGH-TECH RESEARCH INSTITUTE OF NANJING University

Patentee before: JIANGSU DONN TECHNOLOGY Co.,Ltd.

Patentee before: NANJING University

TR01 Transfer of patent right