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
district
data
upgrading
upgrade
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

The present invention relates to the wireless firmware upgrade method of a kind of thing connection positioning system, the program storage of firmware (microprocessor) is divided into three districts by the method, i.e. Bootloader district, APP district and data temporary storage district.When program starts to upgrade, utilize flash to simulate eeprom function and first the program of renewal is write data temporary storage district, this region content power down is not also lost, and can preserve the data transmitted very well, the program of renewal is moved to APP district by supervisor end of transmission again, completes the radio upgrade of firmware.The present invention has effective and rapid, and can continue the advantages such as upgrading after power-off suspension.

Description

The wireless firmware upgrade method of thing connection positioning system
Technical field
The present invention is specifically related to the wireless firmware upgrade method of a kind of thing connection positioning system.
Background technology
Current most of microprocessor firmware upgrading is all that the fever writes adopting microprocessor to carry carries out firmware renewal, in this case, the renewal of firmware needs to have the instruments such as computer, fever writes, development environment and just can complete, bring much inconvenience to thus technician and client, delay project process.
Existing microprocessor program storage area is divided into Liang Ge district mostly: Bootloader district and APP district; Described APP district is the region at application program place, performs user program; And Bootloader district is program designation district, for loading application programs, carry out the renewal of application program.Present stage, conveniently firmware upgrade mode all adopted Bootloader district to guide, the existing application program of erasing, upgrade the mode of user program, but there is higher risk in this kind of upgrade method, once program upgrade failure, existing program is clashed, when situation is serious, whole equipment can be caused to paralyse, must factory be returned.And most of upgrade method all needs the cooperation of other equipment, as Serial Port Line etc., this also brings a little inconvenience to firmware upgrade.
Summary of the invention
The object of the invention is, provide a kind of effective and rapid, and the wireless firmware upgrade method of the thing connection positioning system of upgrading can be continued after power-off suspension, to overcome the deficiencies in the prior art.
In order to achieve the above object, technical scheme of the present invention is: a kind of wireless firmware upgrade method of thing connection positioning system, comprise the firmware had program stored therein, the program storage of described firmware is divided into Bootloader district, APP district and data temporary storage district, and Bootloader district is boot district, APP district is user program area or application area; It is characterized in that: the step of described wireless firmware upgrading is:
Step a, firmware power on after start, run Bootloader district;
The first character joint in step b, detection data temporary storage district, if first character joint is 1, then represents that firmware starts upgrading, execution step c; If first character joint is 2, then represents that upgrading last time of this firmware is interrupted, perform step f; If first character joint is 0, then represents that this firmware is without the need to upgrading, jump to APP district and perform user program;
Step c, second byte in the data temporary storage district of firmware started after region erasing, and waiting for server sends radio upgrade control signal, and radio upgrade control signal is divided into beginning upgrade signal and terminate upgrade signal, until firmware receives start upgrade signal;
Steps d, when firmware receive start upgrade signal time, wait-receiving mode server sends radio upgrade packet, the radio upgrade packet received is write data temporary storage district by described firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, the data temporary storage district data bit after being erased of described firmware is invalid data position, when the data bit after write data is valid data position, and perform step e;
If when there is power-off or suspension phenomenon and cause upgrading time-out in firmware in escalation process, the data temporary storage district of firmware can preserve the radio upgrade packet received, and the first character in data temporary storage district joint changes to 2, waits for and again upgrading, and performs step f;
Step e, receive all radio upgrade packets when firmware, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, and complete wireless firmware upgrading;
First invalid data position in step f, retrieve data working area, and show that firmware has received how many radio upgrade packets sent by server by the position of first invalid data position, also just learn that firmware also should continue to receive how many remaining data bag indexes, perform step g;
Step g, wait continue upgrading firmware waiting for server again send radio upgrade packet, until receive the packet of corresponding above-mentioned index, wait for some minutes in the process;
If wait for time period after do not receive valid wireless upgrading data packet yet, then obliterated data working area all the elements and reset, this firmware run upgrading Qian APP district store program;
If when firmware receives the valid wireless upgrading data packet sent by server, then the effective radio upgrade packet received is write data temporary storage district by firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, when firmware receives all valid wireless upgrading data packet, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, complete wireless firmware upgrading.
In technique scheme, firmware in escalation process, or upgrade complete before, still run in APP district the program stored.
In technique scheme, the program storage of described firmware is in units of sector, divide Bootloader district, APP district and data temporary storage district, and 1 ~ 3 sector of sector is Bootloader district, and 4 ~ 9 sectors are APP district, and 9 ~ 12 sectors are data temporary storage district.
The good effect that the present invention has is: after have employed above-mentioned wireless firmware upgrade method, the present invention has the following advantages: the first, simple to operate, and quickness and high efficiency; The second, without the need to any miscellaneous equipment, user-friendly; Three, because the program storage of firmware is divided into three districts, make firmware upgrade safer, also ensure that the integrality of upgrading data packet; Four, preserve the existing upgrading data packet of firmware after power-off suspension, then during upgrading next time, upgrading can be continued, the time of again again having upgraded after having saved power-off suspension.
Accompanying drawing explanation
Fig. 1 is the structural representation of the program storage of firmware of the present invention;
Fig. 2 is the process flow diagram of wireless firmware of the present invention upgrading.
Embodiment
Below in conjunction with accompanying drawing and the embodiment that provides, the present invention is further illustrated, but be not limited thereto.
As shown in Figure 1, 2, a kind of wireless firmware upgrade method of thing connection positioning system, comprise the firmware had program stored therein, the program storage of described firmware is divided into Bootloader district, APP district and data temporary storage district, and Bootloader district is boot district, APP district is user program area or application area; It is characterized in that: the step of described wireless firmware upgrading is:
Step a, firmware power on after start, run Bootloader district;
The first character joint in step b, detection data temporary storage district, if first character joint is 1, then represents that firmware starts upgrading, execution step c; If first character joint is 2, then represents that upgrading last time of this firmware is interrupted, perform step f; If first character joint is 0, then represents that this firmware is without the need to upgrading, jump to APP district and perform user program;
Step c, second byte in the data temporary storage district of firmware started after region erasing, and waiting for server sends radio upgrade control signal, and radio upgrade control signal is divided into beginning upgrade signal and terminate upgrade signal, until firmware receives start upgrade signal;
Steps d, when firmware receive start upgrade signal time, wait-receiving mode server sends radio upgrade packet, the radio upgrade packet received is write data temporary storage district by described firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, the data temporary storage district data bit after being erased of described firmware is invalid data position, when the data bit after write data is valid data position, and perform step e;
If when there is power-off or suspension phenomenon and cause upgrading time-out in firmware in escalation process, the data temporary storage district of firmware can preserve the radio upgrade packet received, and the first character in data temporary storage district joint changes to 2, waits for and again upgrading, and performs step f;
Step e, receive all radio upgrade packets when firmware, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, and complete wireless firmware upgrading;
First invalid data position in step f, retrieve data working area, and show that firmware has received how many radio upgrade packets sent by server by the position of first invalid data position, also just learn that firmware also should continue to receive how many remaining data bag indexes, perform step g;
Step g, wait continue upgrading firmware waiting for server again send radio upgrade packet, until receive the packet of corresponding above-mentioned index, wait for some minutes in the process;
If wait for time period after do not receive valid wireless upgrading data packet yet, then obliterated data working area all the elements and reset, this firmware run upgrading Qian APP district store program;
If when firmware receives the valid wireless upgrading data packet sent by server, then the effective radio upgrade packet received is write data temporary storage district by firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, when firmware receives all valid wireless upgrading data packet, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, complete wireless firmware upgrading.
Firmware of the present invention in escalation process, or upgrade complete before, still run in APP district the program stored.
The program storage of firmware of the present invention is in units of sector, divide Bootloader district, APP district and data temporary storage district, and 1 ~ 3 sector of sector is Bootloader district, 4 ~ 9 sectors are APP district, 9 ~ 12 sectors are data temporary storage district, can first reset when firmware receives the beginning upgrade signal that server sends, in preparation upgrading, and the program of firmware stores restarts to be perform from Bootloader district.
The wireless firmware upgrade method of thing connection positioning system of the present invention, based on thing connection positioning system existing device basis, coordinates without the need to any other equipment and has obvious feature.First, the program storage of firmware (microprocessor) is divided into three districts by the method, i.e. Bootloader district, App district and data temporary storage district.When program starts to upgrade, utilize flash to simulate eeprom function and first the program of renewal is write data temporary storage district, this region content power down is not also lost, the data transmitted can be preserved very well, the program of renewal is moved to APP district by supervisor end of transmission again, and the APP program before guaranteeing to upgrade unsuccessfully equally can be run; Secondly, the method uses wireless radio frequency mode transmission upgrading data packet, and the radio-frequency module of server has strict hardware check mechanism, guarantees the integrality of packet; Finally, the method supports that power-off suspension resumes function, guarantees program updates success.
The above is only the preferred embodiment of the present invention; be noted that for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (3)

