CN103455358A - Upgrading method of electric energy meter program - Google Patents

Upgrading method of electric energy meter program Download PDF

Info

Publication number
CN103455358A
CN103455358A CN2013104292540A CN201310429254A CN103455358A CN 103455358 A CN103455358 A CN 103455358A CN 2013104292540 A CN2013104292540 A CN 2013104292540A CN 201310429254 A CN201310429254 A CN 201310429254A CN 103455358 A CN103455358 A CN 103455358A
Authority
CN
China
Prior art keywords
upgrading
code
meter
object table
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.)
Pending
Application number
CN2013104292540A
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.)
Hangzhou Hexing Electrical Co Ltd
Original Assignee
Hangzhou Hexing Electrical 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 Hangzhou Hexing Electrical Co Ltd filed Critical Hangzhou Hexing Electrical Co Ltd
Priority to CN2013104292540A priority Critical patent/CN103455358A/en
Publication of CN103455358A publication Critical patent/CN103455358A/en
Pending legal-status Critical Current

Links

Abstract

The invention aims to an upgrading method of electric energy meter program, aiming to reduce possibility of upgraded programs being copied and prevent illegal program from being downloaded to a target meter. The technical scheme includes a, editing and generating an HEX document to be upgraded into executable upgrading device, deleting Bootloader code during editing to make upgrading codes into incomplete upgrading codes and encrypting the incomplete upgrading codes; b, running the upgrading device on computers to enable the upgrading device to log in the target meter and to verify effectiveness of the target meter, if pass, then go to Step C, if not, then stop upgrading; c, utilizing the upgrading device to download the incomplete upgrading codes into the target meter; d, utilizing the target meter to run the received incomplete upgrading codes to check whether Bootloader codes exist in the meter or not and verify the Bootloader codes. If the result is yes, then the upgradation is succeeded, if the result is no, then the upgradation is failed.

Description

