CN103425508A - Zigbee firmware compressing and updating method - Google Patents

Zigbee firmware compressing and updating method Download PDF

Info

Publication number
CN103425508A
CN103425508A CN2013102027818A CN201310202781A CN103425508A CN 103425508 A CN103425508 A CN 103425508A CN 2013102027818 A CN2013102027818 A CN 2013102027818A CN 201310202781 A CN201310202781 A CN 201310202781A CN 103425508 A CN103425508 A CN 103425508A
Authority
CN
China
Prior art keywords
firmware
zigbee
boot
upgraded
compression
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.)
Pending
Application number
CN2013102027818A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2013102027818A priority Critical patent/CN103425508A/en
Publication of CN103425508A publication Critical patent/CN103425508A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a zigbee firmware compressing and updating method. The zigbee firmware compressing and updating method comprises the steps of 1) compressing zigbee firmware to be updated for being downloaded; 2) downloading the compressed zigbee firmware to a single-chip microcomputer memory of a zigbee system through a user program; 3) decompressing the zigbee firmware in step 2) through a bootstrap program, covering the user program and updating the system firmware. According to the zigbee firmware compressing and updating method, a compression algorithm is utilized to find out certain rules from a file content, redundancy elimination in the content can be achieved, and memory space can be saved; the firmware is compressed into a remaining memory region, the remaining memory in a chip can be fully taken advantages of, and extra external memories can be saved.

Description

A kind of method that zigbee firmware compression is upgraded
Technical field
The present invention relates to the zigbee firmware upgrade method, more particularly, relate to a kind of method that zigbee firmware compression is upgraded.
Background technology
The mode that existing zigbee single-chip microcomputer upgrades is: two zones of guidance code and user program are arranged in firmware, and user program is from aerial reception firmware and write external memory storage, treats that firmware restarts after downloading fully.Guidance code is responsible for the user program with the programming overlay single-chip microcomputer inside of external memory storage.
The shortcoming of existing update mode is as follows:
Existing single-chip microcomputer memory headroom is more in short supply, and remaining space can't hold active user's program and upgrade code simultaneously.Serve as auxiliary resources if increase external memory storage.Once, but program completes renewal, the system external memory storage has not just been used, utilization factor is high and uneconomical.
And, because the singularity of zigbee system, the zigbee protocol stack takies the most program space, so can not adopt the routine upgrading way of other equipment to be fixed upgrading to the zigbee system.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of taking up room of firmware that reduce is provided, can directly in Installed System Memory, carry out down loading updating, overcome storage space limitations, break away from the method for the zigbee firmware compression renewal of external memory storage.
Technical scheme of the present invention is as follows:
A kind of method that zigbee firmware compression is upgraded, step is as follows:
1) compress zigbee firmware to be updated, to be downloaded;
2) user program is downloaded the zigbee firmware to be updated of compression to the single-chip microcomputer internal memory of zigbee system;
3) zigbee firmware boot decompress(ion) step 2), and cover user program, upgrade system firmware.
As preferably, in step 1), adopt the LZO algorithm to compress processing to zigbee firmware to be updated.
As preferably, in step 3), the zigbee firmware to be updated of boot inspection decompress(ion) compression, step is as follows:
3.1) boot judges that whether compressed file exists, and if so, carry out step 3.2), if not, repeat boot, perform step 3.1);
3.2) boot checks that whether inspection of document code correct, if so, carry out step 3.3), if not, delete compressed file, return and repeat boot, perform step 3.1);
3.3) the boot decompressing compressed file, and cover user program, upgrade system firmware.
As preferably, step 2) underlying protocol transmitted the zigbee protocol stack as file in.
As preferably, in user program, the code of download file is defined as by the zigbee protocol stack underlying protocol that file transmits.
As preferably, step 2) be specially:
2.1) Network Capture zigbee firmware;
2.2) obtain file size, check code;
2.3) receive in data write memory;
2.4) judge whether to receive complete, if so, carry out step 2.5), if not, return to step 2.3) repeat;
2.5) check that whether inspection of document code is correct, if so, carry out step 2.6), if not, delete compressed file, return to step 2.1);
2.6) write zone bit;
2.7) restart system, enter boot.
As preferably, comprise boot and user program in firmware.
Beneficial effect of the present invention is as follows:
Method of the present invention is utilized compression algorithm, finds certain rule from a file content, realizes removing the redundancy in content, reach the purpose of saving storage space, firmware is compressed to the internal memory remaining area, takes full advantage of the free memory in sheet, avoid adopting extra external memory storage.
Owing to having compressed the size that firmware takes up room, overcome prior art and can not adopt update method more commonly used on other equipment on the method for upgrading the zigbee firmware, realization is on the method for upgrading the zigbee firmware, can carry out equally with other equipment on the similar step of update method more commonly used, simplified the method for upgrading the zigbee firmware, improved and upgrade efficiency.
The accompanying drawing explanation
Fig. 1 is the flowchart of boot;
Fig. 2 is the flowchart of user program.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
A kind of method that zigbee firmware compression is upgraded, step is as follows:
1) compress zigbee firmware to be updated (comprising boot and user program in firmware), to be downloaded;
2) user program is downloaded the zigbee firmware to be updated of compression to the single-chip microcomputer internal memory of zigbee system;
3) zigbee firmware boot decompress(ion) step 2), and cover user program, upgrade system firmware.
In step 1), adopt the LZO algorithm to compress processing to zigbee firmware to be updated, this algorithm decompress(ion) is simple, and speed is very fast, and decompress(ion) do not need internal memory, is applicable to the environment for use that internal memory is in short supply.The LZO algorithm is lossless compression, with reference to realizing that program is thread-safe, in the situation that solved decompress(ion) speed and decompress(ion) demand, has guaranteed the security of data.
Step 2) underlying protocol transmitted the zigbee protocol stack as file in.
In user program, the code of download file is defined as by the zigbee protocol stack underlying protocol that file transmits.
As shown in Figure 2, step 2) be specially:
2.1) Network Capture zigbee firmware;
2.2) obtain file size, check code;
2.3) receive in data write memory;
2.4) judge whether to receive complete, if so, carry out step 2.5), if not, return to step 2.3) repeat;
2.5) check that whether inspection of document code is correct, if so, carry out step 2.6), if not, delete compressed file, return to step 2.1);
2.6) write zone bit;
2.7) restart system, enter boot.
As shown in Figure 1, step 2) after user program has been downloaded data, restart system, system performs step 3 after restarting and powering on) in, the zigbee firmware to be updated of boot inspection decompress(ion) compression, step is as follows:
3.1) boot judges that whether compressed file exists, and if so, carry out step 3.2), if not, repeat boot, perform step 3.1);
3.2) boot checks that whether inspection of document code correct, if so, carry out step 3.3), if not, delete compressed file, return and repeat boot, perform step 3.1);
3.3) the boot decompressing compressed file, and cover user program, upgrade system firmware.
Above-described embodiment is only for the present invention is described, and not as limitation of the invention.So long as according to technical spirit of the present invention, to above-described embodiment changed, modification etc. all will drop in the scope of claim of the present invention.

Claims (7)

1. the method that the compression of zigbee firmware is upgraded, is characterized in that, step is as follows:
1) compress zigbee firmware to be updated, to be downloaded;
2) user program is downloaded the zigbee firmware to be updated of compression to the single-chip microcomputer internal memory of zigbee system;
3) zigbee firmware boot decompress(ion) step 2), and cover user program, upgrade system firmware.
2. the method that zigbee firmware compression according to claim 1 is upgraded, is characterized in that, in step 1), adopts the LZO algorithm to compress processing to zigbee firmware to be updated.
3. the method that zigbee firmware compression according to claim 1 is upgraded, is characterized in that, in step 3), and the zigbee firmware to be updated of boot inspection decompress(ion) compression, step is as follows:
3.1) boot judges that whether compressed file exists, and if so, carry out step 3.2), if not, repeat boot, perform step 3.1);
3.2) boot checks that whether inspection of document code correct, if so, carry out step 3.3), if not, delete compressed file, repeat boot, perform step 3.1);
3.3) the boot decompressing compressed file, and cover user program, upgrade system firmware.
4. the method that zigbee firmware according to claim 1 compression is upgraded, is characterized in that step 2) in the underlying protocol that transmits the zigbee protocol stack as file.
5. the method that zigbee firmware compression according to claim 4 is upgraded is characterized in that in user program, the code of download file is defined as by the zigbee protocol stack underlying protocol that file transmits.
6. the method that zigbee firmware compression according to claim 1 is upgraded, is characterized in that step 2) be specially:
2.1) Network Capture zigbee firmware;
2.2) obtain file size, check code;
2.3) receive in data write memory;
2.4) judge whether to receive complete, if so, carry out step 2.5), if not, return to step 2.3) repeat;
2.5) check that whether inspection of document code is correct, if so, carry out step 2.6), if not, delete compressed file, return to step 2.1);
2.6) write zone bit;
2.7) restart system, enter boot.
7. the method that zigbee firmware compression according to claim 1 is upgraded, is characterized in that, comprises boot and user program in firmware.
CN2013102027818A 2013-05-27 2013-05-27 Zigbee firmware compressing and updating method Pending CN103425508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013102027818A CN103425508A (en) 2013-05-27 2013-05-27 Zigbee firmware compressing and updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013102027818A CN103425508A (en) 2013-05-27 2013-05-27 Zigbee firmware compressing and updating method