1. the wireless firmware upgrade method of a thing connection positioning system, comprise the firmware had program stored therein, the program storage of described firmware is divided into Bootloader district, APP district and data temporary storage district, and Bootloader district is boot district, and APP district is application area; It is characterized in that: the step of described wireless firmware upgrading is:
Step a, firmware power on after start, run Bootloader district;
The first character joint in step b, detection data temporary storage district, if first character joint is 1, then represents that firmware starts upgrading, execution step c; If first character joint is 2, then represents that upgrading last time of this firmware is interrupted, perform step f; If first character joint is 0, then represents that this firmware is without the need to upgrading, jump to APP district and perform user program;
Step c, second byte in the data temporary storage district of firmware started after region erasing, and waiting for server sends radio upgrade control signal, and radio upgrade control signal is divided into beginning upgrade signal and terminate upgrade signal, until firmware receives start upgrade signal;
Steps d, when firmware receive start upgrade signal time, wait-receiving mode server sends radio upgrade packet, the radio upgrade packet received is write data temporary storage district by described firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, the data temporary storage district data bit after being erased of described firmware is invalid data position, when the data bit after write data is valid data position, and perform step e;
If when there is power-off or suspension phenomenon and cause upgrading time-out in firmware in escalation process, the data temporary storage district of firmware can preserve the radio upgrade packet received, and the first character in data temporary storage district joint changes to 2, waits for and again upgrading, and performs step f;
Step e, receive all radio upgrade packets when firmware, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, and complete wireless firmware upgrading;
First invalid data position in step f, retrieve data working area, and show that firmware has received how many radio upgrade packets sent by server by the position of first invalid data position, also just learn that firmware also should continue to receive how many remaining data bag indexes, perform step g;
Step g, wait continue upgrading firmware waiting for server again send radio upgrade packet, until receive the packet of corresponding above-mentioned index, wait for some minutes in the process;
If wait for time period after do not receive valid wireless upgrading data packet yet, then obliterated data working area all the elements and reset, this firmware run upgrading Qian APP district store program;
If when firmware receives the valid wireless upgrading data packet sent by server, then the effective radio upgrade packet received is write data temporary storage district by firmware continuously, and the address of write is first invalid data position that data temporary storage district retrieves from the beginning to the end, when firmware receives all valid wireless upgrading data packet, and after receiving the end upgrade signal sent by server, first by the data erase in the APP district of firmware, the all data Replicas second, data temporary storage district byte started again are to APP district, last obliterated data working area all the elements more also reset, complete wireless firmware upgrading.
2. the wireless firmware upgrade method of thing connection positioning system according to claim 1, is characterized in that: firmware, before upgrading is complete, still runs the program stored in APP district.
3. the wireless firmware upgrade method of thing connection positioning system according to claim 1, it is characterized in that: the program storage of described firmware is in units of sector, divide Bootloader district, APP district and data temporary storage district, and 1 ~ 3 sector of sector is Bootloader district, 4 ~ 9 sectors are APP district, and 9 ~ 12 sectors are data temporary storage district.
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 (14)