The electric energy meter programme upgrade method
Technical field
The present invention relates to a kind of electric energy meter programme upgrade method, mainly be applicable to user or keeper to the program upgrade with Bootloader function electric energy meter.
Background technology
Along with the raising of people's living standard, the use cumulative year after year of electric energy, electric energy meter is constantly transformed, and function is constantly perfect.For making electric energy meter constantly meet the demand that the client uses and Utilities Electric Co. manages, do not increase again customer using cost simultaneously, to the electric energy meter program upgrade, it is optimal selection, yet existing program upgrade process is too oversimplified, directly by the burned electric energy meter chip of source code of upgrading, its shortcoming is: 1, the source code of upgrading is easy to be replicated, and causes program development side to suffer a loss; 2, can't complete the checking to upgrade form meter details, cause the illegal update program to download in the object table meter; 3, ROMPaq does not have multiple secret to process, and is easy to be cracked.4, need the mailing fever writes, especially inconvenient for the exported product upgrading.
Summary of the invention
The technical problem to be solved in the present invention is: the problem for above-mentioned existence provides a kind of safe electric energy meter programme upgrade method, and the possibility be replicated to reduce ROMPaq avoids illegal program to download to the object table meter simultaneously.
The technical solution adopted in the present invention is: the electric energy meter programme upgrade method is characterized in that step is as follows:
A, on computers will need the upgrading the HEX Document Editing generate executable upgrading device, this upgrading device includes upgrade code; During editor, by the Bootloader code deletion, the upgrade code in the device that makes to upgrade is incomplete upgrade code, and it is encrypted;
B, move described upgrading device on computers, make its login object table meter and the validity of object table meter is verified, if, by checking, go to step c, if, by checking, stop upgrading;
C, upgrading device download to described incomplete upgrade code in object table in the communication modes of encrypting;
Whether the incomplete upgrade code that d, the operation of object table meter receive, exist Bootloader code verification correct in the look-up table meter, if correct, upgrade successfully, if incorrect,, for illegally cracking and write, upgrades unsuccessfully.
In step b, the checking content comprises target program version number, target program check code, object table order number, object table firmware code and object table hardware encoding.
Cryptographic algorithm in step a is AES128.
In step a, set the term of validity of upgrading device during editor, expired this upgrading device afterwards can't move.
In step b, the upgrading device is logined object table in the mode of username and password.
Described computing machine is by serial ports and the communication of object table meter, and its baud rate is 9600bps.
The invention has the beneficial effects as follows: 1, the present invention will need HEX file (AKU) editor of upgrading to generate executable upgrading device on computers, then moving this upgrading device makes its login object table meter and the validity of object table meter is verified, in the communication modes of encrypting, incomplete upgrade code is downloaded in object table and completes upgrading after being verified, compared to prior art, upgrade code of the present invention is compiled the upgrading device, and encrypt by AES128, prevented possible cracking, the duplicator can't directly obtain upgrade code (source code is controlled by exploitation side intra-company), reduced the puzzlement be replicated, thereby strong protection the rights and interests of program development side.2, carry out a series of specific authentication after upgrading device login object table meter, can identify the object table version, only, to limiting the version product up-gradation, can effectively avoid the illegal update program to download in the object table meter.3, the upgrading device, in mode and the object table communication of encryption, has further improved the security of communication.4, no longer need to post fever writes, by internet, the upgrading device software generated is sent to the client and get final product, saved the stand-by period.
Embodiment
Upgrade method of the present invention is applicable to itself just burn the situation that application program and Bootloader code are arranged in electric energy meter MCU chip, and this Bootloader code can't be published, that is to say that its other party can not obtain this part Bootloader code, company only can be burnt to the Bootloader code in electric energy meter MCU chip.Wherein application program is the day-to-day operation task, and the Bootloader code is operation when upgrading only, and afterwards during upgrading can not change.
The concrete steps of the present embodiment are as follows:
A, will need on computers HEX file (AKU) editor of upgrading to generate executable Bootloader upgrading device, this upgrading device includes upgrade code, and this upgrade code is by more the application program of highest version (with respect to the application program be burnt in electric energy meter MCU chip) and Bootloader code form.In this example, the method that generates Bootloader upgrading device is: the Bootloader editor software is opened the HEX file, HEX file and required binary sequence aggregation of data coding, according to binary mode, generates executable file, i.e. Bootloader upgrading device; The executable file of described Bootloader editor software for moving on computers, be mainly used in HEX file (AKU) editor of needs upgrading is generated to executable Bootloader upgrading device software, it can specify aforementioned Bootloader code address section simultaneously, set the content and the corresponding value that need checking, set the term of validity of the upgrading device generated, the username and password used in the time of can also setting upgrading.
Specify the address field in the HEX file of aforementioned Bootloader code place during editor, and by this Bootloader code deletion, the upgrade code that makes to upgrade in device is incomplete upgrade code, only stay the more application program of highest version, and by AES128, it is encrypted, to prevent possible cracking.Simultaneously, the content that need to verify while setting upgrading, and the occurrence of definite each content, to determine the object table that needs upgrading; Described checking content comprises target program version number, target program check code, object table order number, object table firmware code and object table hardware encoding.
B, move described upgrading device on computers, and, in the mode of username and password (being set when the step a inediting) login object table, with the application program communication in electric energy meter MCU chip, the validity of object table meter is verified; During checking, the actual occurrence of respectively verifying content that logs in the table meter of the occurrence of respectively verifying content and upgrading device of determining in step a is compared, if respectively verify, the occurrence of content is all identical, mean by checking, go to step c, otherwise mean to stop upgrading not by checking.
Application program in c, electric energy meter MCU chip is closed oneself, electric energy meter MCU chip operation burning simultaneously is the Bootloader code of section in the inner, and the application program in the MCU chip is deleted by burning, now burning in the Bootloader of MCU chip internal code by serial ports (baud rate is generally 9600bps) form and the communication of upgrading device to encrypt, described incomplete upgrade code (more the application program of highest version) is downloaded in the object table meter.
If because the communication reason causes upgrading unsuccessfully, the application program of now burning in the MCU chip is deleted, Bootloader code in chip is the day-to-day operation task, with upgrading device Direct Communication (not having login and effectively checking), the application program of highest version is more downloaded in object table meter chip.
The incomplete upgrade code that the operation of d, object table meter receives (more the application program of highest version), check whether Bootloader code (the Bootloader code of programming in electric energy meter MCU own) exists and verification is correct, if exist Bootloader code and verification correct in electric energy meter MCU, upgrade successfully, if do not exist Bootloader code or verification incorrect in electric energy meter MCU, for illegally cracking and write, upgrade unsuccessfully, simultaneously can the start-up performance inefficacy etc. punitive measures.The concrete grammar of verification is as follows: application program is in when operation, the code of Bootloader code address section carried out to verification and generate check code, if not the normal Bootloader check code of this check code thinks that the Bootloader code is for illegal.
Such as normal Bootloader check code is B936, when the Bootloader code be empty or illegally the time, it is A333 rather than B936 that application program obtains check code to its verification, thinks that this application program is illegal burned chip.
In step a, can set the term of validity of upgrading device during editor, expired this upgrading device afterwards can't move, may be by Hacking Run to prevent upgrading device, and the device of for example upgrading is copied rear operation by the irrelevant personnel.

