CN103685212A - Firmware protection method for wireless meter reading module of electric energy meter - Google Patents

Firmware protection method for wireless meter reading module of electric energy meter Download PDF

Info

Publication number
CN103685212A
CN103685212A CN201210363890.3A CN201210363890A CN103685212A CN 103685212 A CN103685212 A CN 103685212A CN 201210363890 A CN201210363890 A CN 201210363890A CN 103685212 A CN103685212 A CN 103685212A
Authority
CN
China
Prior art keywords
firmware
reading module
meter
code
key
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.)
Granted
Application number
CN201210363890.3A
Other languages
Chinese (zh)
Other versions
CN103685212B (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.)
State Grid Corp of China SGCC
Shenyang Institute of Automation of CAS
Shenyang Power Supply Co of State Grid Liaoning Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Shenyang Institute of Automation of CAS
Shenyang Power Supply Co of State Grid Liaoning Electric Power 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 State Grid Corp of China SGCC, Shenyang Institute of Automation of CAS, Shenyang Power Supply Co of State Grid Liaoning Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201210363890.3A priority Critical patent/CN103685212B/en
Publication of CN103685212A publication Critical patent/CN103685212A/en
Application granted granted Critical
Publication of CN103685212B publication Critical patent/CN103685212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Selective Calling Equipment (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a firmware protection method for a wireless meter reading module of an electric energy meter. The method comprises the following steps: calculating the CRC checksum of a critical code section, comparing the CRC checksum with a preset checksum and terminating operation if a calculation result is not consistent with a preset result in a program; reading hardware feature information of the wireless meter reading module if the calculation result is consistent with the preset result; calculating the feature information with the use of a predetermined calculation method to generate a feature key; using a preset key writing method in a piece of firmware to write the feature key in the firmware if the preset key writing method is not deleted and deleting the writing method; and comparing the generated feature key with a feature key in the firmware if the key writing method in the firmware is deleted and continuing operation if the keys are consistent, or terminating operation. The method of the invention is easy to operate, the integrity and legitimacy of a program are protected when the uniqueness of the program is ensured by using the hardware feature data, and the firmware is not easy to crack.

Description

A kind of firmware guard method for electric energy meter wireless meter-reading module
Technical field
The invention belongs to network communication of wireless sensor field, specifically a kind of firmware guard method for electric energy meter wireless meter-reading module.
Background technology
Along with going deep into of economic system reform, the important topic that the promptness that electric energy metrical, the electricity charge are adjusted and taken over and accuracy have become electricity consumption enterprise.The system that is that Every household has an ammeter that at present way of energy measuring of China is taked, this has just determined that kilowatt meter reading-out system mainly has following two features: 1. kilowatt meter reading-out system data collection point is many, thousands of, and data volume is large; 2. collection point has dispersiveness, and making kilowatt meter reading-out system is a communication network that coverage rate is very wide.This just gives the very large difficulty of having checked meter work band.
The development of Automatic meter reading system is the effective way addressing the above problem with application.Automatic copying electric meter is called for short ARM(Automatic Reading Meter), the data such as power consumption that to be power supply department record the electric energy meter that is arranged on user place are by remote measurement, transmission, by computer system, be aggregated into sales department again, replace manual metering and follow-up work.Current Automatic meter reading system, from transfer of data angular divisions, can be divided into wired, wireless two large classes, this two large class kilowatt meter reading-out system respectively has its applicable application, but with regard to the several respects such as the investment of kilowatt meter reading-out system, construction, maintenance, wireless kilowatt meter reading-out system obviously has greater advantages.Particularly, along with the proposition of intelligent grid concept, the reliability of Demand-side communication network, real-time, flexibility and big data quantity transmission are had higher requirement.
Power consumption wireless sensor network technology is the communication technology that obtains in recent years fast development.Power consumption wireless sensor network technology is mainly used near radio and connects, and target market is industry, the field that family and medical treatment etc. needs low power consumption and low cost and large area to use wireless monitoring equipment.Power consumption wireless sensor network technology has unrivaled advantage in Automatic meter reading system: meter reading terminal has super low-power consumption, and low cost can meet the communication requirement of big data quantity, meanwhile, has stronger antijamming capability, and real-time communication is higher.Wireless kilowatt meter reading-out system is a great development direction of long-distance meter-reading system, will get more and more, for its firmware provides safeguard measure particularly important by what become as the output of the wireless meter-reading module of its chief component.
Summary of the invention
The object of the invention is to provide for electric energy meter wireless meter-reading module a kind of method of firmware protection, can effectively protect integrality and the legitimacy of firmware.
The technical scheme that the present invention adopted is for achieving the above object: a kind of firmware guard method for electric energy meter wireless meter-reading module, comprises the following steps:
Calculate critical code section in the firmware code of electric energy meter wireless meter-reading module CRC check and, with CRC check default in firmware code with make comparisons;
If the CRC check of calculating and with default CRC check and inconsistent, judge that firmware code content is tampered, wireless meter-reading module quits work;
If the CRC check of calculating and the CRC check with default and consistent, read the hardware characteristics information of wireless meter-reading module, by calculating, produce feature key;
If key wiring method preset in firmware code does not have deleted, key wiring method writes the feature key of generation in firmware code, cover existing feature key in firmware code, then this key wiring method is deleted to the meter reading procedure that enters wireless meter-reading module;
If key wiring method preset in firmware code is deleted, existing feature key comparison in the feature key calculating being produced and firmware code, key agreement enters the meter reading procedure of wireless meter-reading module, otherwise wireless meter-reading module quits work.
Described critical code section is the 2K syllabified code that firmware code starts, and comprises the code that relates to program circuit redirect in the guard method of this firmware.
Described hardware characteristics information comprises the sequence code that controller chip that wireless meter-reading module is used has.
Described key wiring method is the one section of code having in firmware self firmware code read-write operation function, can be deleted separately, and does not affect other firmware code functions.
In described firmware code, existing feature key is the data of N byte, is dispersed in the different address spaces of firmware code.
The present invention has the following advantages:
1. the inventive method is simple.
2. the guard method of this firmware, when utilizing hardware characteristics data to guarantee program uniqueness, has also been protected integrality and the legitimacy of program, makes firmware be difficult for being cracked.
Accompanying drawing explanation
Fig. 1 is the inventive method flow chart.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
As shown in Figure 1, a kind of firmware guard method for electric energy meter wireless meter-reading module, comprises the following steps:
Calculate critical code section in the firmware code of electric energy meter wireless meter-reading module CRC check and, with CRC check default in firmware code with make comparisons; Default CRC check and characterized CRC check and firmware code content be not tampered CRC check in situation and value.Critical code section described in the present embodiment is the 2K syllabified code that firmware code starts, and comprises the code that relates to program circuit redirect in the guard method of this firmware.
If the CRC check of calculating and with default CRC check and inconsistent, judge that firmware code content is tampered, program stops operation, wireless meter-reading module quits work;
If the CRC check of calculating with precalculated CRC check and consistent, read the hardware characteristics information of wireless meter-reading module, by calculating, produce feature key; That in the present embodiment, the controller of wireless meter-reading module adopts is STM32F103C8T6, and each chip of this single-chip microcomputer has 96 unique bit sequence number, and this sequence number is setting and immutable when dispatching from the factory.Read after this sequence number, first they be divided into 12 bytes, then calculate these 12 byte datas CRC check and, CRC check and be 2 bytes, obtains 2 bytes by these 12 bytes as cumulative sum in addition.The CRC check of such 2 bytes and, the cumulative sum of 2 bytes formed the feature key of 4 bytes.In described firmware code, existing feature key is the data of N byte, is dispersed in the different address spaces of firmware code.The feature key of the present embodiment is 4 bytes, disperses to be stored in firmware code.
If key wiring method preset in firmware code does not have deleted, key wiring method writes the feature key of generation in firmware code, cover existing feature key in firmware code, then this key wiring method is deleted to the meter reading procedure that enters wireless meter-reading module; Described key wiring method is the one section of code having in firmware self firmware code read-write operation function, can be deleted separately, and does not affect other firmware code functions.
If key wiring method preset in firmware code is deleted, existing feature key comparison in the feature key calculating being produced and firmware code, key agreement enters the meter reading procedure of wireless meter-reading module, otherwise program stops operation, and wireless meter-reading module quits work.

Claims (5)

1. for a firmware guard method for electric energy meter wireless meter-reading module, it is characterized in that, comprise the following steps:
Calculate critical code section in the firmware code of electric energy meter wireless meter-reading module CRC check and, with CRC check default in firmware code with make comparisons;
If the CRC check of calculating and with default CRC check and inconsistent, judge that firmware code content is tampered, wireless meter-reading module quits work;
If the CRC check of calculating and the CRC check with default and consistent, read the hardware characteristics information of wireless meter-reading module, by calculating, produce feature key;
If key wiring method preset in firmware code does not have deleted, key wiring method writes the feature key of generation in firmware code, cover existing feature key in firmware code, then this key wiring method is deleted to the meter reading procedure that enters wireless meter-reading module;
If key wiring method preset in firmware code is deleted, existing feature key comparison in the feature key calculating being produced and firmware code, key agreement enters the meter reading procedure of wireless meter-reading module, otherwise wireless meter-reading module quits work.
2. a kind of firmware guard method for electric energy meter wireless meter-reading module according to claim 1, is characterized in that, described critical code section is the 2K syllabified code that firmware code starts, and comprises the code that relates to program circuit redirect in the guard method of this firmware.
3. a kind of firmware guard method for electric energy meter wireless meter-reading module according to claim 1, is characterized in that, described hardware characteristics information comprises the sequence code that controller chip that wireless meter-reading module is used has.
4. a kind of firmware guard method for electric energy meter wireless meter-reading module according to claim 1; it is characterized in that; described key wiring method is the one section of code having in firmware self firmware code read-write operation function, can be deleted separately, and does not affect other firmware code functions.
5. a kind of firmware guard method for electric energy meter wireless meter-reading module according to claim 1, is characterized in that, in described firmware code, existing feature key is the data of N byte, is dispersed in the different address spaces of firmware code.
CN201210363890.3A 2012-09-26 2012-09-26 Firmware protection method for wireless meter reading module of electric energy meter Active CN103685212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210363890.3A CN103685212B (en) 2012-09-26 2012-09-26 Firmware protection method for wireless meter reading module of electric energy meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210363890.3A CN103685212B (en) 2012-09-26 2012-09-26 Firmware protection method for wireless meter reading module of electric energy meter

Publications (2)

Publication Number Publication Date
CN103685212A true CN103685212A (en) 2014-03-26
CN103685212B CN103685212B (en) 2017-04-12

Family

ID=50321538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210363890.3A Active CN103685212B (en) 2012-09-26 2012-09-26 Firmware protection method for wireless meter reading module of electric energy meter

Country Status (1)

Country Link
CN (1) CN103685212B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491289A (en) * 2018-03-22 2018-09-04 北京顶象技术有限公司 Firmware guard method and device
CN109657425A (en) * 2018-12-10 2019-04-19 积成电子股份有限公司 A kind of scene protection method of electric energy list procedure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000649A (en) * 2006-12-22 2007-07-18 重庆广惠科技有限公司 Separate computer software protector and applied software protection method
CN101425219A (en) * 2007-10-29 2009-05-06 吉林市曼博科技有限公司 Intelligent telemetering electric meter based on wireless sensor network
CN102236765A (en) * 2010-04-30 2011-11-09 深圳市合信自动化技术有限公司 Method and device for protecting programmable logic controller (PLC) safely

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000649A (en) * 2006-12-22 2007-07-18 重庆广惠科技有限公司 Separate computer software protector and applied software protection method
CN101425219A (en) * 2007-10-29 2009-05-06 吉林市曼博科技有限公司 Intelligent telemetering electric meter based on wireless sensor network
CN102236765A (en) * 2010-04-30 2011-11-09 深圳市合信自动化技术有限公司 Method and device for protecting programmable logic controller (PLC) safely

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491289A (en) * 2018-03-22 2018-09-04 北京顶象技术有限公司 Firmware guard method and device
CN109657425A (en) * 2018-12-10 2019-04-19 积成电子股份有限公司 A kind of scene protection method of electric energy list procedure

Also Published As

Publication number Publication date
CN103685212B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
CN204514991U (en) A kind of intelligent electric meter
CN204287315U (en) Based on the power monitoring system of STM32F103 microcontroller
CN102831756A (en) Mobile terminal positioning electric utility meter reading method and meter reading system
CN105021221A (en) Distributed multi-terminal concurrent data acquisition and analysis system
CN102185747A (en) Automatic remote meter reading system
CN103685212A (en) Firmware protection method for wireless meter reading module of electric energy meter
CN103810077A (en) Integrated intelligent monitoring system for leads
CN116303481B (en) Storage method, device, equipment and storage medium for fault wave recording data
CN206300696U (en) A kind of photo-electronic directly reading gas meter controller based on LoRa spread spectrum technics
CN104765302A (en) Detection device for power supply system of substation routing inspection device
CN107884653B (en) Electricity inspection equipment for extensible module
CN106443224A (en) Lightning arrester resistive current testing sensor
CN205450107U (en) Radio communication's electricity inspection terminal
CN203012949U (en) Novel field electricity meter acquiring system
CN204203382U (en) The uneven remote monitoring circuit of threephase load
CN202304874U (en) Thermotechnical type energy efficiency data acquisition terminal
CN205038645U (en) Ammeter with fingerprint authentication function
CN201060514Y (en) Three-phase smart card type electric energy meter for farm irrigation
Li et al. Remote Monitoring and Management System of CNG Flow based on Modbus RTU Protocol.
CN203573334U (en) Seal identification hand-held terminal
CN205247610U (en) Long -range device of checking meter of distributing type
CN205404677U (en) Electricity inspection terminal with real -time clock
CN202059433U (en) Remote meter reading system
CN203596055U (en) Digital information feedback system assembly for electric power measurement
CN203672928U (en) Novel guide rail type three-phase power meter hardware platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant