CN109947439B - Firmware updating method for closed storage device - Google Patents

Firmware updating method for closed storage device Download PDF

Info

Publication number
CN109947439B
CN109947439B CN201711353533.8A CN201711353533A CN109947439B CN 109947439 B CN109947439 B CN 109947439B CN 201711353533 A CN201711353533 A CN 201711353533A CN 109947439 B CN109947439 B CN 109947439B
Authority
CN
China
Prior art keywords
application program
memory
storage device
program
electronic device
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
CN201711353533.8A
Other languages
Chinese (zh)
Other versions
CN109947439A (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.)
Coolbitx Ltd
Original Assignee
Coolbitx 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 Coolbitx Ltd filed Critical Coolbitx Ltd
Priority to CN201711353533.8A priority Critical patent/CN109947439B/en
Publication of CN109947439A publication Critical patent/CN109947439A/en
Application granted granted Critical
Publication of CN109947439B publication Critical patent/CN109947439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a firmware updating method of a closed storage device, which comprises the following steps: connecting an electronic device to a closed storage device internally provided with two memories and a start loader, wherein one memory is provided with a first application program preset as a start program; the electronic device loads a second application program, and when the closed storage device detects the second application program, the memory stored with the first application program is converted into a locking mode; the electronic device transmits the second application program to another memory, so that the second application program is written into the other memory for updating, and then the start loader sets the second application program as a start program for subsequent operation and execution of the closed storage device.

Description

Firmware updating method for closed storage device
Technical Field
The present invention relates to a firmware update method, and more particularly, to a firmware update method capable of switching one of memories to a locked state in which updating is not possible after detecting different applications, and writing a new version of an application into another memory for updating.
Background
With the advance of technology, many transaction and payment methods are replaced by Integrated Circuit (IC) cards, for example, credit cards, financial cards, telephone cards, value cards, etc. are all common IC cards, and the IC cards generally used are classified into three types, i.e. contact type interface, non-contact type interface and composite type interface, according to the method of storing and reading data.
The IC card with contact interface is used to access data by metal contact, such as general chip financial card, etc., and the IC card with non-contact interface is used to access data by induction, such as value-storing card or electronic money bag suitable for mass transportation vehicles, etc. since various types of cards are available on the market, the IC card with composite interface is also developed to integrate various functions with different requirements, such as credit card, financial card, electronic money bag, value-storing card, etc., into a single IC card, so that the user can enjoy diversified services only by holding a single card.
IC cards commonly used today have a microprocessor and a memory, which has an application program that can be executed by the microprocessor, when a program error (Bug) occurs or a program performance improvement is required, the firmware of the application program needs to be updated, when the application program usually performs firmware update, it usually transmits a new version of firmware Image File (Image) to the memory through a physical transmission medium (e.g., a flash drive, a compact disc, a memory card …, etc.) or through an internet transmission Protocol (e.g., a hypertext Transfer Protocol (HTTP), a simple File Transfer Protocol (TFTP) …, etc.), and updating the application program by the last internal memory according to the new firmware image file, so that the application program is converted into an updated application program.
However, when the memory updates the new firmware image file and fails to update, the updated application program lacks part of the program code, so that the microprocessor cannot execute the updated application program, and the IC card cannot operate smoothly, so that the memory can be updated again according to the new firmware image file in order to enable the IC card to operate smoothly, but in a serious situation, the IC card must be reset, the application program is restored to the original state, and the updating operation is performed again, thereby causing inconvenience in use.
Disclosure of Invention
The main purpose of the present invention is to alternately replace and update two different versions of application programs in a closed storage device, so that when a new version of application program fails to perform a transaction due to a program error during running, a boot loader can set an old version of application program as a boot program to perform a transaction, thereby avoiding the situation that the closed storage device fails to perform a transaction.
The secondary objective of the present invention is to start the loader to execute another application program when one of the application programs fails to operate due to update failure, so that the closed storage device can still perform transaction operations, thereby avoiding the situation that the closed storage device cannot perform transaction due to update failure or the application program needs to be returned to the original state, and achieving the purpose of facilitating the use of the closed storage device.
To achieve the above object, the present invention relates to a firmware updating method for a closed storage device, comprising the following steps: providing an electronic device network connection to a closed storage device, wherein the closed storage device has a boot loader, a first memory and a second memory, the boot loader sets a first application program stored in the first memory as a boot program and can execute the first application program, however, the electronic device loads a second application program with a version different from that of the first application program, so that the electronic device detects that the version of the first application program is different from that of the second application program, and then the electronic device switches the first memory to a locked state in which program updating is not possible.
The electronic device transmits the second application program and an electronic signature to the boot loader, the boot loader transmits the second application program to the second memory, and transmits the electronic signature to a security chip located inside the closed storage device, wherein when the first application program is stored in both the first memory and the second memory, the electronic device switches one of the first memory and the second memory to the locked state, so that the boot loader transmits the second application program to the other of the first memory and the second memory.
Finally, the second application program is written into the second memory for updating, so that the boot loader sets the second application program as a boot program and executes the second application program, wherein when the second application program is written into the second memory and the updating is completed, the second memory forms characteristic value information transmitted to the boot loader, the boot loader stores the characteristic value information and transmits the characteristic value information to the security chip, so that the boot loader calculates the electronic signature transmitted from the electronic device to the closed storage device through the characteristic value information, and the security chip verifies that the calculated electronic signature passes through the characteristic value information, and when the second memory fails to update the second application program, in this embodiment, when the security chip stores the characteristic value information and the electronic signature, the boot loader sets the second application program as a boot program.
The invention is characterized in that before updating, the electronic device detects that the version of the first program is different from that of the second application program, so that the electronic device switches the memory which is provided with the first application program into a locking state which can not be updated, the start loader writes the second application program into another memory for updating, and the start loader designates the second application program as the start program, therefore, the closed storage device has two application programs (the first application program and the second application program) with different versions, and updates aiming at the two application programs in turn, so that when the second application program has program errors during operation and can not carry out transaction, the start loader can set the first application program as the start program for transaction, and further, the condition that the closed storage device can not carry out transaction can be avoided.
In addition, when the second application program fails to be updated and cannot run, the boot loader can designate the first application program as the boot program to perform the transaction, so that the situation that the closed storage device cannot perform the transaction or the application program needs to be returned to the original state due to the failure of updating can be avoided, and the purpose of facilitating the transaction of the closed storage device can be achieved.
Drawings
FIG. 1 is a flowchart illustrating a firmware updating method for a closed storage device according to the present invention;
FIG. 2 is a block diagram of a firmware update apparatus;
FIG. 3 is a schematic flow chart illustrating the steps from the forecast updating step to the executing step;
FIG. 4 is a schematic diagram of the preliminary update step of FIG. 1;
FIG. 5 is a schematic diagram of the preliminary verification step of FIG. 1;
fig. 6 is a schematic diagram of the comparison transmission step in fig. 1.
Description of reference numerals: 1-firmware update method; 2-firmware updating means; 20-an electronic device; 201-application software; 21-a closed storage device; 211-a microprocessor; 211 a-a first memory; 211 b-a second memory; 211c — boot loader; 212-a security chip; 212 a-a processing unit; 22-the internet; s1-prepare the step of renewal; s2-locking step; s3-a transmission step; s4-updating step; s5-executing step.
Detailed Description
The invention will be further described with reference to specific embodiments and drawings, the advantages and features of which will become apparent as the description proceeds.
Referring to fig. 1 and fig. 2, a firmware updating method 1 of a closed storage device according to the present invention is used with a firmware updating device 2, the firmware updating device 2 has an electronic device 20 and a closed storage device 21, the electronic device 20 is installed with an application 201, wherein the electronic device 20 can be a mobile phone, a computer or a tablet.
The closed storage device 21 can be selectively connected or disconnected to the electronic device 20 through a network, bluetooth or infrared ray, so that the closed storage device 21 can be connected or disconnected to the application 201 through the electronic device 20, and the closed storage device 21 has a microprocessor 211 and a security chip 212, the microprocessor 211 has a first memory 211a, a second memory 211b and a boot loader 211c, the microprocessor 211 is electrically connected to the security chip 212, the first memory 211a stores a first application program, furthermore, the security chip 212 has a processing unit 212a, wherein the boot loader 211c sets the first application program as a boot program and can execute the first application program for transaction, furthermore, when the application 201 is installed in the electronic device 20, the application 201 displays an electronic signature on a touch screen of the electronic device 20, when the application 201 is initially connected to the closed storage device 21, the application 201 of the electronic device 20 stores the electronic signature in the security chip 212, wherein the electronic signature stored in the security chip 212 is used as information for determining whether to check whether to perform a transaction or update the software.
Referring to fig. 1, 3 and 4, when the closed storage device 21 is about to be updated, the electronic device 20 is connected to the internet 22 and is simultaneously connected to the closed storage device 21, and the electronic device 20 downloads a second application program with a different version from the first application program from the internet 22, and when the electronic device 20 stores the second application program, a preliminary update step S1 is completed.
Referring to fig. 1, 3 and 5, after the pre-update step S1 is completed, a locking step S2 is performed, when the second application program is stored in the electronic device 20, the application 201 of the electronic device 20 obtains a first version serial number and a second version serial number with a serial number different from the first version serial number according to the first application program and the second application program, so that the application 201 detects that the version of the first application program is older than that of the second application program, and further the application 201 forms a locking message transmitted to the first memory 211a, and the first memory 211a switches to a locking state in which program update is impossible, and then a user performs on a touch screen of the electronic device 20 to form an electronic signature, where the electronic signature is used to authorize update information.
Referring to fig. 1, fig. 3 and fig. 6, a transmission step S3 is performed next, in which the electronic device 20 transmits the second application program and the electronic signature for authorizing updating to the boot loader 211c of the enclosed storage device 21, and since the first memory 211a is in the locked state, the boot loader 211c can transmit the second application program to the second memory 211b and transmit the electronic signature to the security chip 212.
In this embodiment, since the first application program is only stored in the first memory 211a and not stored in the second memory 211b, after the electronic device 20 loads the second application program from the internet 22, the electronic device 20 switches the first memory 211a to the locked state, and then transfers the second application program to the second memory 211b, but if both the first and second memories 211a and 211b store the first application program, when the electronic device 20 loads the second application program from the internet 22, the application software 201 of the electronic device 20 may selectively switch one of the first and second memories 211a and 211b to the locked state, and then transfer the second application program to the other of the first and second memories 211a and 211 b.
As shown in the figure, after the second memory 211b receives the second application program, when the security chip 212 receives the electronic signature for authorizing updating, the security chip 212 compares the electronic signature for authorizing updating with the electronic signature stored in the security chip 212, and when the electronic signature for authorizing updating and the electronic signature stored in the security chip 212 are in agreement, the second application program is written into the second memory 211b, so that the second memory 211b stores the second application program, thereby completing an updating step S4, otherwise, when the electronic signature for authorizing updating and the electronic signature stored in the security chip 212 are not in agreement, the second application program cannot be written into the second memory 211b, so that the second memory 211b cannot store the second application program, and the updating step S4 cannot be completed.
When the updating step S4 is completed, the second memory 211b forms a feature value information transmitted to the boot loader 211c, and the boot loader stores the feature value information and transmits the feature value information to the security chip 212, so that the security chip 212 stores the feature value information, at this time, the security chip 212 stores the feature value information and the electronic signature, and the boot loader 211c sets the second application program as a boot program, wherein the feature value information is an operation method capable of performing operations and verification on information, and in this embodiment, the feature value information is set as a hash function.
After the updating step S4 is completed, an executing step S5 is performed, in which when a transaction is to be performed, the user inputs transaction information (e.g., transaction account of buyer and seller, amount of purchase of buyer, and amount of sale of seller) through the electronic device 20 and inputs the transaction information on the touch screen of the electronic device 20 to form the electronic signature, at this time, the electronic signature is information for authorizing the transaction and is verified with the electronic signature stored in the security chip 212, then the electronic device 20 transmits the transaction information and the electronic signature for authorizing the transaction to the closed storage device 21, and the microprocessor 211 executes the second application program, so that the boot loader 211c of the microprocessor 211 calculates the electronic signature for authorizing the transaction through the characteristic value information and transmits the calculated electronic signature to the security chip 212, at this time, the processing unit 212a of the security chip 212 verifies the calculated electronic signature according to the characteristic value information, wherein when the security chip 212 verifies that the electronic signature stored inside is identical to the electronic signature authorized to perform the transaction, a digital asset is transferred to complete the transaction.
However, when the second application cannot be written into the second memory 211b, the boot loader 211c sets the first application as a boot program, so that the microprocessor 211 executes the first application to perform a transaction.
The foregoing description and examples are exemplary only, and are not intended to limit the scope of the invention in any way. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention, and that such changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (2)