Claims (6)

1. an electric energy meter programme upgrade method is characterized in that step is as follows:
A, on computers will need the upgrading the HEX Document Editing generate executable upgrading device, this upgrading device includes upgrade code; During editor, by the Bootloader code deletion, the upgrade code in the device that makes to upgrade is incomplete upgrade code, and it is encrypted;
B, move described upgrading device on computers, make its login object table meter and the validity of object table meter is verified, if, by checking, go to step c, if, by checking, stop upgrading;
C, upgrading device download to described incomplete upgrade code in object table in the communication modes of encrypting;
Whether the incomplete upgrade code that d, the operation of object table meter receive, exist Bootloader code verification correct in the look-up table meter, if correct, upgrade successfully, if incorrect,, for illegally cracking and write, upgrades unsuccessfully.
2. electric energy meter programme upgrade method according to claim 1, is characterized in that: verify in step b that content comprises target program version number, target program check code, object table order number, object table firmware code and object table hardware encoding.
3. electric energy meter programme upgrade method according to claim 1 and 2, it is characterized in that: the cryptographic algorithm in step a is AES128.
4. electric energy meter programme upgrade method according to claim 1 and 2 is characterized in that: in step a, set the term of validity of upgrading device during editor, expired after this upgrading device can't move.
5. electric energy meter programme upgrade method according to claim 1 and 2 is characterized in that: in step b, the upgrading device is logined object table in the mode of username and password.
6. electric energy meter programme upgrade method according to claim 1 and 2, it is characterized in that: described computing machine is by serial ports and the communication of object table meter, and its baud rate is 9600bps.
CN2013104292540A 2013-09-18 2013-09-18 Upgrading method of electric energy meter program Pending CN103455358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013104292540A CN103455358A (en) 2013-09-18 2013-09-18 Upgrading method of electric energy meter program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013104292540A CN103455358A (en) 2013-09-18 2013-09-18 Upgrading method of electric energy meter program

Publications (1)

Publication Number Publication Date
CN103455358A true CN103455358A (en) 2013-12-18

Family

ID=49737765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013104292540A Pending CN103455358A (en) 2013-09-18 2013-09-18 Upgrading method of electric energy meter program

Country Status (1)

