CN107179928A - A kind of method that communication equipment is upgraded automatically - Google Patents

A kind of method that communication equipment is upgraded automatically Download PDF

Info

Publication number
CN107179928A
CN107179928A CN201710336152.2A CN201710336152A CN107179928A CN 107179928 A CN107179928 A CN 107179928A CN 201710336152 A CN201710336152 A CN 201710336152A CN 107179928 A CN107179928 A CN 107179928A
Authority
CN
China
Prior art keywords
file
going
upgrading
upgrade file
communication equipment
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
CN201710336152.2A
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.)
Shenzhen Universal Public Alliance Network Technology Co Ltd
Original Assignee
Shenzhen Universal Public Alliance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Universal Public Alliance Network Technology Co Ltd filed Critical Shenzhen Universal Public Alliance Network Technology Co Ltd
Priority to CN201710336152.2A priority Critical patent/CN107179928A/en
Publication of CN107179928A publication Critical patent/CN107179928A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention discloses a kind of method that communication equipment is upgraded automatically, including:1st, electric on communication equipment, inspection software check mark position whether there is, and turns 7 if existing, otherwise turns 2;2nd, whether detection current environment is software upgrading environment, if turning 3, otherwise turns 6;3rd, correct upgrade file is obtained, if upgrade file, which is obtained, successfully turns 4, otherwise turns 6;4th, upgrade file is write memory block, and judges whether to be write as work(, if successfully turning 5, otherwise turn 6;The 5th, software check flag bit is set, system is restarted, turns 7;6th, upgrading failure indicator lamp is lighted, terminates program;7th, into verification upgrading whether successful flow, upgrade successfully indicator lamp if upgrading successfully and lighting, otherwise light upgrading failure indicator lamp.The present invention obtains verification file and upgrade file by device power, searching given server, with ensureing communication device safety by verifying automatic upgrading, can be convenient for bulk, automatic updating.

Description

A kind of method that communication equipment is upgraded automatically
Technical field
The present invention relates to communication technical field, more particularly to a kind of method that communication equipment is upgraded automatically.
Background technology
At present, with the versatility of hardware, and the division of labor in society is detailed-oriented, also more next to the software requirement of communication equipment More sectionalization, causes increasing communication software company oneself to have more energy to put into the specialty of oneself in order to allow Field, the communication equipment that the hardware supplier of specialty can be selected to provide writes into the software of oneself again, and hardware supplier is in order to more Efficiently service different software companys, i.e. the inevitable demand of simple, quickly upgrading different manufacturers software requirements.
The content of the invention
It is an object of the invention to provide a kind of method that communication equipment is upgraded automatically, bulk, automation can be convenient for Ground is to communication equipment upgrading.
Technical scheme is as follows:The present invention provides a kind of method that communication equipment is upgraded automatically, including following step Suddenly:
Electric in step 1, communication equipment, inspection software check mark position whether there is, if in the presence of going to step 7, otherwise turning step Rapid 2;
Whether step 2, detection current environment are software upgrading environment, if going to step 3, otherwise go to step 6;
Step 3, the correct upgrade file of acquisition, if upgrade file, which is obtained, successfully goes to step 4, otherwise go to step 6;
Step 4, upgrade file is write memory block, and judge whether to be write as work(, if successfully going to step 5, otherwise go to step 6;
Step 5, setting software check flag bit, restart system, go to step 7;
Step 6, light upgrading failure indicator lamp, terminate program;
Step 7, into verification upgrading whether successful flow, upgrade successfully indicator lamp if upgrading successfully and lighting, otherwise point Bright upgrading failure indicator lamp.
The step 2 includes:
Electric in step 21, communication equipment, detection upgrading flag bit whether there is, if in the presence of going to step 22, otherwise going to step 6;
Step 22, detection given server whether there is, if in the presence of going to step 23, otherwise going to step 6;
Step 23, from given server obtain verification file, if obtain verification file success, go to step 24, if obtain school Test file unsuccessful, go to step 6;
Step 24, the size for checking verification file, if verification file is less than the byte number of setting, go to step 25, otherwise Go to step 6;
Step 25, the form for checking verification file, if form is correct, goes to step 26, otherwise go to step 6;
Whether the upgrade file flag bit in step 26, inspection verification file is correct, if correctly, going to step 27, otherwise Go to step 6;
Step 27, according to verification file, judging the size of upgrade file, whether to be less than storage interval, if being less than memory space 28 are gone to step, 6 are otherwise gone to step;
Step 28,3 are gone to step, into obtaining upgrade file flow.
The verification file is text document, and its form is as follows:Verify beginning-of-file label, newline, upgrade file Byte number, newline, the attribute field of upgrade file, newline, the check value of upgrade file, newline, the verification end of file Mark.
In the step 24, the byte number set is 4096 byte.
The step 3 includes:
Step 31, the upgrade file from given server acquisition specified file name, if obtaining upgrade file success, go to step 32, otherwise go to step 6;
Whether step 32, the size of inspection upgrade file are correct, if correctly going to step 33, otherwise go to step 6;
Step 33, check upgrade file flag bit it is whether correct, if correctly going to step 34, otherwise go to step 6;
Step 34, the check value for calculating upgrade file, and judge whether the check value of upgrade file is correct, if correct turn step Rapid 35, otherwise go to step 6;
Step 35,4 are gone to step, into upgrading flow.
The step 4 includes:
Step 41, erasing memory block, light indicator lamp of upgrading, go to step 42;
Step 42, one group of data of reading simultaneously write memory block, go to step 43;
Step 43, reading storage area data, whether correct comparison is write records, and goes to step 47 if correct, otherwise goes to step 44;
Step 44, judge write error number of times whether be more than 3 times, if going to step 45, otherwise go to step 46;
Step 45, indicator lamp of upgrading is knocked out, go to step 46;
Step 46, write error number of times+1, go to step 42;
Step 47, judge whether total data has obtained and finish, if then going to step 49, otherwise go to step 48;
Step 48, next group of data of acquisition, go to step 42;
Step 49, step 5 is gone to, into checking process.
In the step 42, the size of one group of data is 4096 bytes;In the step 48, the size of next group of data is 4096 bytes.
The step 7 includes:
Step 71, read storage area data and calculate check value, go to step 72;
Whether step 72, Inspection value are correct, if correctly going to step 73, otherwise go to step 74;
Step 73, removing check mark position, light and upgrade successfully indicator lamp;
Step 74, light upgrading failure indicator lamp.
Using such scheme, the present invention provides a kind of method that communication equipment is upgraded automatically, by device power, looking into Given server is looked for, verification file and upgrade file is obtained, with ensureing communication device safety by verifying automatic upgrading can be just In the bulk, automatic updating of progress.
Brief description of the drawings
Fig. 1 is the flow chart for the method that communication equipment of the present invention is upgraded automatically.
Fig. 2 for the present invention in detection current environment whether be software upgrading environment flow chart.
Fig. 3 is the structural representation of checking file in the present invention.
Fig. 4 is obtains the flow chart of correct upgrade file in the present invention.
Fig. 5 is writes upgrade file the flow chart of memory block in the present invention.
Fig. 6 for the present invention in verification upgrading whether successful flow chart.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
Referring to Fig. 1, the present invention provides a kind of method that communication equipment is upgraded automatically, by device power, searching Given server, obtains verification file and upgrade file, with ensureing communication device safety by verifying automatic upgrading.This method Specifically include following steps:
Electric in step 1, communication equipment, inspection software check mark position whether there is, if in the presence of going to step 7, otherwise turning step Rapid 2.
In this step, inspection software check mark position whether there is, if carrying out upgrade checkout in the presence of if, if in the absence of if Carry out software upgrading.
Whether step 2, detection current environment are software upgrading environment, if going to step 3, otherwise go to step 6.
Fig. 2 is please referred to, the step can specifically be subdivided into following steps 21 to step 28:
Electric in step 21, communication equipment, detection upgrading flag bit whether there is, if in the presence of going to step 22, otherwise going to step 6。
Step 22, detection given server whether there is, if in the presence of going to step 23, otherwise going to step 6.
Step 23, from given server obtain verification file, if obtain verification file success, go to step 24, if obtain school Test file unsuccessful, go to step 6.
Fig. 3 is please referred to, the verification file is text document, its form is as follows:Verify beginning-of-file label (cf- Check-start), attribute field (this field building form of newline, the byte number of upgrade file, newline, upgrade file For comfast+ ardware model numbers), newline, the check value (this value is calculated by algorithm) of upgrade file, newline, verification text Part end mark (cf-check-end).
Step 24, the size for checking verification file, if verification file is less than the byte number of setting, go to step 25, otherwise Go to step 6.
In the present embodiment, the byte number set is 4096 byte.
Step 25, the form for checking verification file, if form is correct, goes to step 26, otherwise go to step 6.
Whether the upgrade file flag bit in step 26, inspection verification file is correct, if correctly, going to step 27, otherwise Go to step 6.
Step 27, according to verification file, judging the size of upgrade file, whether to be less than storage interval, if being less than memory space 28 are gone to step, 6 are otherwise gone to step.
Step 28,3 are gone to step, into obtaining upgrade file flow.
Step 3, the correct upgrade file of acquisition, if upgrade file, which is obtained, successfully goes to step 4, otherwise go to step 6.
Fig. 4 is please referred to, can segment comprise the following steps 31 to step 35 in this step:
Step 31, the upgrade file from given server acquisition specified file name, if obtaining upgrade file success, go to step 32, otherwise go to step 6.
Whether step 32, the size of inspection upgrade file are correct, if correctly going to step 33, otherwise go to step 6.
Step 33, check upgrade file flag bit it is whether correct, if correctly going to step 34, otherwise go to step 6.
Step 34, the check value for calculating upgrade file, and judge whether the check value of upgrade file is correct, if correct turn step Rapid 35, otherwise go to step 6.
Step 35,4 are gone to step, into upgrading flow.
Step 4, upgrade file is write memory block, and judge whether to be write as work(, if successfully going to step 5, otherwise go to step 6。
Fig. 6 is please referred to, the step 4 includes:
Step 41, erasing memory block, light indicator lamp of upgrading, go to step 42.
Step 42, one group of data of reading simultaneously write memory block, go to step 43.
The size of this group of data is 4096 bytes, is just one section size of disk.
Step 43, reading storage area data, whether correct comparison is write records, and goes to step 47 if correct, otherwise goes to step 44.
Step 44, judge write error number of times whether be more than 3 times, if going to step 45, otherwise go to step 46.
Step 45, indicator lamp of upgrading is knocked out, go to step 46.
Step 46, write error number of times+1, go to step 42.
Step 47, judge whether total data has obtained and finish, if then going to step 49, otherwise go to step 48.
Step 48, next group of data of acquisition, go to step 42.
The size of the next group of data is 4096 bytes, is just one section size of disk.
Step 49, step 5 is gone to, into checking process.
Step 5, setting software check flag bit, restart system, go to step 7.
In this step, software upgrading flag bit is removed, to ensure that software has necessarily write memory block, rather than disk reflects Area is penetrated, software check flag bit is set, system is restarted.
Step 6, light upgrading failure indicator lamp, terminate program.
Step 7, into verification upgrading whether successful flow, upgrade successfully indicator lamp if upgrading successfully and lighting, otherwise point Bright upgrading failure indicator lamp.
The present invention detects whether successfully to upgrade by verifying, it is ensured that upgrade automatically communication device safety.Incorporated by reference to Refering to Fig. 6, the step 7 includes:
Step 71, read storage area data and calculate check value, go to step 72.
Whether step 72, Inspection value are correct, if correctly going to step 73, otherwise go to step 74.
Step 73, removing check mark position, light and upgrade successfully indicator lamp.
Step 74, light upgrading failure indicator lamp.
In summary, the present invention provides a kind of method that communication equipment is upgraded automatically, by the way that in device power, lookup refers to Determine server, obtain verification file and upgrade file, with ensureing communication device safety by verifying automatic upgrading, can be easy into The bulk, automatic updating of row.
These are only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Any modifications, equivalent substitutions and improvements made within principle etc., should be included in the scope of the protection.

Claims (8)

1. a kind of method that communication equipment is upgraded automatically, it is characterised in that comprise the following steps:
Electric in step 1, communication equipment, inspection software check mark position whether there is, if in the presence of going to step 7, otherwise going to step 2;
Whether step 2, detection current environment are software upgrading environment, if going to step 3, otherwise go to step 6;
Step 3, the correct upgrade file of acquisition, if upgrade file, which is obtained, successfully goes to step 4, otherwise go to step 6;
Step 4, upgrade file is write memory block, and judge whether to be write as work(, if successfully going to step 5, otherwise go to step 6;
Step 5, setting software check flag bit, restart system, go to step 7;
Step 6, light upgrading failure indicator lamp, terminate program;
Step 7, into verification upgrading whether successful flow, upgrade successfully indicator lamp if upgrading successfully and lighting, otherwise light liter Level failure indicator lamp.
2. the method that communication equipment according to claim 1 is upgraded automatically, it is characterised in that the step 2 includes:
Electric in step 21, communication equipment, detection upgrading flag bit whether there is, if in the presence of going to step 22, otherwise going to step 6;
Step 22, detection given server whether there is, if in the presence of going to step 23, otherwise going to step 6;
Step 23, from given server obtain verification file, if obtain verification file success, go to step 24, if obtain verification text Part is unsuccessful, goes to step 6;
Step 24, the size for checking verification file, if verification file is less than the byte number of setting, go to step 25, otherwise turn step Rapid 6;
Step 25, the form for checking verification file, if form is correct, goes to step 26, otherwise go to step 6;
Whether the upgrade file flag bit in step 26, inspection verification file is correct, if correctly, going to step 27, otherwise turns step Rapid 6;
Step 27, according to verification file, judging the size of upgrade file, whether to be less than storage interval, if turning to walk less than memory space Rapid 28, otherwise go to step 6;
Step 28,3 are gone to step, into obtaining upgrade file flow.
3. the method that communication equipment according to claim 2 is upgraded automatically, it is characterised in that the verification file is text Document, its form is as follows:Verify beginning-of-file label, newline, the byte number of upgrade file, newline, the mark of upgrade file Will field, newline, the check value of upgrade file, newline, verification end-of-file mark.
4. the method that communication equipment according to claim 2 is upgraded automatically, it is characterised in that in the step 24, setting Byte number be 4096 bytes.
5. the method that communication equipment according to claim 1 is upgraded automatically, it is characterised in that the step 3 includes:
Step 31, the upgrade file from given server acquisition specified file name, if obtaining upgrade file success, go to step 32, Otherwise 6 are gone to step;
Whether step 32, the size of inspection upgrade file are correct, if correctly going to step 33, otherwise go to step 6;
Step 33, check upgrade file flag bit it is whether correct, if correctly going to step 34, otherwise go to step 6;
Step 34, the check value for calculating upgrade file, and judge whether the check value of upgrade file is correct, if correctly going to step 35, otherwise go to step 6;
Step 35,4 are gone to step, into upgrading flow.
6. the method that communication equipment according to claim 1 is upgraded automatically, it is characterised in that the step 4 includes:
Step 41, erasing memory block, light indicator lamp of upgrading, go to step 42;
Step 42, one group of data of reading simultaneously write memory block, go to step 43;
Step 43, reading storage area data, whether correct comparison is write records, and goes to step 47 if correct, otherwise goes to step 44;
Step 44, judge write error number of times whether be more than 3 times, if going to step 45, otherwise go to step 46;
Step 45, indicator lamp of upgrading is knocked out, go to step 46;
Step 46, write error number of times+1, go to step 42;
Step 47, judge whether total data has obtained and finish, if then going to step 49, otherwise go to step 48;
Step 48, next group of data of acquisition, go to step 42;
Step 49, step 5 is gone to, into checking process.
7. the method that communication equipment according to claim 6 is upgraded automatically, it is characterised in that in the step 42, one group The size of data is 4096 bytes;In the step 48, the size of next group of data is 4096 bytes.
8. the method that communication equipment according to claim 1 is upgraded automatically, it is characterised in that the step 7 includes:
Step 71, read storage area data and calculate check value, go to step 72;
Whether step 72, Inspection value are correct, if correctly going to step 73, otherwise go to step 74;
Step 73, removing check mark position, light and upgrade successfully indicator lamp;
Step 74, light upgrading failure indicator lamp.
CN201710336152.2A 2017-05-12 2017-05-12 A kind of method that communication equipment is upgraded automatically Pending CN107179928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710336152.2A CN107179928A (en) 2017-05-12 2017-05-12 A kind of method that communication equipment is upgraded automatically

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710336152.2A CN107179928A (en) 2017-05-12 2017-05-12 A kind of method that communication equipment is upgraded automatically

Publications (1)

Publication Number Publication Date
CN107179928A true CN107179928A (en) 2017-09-19

Family

ID=59831543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710336152.2A Pending CN107179928A (en) 2017-05-12 2017-05-12 A kind of method that communication equipment is upgraded automatically

Country Status (1)

Country Link
CN (1) CN107179928A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032615A (en) * 2018-06-06 2018-12-18 咕咚网络(北京)有限公司 A kind of on-line software updating method for Wireless Networking door lock
CN110536323A (en) * 2019-09-04 2019-12-03 四川长虹电器股份有限公司 A kind of WiFi smart machine acceptance test method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal
US20140136856A1 (en) * 2005-02-02 2014-05-15 Insyde Software Corp. System and method for updating firmware
CN106250192A (en) * 2016-08-04 2016-12-21 芯讯通无线科技(上海)有限公司 The method for upgrading software of host computer and system
CN106598781A (en) * 2016-11-30 2017-04-26 惠州华阳通用电子有限公司 System software upgrading method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140136856A1 (en) * 2005-02-02 2014-05-15 Insyde Software Corp. System and method for updating firmware
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal
CN106250192A (en) * 2016-08-04 2016-12-21 芯讯通无线科技(上海)有限公司 The method for upgrading software of host computer and system
CN106598781A (en) * 2016-11-30 2017-04-26 惠州华阳通用电子有限公司 System software upgrading method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032615A (en) * 2018-06-06 2018-12-18 咕咚网络(北京)有限公司 A kind of on-line software updating method for Wireless Networking door lock
CN110536323A (en) * 2019-09-04 2019-12-03 四川长虹电器股份有限公司 A kind of WiFi smart machine acceptance test method

Similar Documents

Publication Publication Date Title
CN102662701B (en) CPLD online upgrading method, device and service board
CN104063254B (en) Online upgrading method for electric energy meter
CN102279776B (en) Error checking and correcting ability testing method and device
CN110032377B (en) Communication module software upgrading method and system and communication module
CN111680801B (en) Operation verification method, device, equipment and storage medium
CN107491328A (en) Updating firmware program method, system and electric equipment
CN103135941B (en) The management method of in-line memory, in-line memory and electronic equipment
CN104216791A (en) Flash stored data verifying method
CN104282342A (en) Flash memory device, memory controller and control method of flash memory
CN105320553A (en) Method and system for updating network card firmware based on domestic processor platform
CN107179928A (en) A kind of method that communication equipment is upgraded automatically
CN108196861B (en) Data upgrading method and diagnostic equipment thereof
CN103761095B (en) Method for generating universal upgrade file head data information
CN108255510B (en) IAP-based transmission verification design method for online upgrading of firmware to be upgraded
CN102799494B (en) A kind of method and apparatus verifying application program in internal memory
CN112882995A (en) Script automatic generation method and device, electronic equipment and storage medium
CN102316376A (en) Method for set-top box to automatically update data and system
CN102968089B (en) Programmable logic controller and implementing method
CN110647342A (en) Gateway upgrading method and system based on USB
CN104036193B (en) Local cross-domain vulnerability detection method and device for application program
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN107145417A (en) A kind of outer plug-in card installation site method of calibration and device
CN107479924A (en) Software upgrading method of calibration based on android system
CN107515757A (en) Software program upgrade method and system, terminal
CN111459496A (en) Method for generating tamper-proof program file and method for upgrading equipment

Legal Events

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

Application publication date: 20170919