1. A firmware updating method for a closed storage device is characterized by comprising the following steps:
providing an electronic device network connection to a closed storage device, wherein the closed storage device is provided with a boot loader, a first memory and a second memory, the boot loader sets a first application program stored in the first memory as a boot program and can execute the first application program, and the electronic device is provided with a second application program with a version different from that of the first application program;
the electronic device detects that the version of the first application program is different from that of the second application program, and then the first memory is switched to a locking state in which program updating cannot be carried out;
the electronic device transmits the second application program and an electronic signature to the boot loader, and the boot loader transmits the second application program to the second memory and transmits the electronic signature to a security chip located inside the closed storage device;
writing the second application program into the second memory for updating, setting the second application program as a starting program by the starting loader, and executing the second application program;
when the second application program is written into the second memory and updated, the second memory forms characteristic value information which is transmitted to the boot loader, the boot loader stores the characteristic value information and transmits the characteristic value information to the security chip, so that the boot loader calculates the electronic signature transmitted to the closed storage device by the electronic device through the characteristic value information, and the security chip verifies that the calculated electronic signature passes through the characteristic value information;
when the second memory fails to update the second application program, the boot loader sets the first application program as a boot program and executes the first application program.
2. The firmware updating method of the enclosed storage apparatus according to claim 1, wherein: when the first application program is stored in both the first memory and the second memory, the electronic device switches one of the first memory and the second memory to the locked state, so that the boot loader transfers the second application program to the other of the first memory and the second memory.
CN201711353533.8A 2017-12-15 2017-12-15 Firmware updating method for closed storage device Active CN109947439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711353533.8A CN109947439B (en) 2017-12-15 2017-12-15 Firmware updating method for closed storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711353533.8A CN109947439B (en) 2017-12-15 2017-12-15 Firmware updating method for closed storage device