Country Link
CN (1) CN103455358A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325955A (en) * 2016-08-30 2017-01-11 威胜集团有限公司 Remote upgrading method of STS prepayment meter
CN106485140A (en) * 2016-10-17 2017-03-08 中国电力科学研究院 A kind of upgrade method of electric energy meter and upgrade-system
CN107404391A (en) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 Version file method of calibration and device and encryption method and device
CN109947417A (en) * 2019-03-21 2019-06-28 上海龙旗科技股份有限公司 For generating the method and apparatus of a key upgrade procedure

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1548451A2 (en) * 2001-12-20 2005-06-29 Enel Distribuzione S.p.A. System for the remote reading and control of electric energy consumption
CN101419557A (en) * 2008-07-29 2009-04-29 航天信息股份有限公司 Program downloading control method
CN102385521A (en) * 2010-09-03 2012-03-21 Ls产电株式会社 System and method for firmware update of meter, watt hour meter with function of remote firmware update
CN103236113A (en) * 2013-04-11 2013-08-07 成都秦川科技发展有限公司 Information security management module for integrated circuit (IC) card intelligent ammeter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1548451A2 (en) * 2001-12-20 2005-06-29 Enel Distribuzione S.p.A. System for the remote reading and control of electric energy consumption
CN101419557A (en) * 2008-07-29 2009-04-29 航天信息股份有限公司 Program downloading control method
CN102385521A (en) * 2010-09-03 2012-03-21 Ls产电株式会社 System and method for firmware update of meter, watt hour meter with function of remote firmware update
CN103236113A (en) * 2013-04-11 2013-08-07 成都秦川科技发展有限公司 Information security management module for integrated circuit (IC) card intelligent ammeter

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107404391A (en) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 Version file method of calibration and device and encryption method and device
CN106325955A (en) * 2016-08-30 2017-01-11 威胜集团有限公司 Remote upgrading method of STS prepayment meter
CN106485140A (en) * 2016-10-17 2017-03-08 中国电力科学研究院 A kind of upgrade method of electric energy meter and upgrade-system
CN109947417A (en) * 2019-03-21 2019-06-28 上海龙旗科技股份有限公司 For generating the method and apparatus of a key upgrade procedure

Similar Documents

Publication Publication Date Title
US10547604B2 (en) Information recording apparatus with shadow boot program for authentication with a server
CN105491062B (en) A kind of client software guard method, device and client
US9276752B2 (en) System and method for secure software update
AU2012205457B2 (en) System and method for tamper-resistant booting
CN107438849B (en) System and method for verifying integrity of electronic device
CN103995991B (en) Method for binding hardware information and secret keys in software copyright protection
CN109992987B (en) Script file protection method and device based on Nginx and terminal equipment
CN112231647A (en) Software authorization verification method
CN112528257A (en) Security debugging method and device, electronic equipment and storage medium
CN104539634A (en) Security-enhanced authorizing and authenticating method of mobile application
CN111414612B (en) Security protection method and device for operating system mirror image and electronic equipment
CN111162911B (en) PLC firmware upgrading system and method
WO2013185724A2 (en) Mobile terminal and software upgrade method thereof
CN103455358A (en) Upgrading method of electric energy meter program
US20110265186A1 (en) Method for protecting a software license, system for same, server, terminal, and computer-readable recording medium
CN109150834A (en) A kind of embedded device license authorization management method
CN106446613A (en) Protection method for pre-installed application in terminal
CN110032835A (en) A kind of soft encryption technology preventing software duplication and migration
US11838282B2 (en) Information recording apparatus with server-based user authentication for accessing a locked operating system storage
CN104735085A (en) Terminal two-factor secure login protection method
WO2015154469A1 (en) Database operation method and device
CN109584421A (en) A kind of intelligent door lock authentication administrative system based on domestic safety chip
KR101322402B1 (en) System and Method for Security of Application, Communication Terminal Therefor
CN114925336A (en) Method and system for activating software
KR101415786B1 (en) A Hybrid Design system and method of Online Execution Class and Encryption-based Copyright Protection for Android Apps

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20131218