Publications (1)

Publication Number Publication Date
CN103425508A true CN103425508A (en) 2013-12-04

Family

ID=49650302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013102027818A Pending CN103425508A (en) 2013-05-27 2013-05-27 Zigbee firmware compressing and updating method

Country Status (1)

Country Link
CN (1) CN103425508A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636140A (en) * 2015-01-29 2015-05-20 小米科技有限责任公司 Firmware compression method and firmware decompression method and device
CN105786573A (en) * 2016-03-16 2016-07-20 烽火通信科技股份有限公司 Method and system for rapidly upgrading ZigBee controller in smart home
CN111258601A (en) * 2020-01-09 2020-06-09 深圳市东深电子股份有限公司 Water conservancy RTU remote upgrading method based on lossless data compression algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702618A (en) * 2004-05-24 2005-11-30 建兴电子科技股份有限公司 Firmware updating method
CN101184301A (en) * 2007-12-14 2008-05-21 中兴通讯股份有限公司 Mobile terminal remote firmware updating method and system
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
KR20130015243A (en) * 2011-08-02 2013-02-13 엘지전자 주식회사 Apparatus and method for upgrading firmware of zigbee module
CN102946600A (en) * 2012-11-19 2013-02-27 Tcl通讯(宁波)有限公司 Method and system for updating mobile terminal parameters by firmware

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702618A (en) * 2004-05-24 2005-11-30 建兴电子科技股份有限公司 Firmware updating method
CN101184301A (en) * 2007-12-14 2008-05-21 中兴通讯股份有限公司 Mobile terminal remote firmware updating method and system
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
KR20130015243A (en) * 2011-08-02 2013-02-13 엘지전자 주식회사 Apparatus and method for upgrading firmware of zigbee module
CN102946600A (en) * 2012-11-19 2013-02-27 Tcl通讯(宁波)有限公司 Method and system for updating mobile terminal parameters by firmware

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636140A (en) * 2015-01-29 2015-05-20 小米科技有限责任公司 Firmware compression method and firmware decompression method and device
CN104636140B (en) * 2015-01-29 2018-05-29 小米科技有限责任公司 Firmware compression method, firmware decompressing method and device
CN105786573A (en) * 2016-03-16 2016-07-20 烽火通信科技股份有限公司 Method and system for rapidly upgrading ZigBee controller in smart home
CN105786573B (en) * 2016-03-16 2019-04-26 烽火通信科技股份有限公司 Quickly upgrade the method and system of ZigBee controller in smart home
CN111258601A (en) * 2020-01-09 2020-06-09 深圳市东深电子股份有限公司 Water conservancy RTU remote upgrading method based on lossless data compression algorithm
CN111258601B (en) * 2020-01-09 2023-09-08 深圳市东深电子股份有限公司 Hydraulic RTU remote upgrading method based on lossless data compression algorithm

Similar Documents

Publication Publication Date Title
CN102799452B (en) system software upgrading method and device
CN105391985B (en) A kind of video monitoring system and method based on built-in Linux
CN102880494B (en) A kind of local code update method for microsatellite system and system thereof
CN103106092A (en) System software updating method and device in terminal appliance
KR101541112B1 (en) FOTA system and the method
CN105677477A (en) Method and device for optimizing application program resources and electronic equipment
CN103176826B (en) A kind of method of free configurating terminal device default language and terminal default language configuration system
CN103425508A (en) Zigbee firmware compressing and updating method
CN102624875B (en) Method for replacing or updating language packs of terminal equipment
CN102567054B (en) Control method of two-tower amplifier and corresponding device
CN103047739A (en) Intelligent central ventilation system and remote automatic batch software updating method
CN104468235A (en) Allocable full-network remote node firmware upgrading system and device based on IAP
CN104991806A (en) Remote firmware upgrading system and method for single-chip microcomputer program
CN104090795A (en) Method, system and device for upgrading multi-core mobile terminal
CN103777981A (en) Multi-operation-system remote loading implementation method suitable for X86 framework
CN104079970A (en) System and method of data interaction and control of mobile equipment and WIFI (Wireless Fidelity) smart television
CN103902309A (en) Method for remotely upgrading wireless module firmware
CN102404366A (en) Method for achieving long-distance wireless file-upgrading system
CN104077161A (en) Client application updating method and device
CN101135978B (en) Compression version application program generating, executing method and apparatus and applications method and system
CN103902334A (en) Silent updating method and system based on Android system
CN103927145A (en) System hibernating and awakening method and device based on hybrid memory
CN109710297B (en) Method for upgrading and backing equipment wholly or in modules
CN104750516A (en) Upgrading method for terminal equipment operating system
CN101526902A (en) Executable file compression and loading technologies for movable terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20131204

RJ01 Rejection of invention patent application after publication