Publications (2)

Publication Number Publication Date
CN109947439A CN109947439A (en) 2019-06-28
CN109947439B true CN109947439B (en) 2022-04-08

Family

ID=67004872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711353533.8A Active CN109947439B (en) 2017-12-15 2017-12-15 Firmware updating method for closed storage device

Country Status (1)

Country Link
CN (1) CN109947439B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452689A (en) * 2007-12-04 2009-06-10 佳世达科技股份有限公司 Firmware updating system for updating display firmware and method thereof
TW201025008A (en) * 2008-12-31 2010-07-01 Askey Computer Corp System of updating firmware and method thereof, and method of creating firmware
CN101770372A (en) * 2008-12-31 2010-07-07 亚旭电脑股份有限公司 Firmware update system, method and building method of firmware of firmware update system
CN101807154A (en) * 2009-02-16 2010-08-18 技嘉科技股份有限公司 Electronic device and starting method thereof
CN103136010A (en) * 2011-11-25 2013-06-05 环旭电子股份有限公司 Firmware update method and firmware update device capable of being used by firmware update method
TW201617861A (en) * 2014-11-04 2016-05-16 創見資訊股份有限公司 Firmware updating method and electronic apparatus using the same
CN105988844A (en) * 2015-03-02 2016-10-05 营邦企业股份有限公司 Control module of endpoint server and firmware update method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6360362B1 (en) * 1998-02-20 2002-03-19 Intel Corporation Automatic update of camera firmware
US7305544B2 (en) * 2004-12-10 2007-12-04 Intel Corporation Interleaved boot block to support multiple processor architectures and method of use
US9053323B2 (en) * 2007-04-13 2015-06-09 Hewlett-Packard Development Company, L.P. Trusted component update system and method
US9881161B2 (en) * 2012-12-06 2018-01-30 S-Printing Solution Co., Ltd. System on chip to perform a secure boot, an image forming apparatus using the same, and method thereof
JP5907937B2 (en) * 2013-09-11 2016-04-26 京セラドキュメントソリューションズ株式会社 Embedded system
US10349631B2 (en) * 2014-07-21 2019-07-16 Nicholas Jay Bonge, JR. Wireless animal training, monitoring and remote control system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452689A (en) * 2007-12-04 2009-06-10 佳世达科技股份有限公司 Firmware updating system for updating display firmware and method thereof
TW201025008A (en) * 2008-12-31 2010-07-01 Askey Computer Corp System of updating firmware and method thereof, and method of creating firmware
CN101770372A (en) * 2008-12-31 2010-07-07 亚旭电脑股份有限公司 Firmware update system, method and building method of firmware of firmware update system
CN101807154A (en) * 2009-02-16 2010-08-18 技嘉科技股份有限公司 Electronic device and starting method thereof
CN103136010A (en) * 2011-11-25 2013-06-05 环旭电子股份有限公司 Firmware update method and firmware update device capable of being used by firmware update method
TW201617861A (en) * 2014-11-04 2016-05-16 創見資訊股份有限公司 Firmware updating method and electronic apparatus using the same
CN105988844A (en) * 2015-03-02 2016-10-05 营邦企业股份有限公司 Control module of endpoint server and firmware update method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Attribute-based Reliable Multicast-over-Broadcast Protocol for Firmware Updates in Smart Meter Networks;Samet Tonyali;《2017 IEEE Conference on Computer Communications Workshops》;20171123;第97-102页 *
用串行方式实现微小型导航计算机应用软件的快速更新研究;李荣冰等;《小型微型计算机系统》;20050921;第26卷(第9期);第1657-1660页 *