* 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
CN107820603A (en) * 2016-12-30 2018-03-20 深圳配天智能技术研究院有限公司 A kind of firmware update 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 leasing 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
WO2022094855A1 (en) * 2020-11-05 2022-05-12 深圳市大疆创新科技有限公司 Firmware upgrade method and electronic device
CN112910948B (en) * 2021-01-12 2023-05-09 拉扎斯网络科技(上海)有限公司 Protocol upgrading 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
AU2013407292B2 (en) Devices, updaters, methods for controlling a device, and methods for controlling an updater
TWI628542B (en) Methods for gc (garbage collection) por (power off recovery) of a flash memory device and apparatuses using the same
TWI502507B (en) Method of updating battery firmware, portable electronics device and rechargeable battery module
CN103106092A (en) System software updating method and device in terminal appliance
TWI489818B (en) Remote upgrade servers and load balancing methods thereof
KR101640207B1 (en) Bootloader and embedded system upgrade method
CN105278998A (en) Single-chip microcomputer hardware upgrading method
WO2013180842A1 (en) Method and host device for assessing execution of trim commands
TW201624273A (en) Firmware variable update method
KR102002826B1 (en) Storage device, flash memory and operating method for storage device
TW201409238A (en) Mode switch method of electronic device and associated electronic device
CN109189434A (en) A kind of online upgrading method of electric energy meter
US20120042307A1 (en) System and method for creating memory interface of computing device
CN203324968U (en) Device for updating system firmware or parameters and computer system thereof
CN105718281A (en) Touch screen firmware upgrading method and device
US20160092201A1 (en) Method and Device for Updating Program Data
CN106506649A (en) A kind of remote online upgrade method of vehicle-mounted control terminal and device
KR20210039171A (en) Apparatus and method for tranceiving operation information in data processing system including memory system
CN104077166A (en) EPCS and EPCQ storer online upgrading method based on IP core in FPGA
CN111897560A (en) NB-IoT module-based program upgrading system, method, device and storage medium
CN104461589A (en) Single-chip microcomputer updating method and system
WO2016197883A1 (en) Method and system for updating program of microcontroller online
CN110673862A (en) Wireless upgrading method, equipment and medium for embedded equipment firmware with dual-use multi-mode
CN101500330A (en) Tool for fast and safely updating operation system of smart phone

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