Also Published As

Publication number Publication date
CN109947439A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
US8910868B1 (en) Firmware management
CN106357600B (en) Card registration method for payment services and mobile electronic device implementing the method
US10147077B2 (en) Financial transaction method and system having an update mechanism
TWI567669B (en) Method and system for managing multiple electronic user wallet data cards
US20170061419A1 (en) Payment information processing method and apparatus of electronic device
US11762646B2 (en) Securely updating software on connected electronic devices
TW200540671A (en) Money terminal processing server, money terminal processing method, money terminal, calculation instruction input device, and price modification information input device
US10459714B2 (en) Method of updating firmware of closed storage device
CN113128996B (en) Payment method, device and equipment
CN109947439B (en) Firmware updating method for closed storage device
JP6473527B1 (en) Software update method for closed storage device
US9852412B1 (en) Extensible timer for chip card communications
TWM590733U (en) Virtual electronic ticket card transaction system
US10146644B2 (en) Integrity of transactional memory of card computing devices in case of card tear events
TWI637322B (en) Method of updating firmware of closed storage device
JP5754287B2 (en) IC chip, processing method in IC chip, UIM, portable terminal, and processing program for IC chip
KR102064660B1 (en) Method of updating firmware of closed storage device
KR20200141407A (en) Method for calling payment application for easy payment and apparatus therefor
TWI646481B (en) Pairing authentication method for electronic transaction device
RU2696885C2 (en) Method of transmitting extended data set from contactless payment device to terminal
JP2006119902A (en) Portable electronic apparatus and operating system for portable electronic apparatus
KR101705404B1 (en) Card registeration system by contacting card and operating method thereof
TWI761688B (en) Application method of transaction system of virtual electronic ticket card
CN110119946B (en) Pairing authentication method for electronic transaction device
KR101714140B1 (en) Method of issuing card and system performing the same

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
GR01 Patent grant
GR01 Patent grant