CN113850092A - Card reader, system and test method supporting smart card power-off test - Google Patents

Card reader, system and test method supporting smart card power-off test Download PDF

Info

Publication number
CN113850092A
CN113850092A CN202110925624.4A CN202110925624A CN113850092A CN 113850092 A CN113850092 A CN 113850092A CN 202110925624 A CN202110925624 A CN 202110925624A CN 113850092 A CN113850092 A CN 113850092A
Authority
CN
China
Prior art keywords
smart card
card
power
unit
upper computer
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
CN202110925624.4A
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.)
Beijing WatchSmart Technologies Co Ltd
Original Assignee
Beijing WatchSmart Technologies 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 Beijing WatchSmart Technologies Co Ltd filed Critical Beijing WatchSmart Technologies Co Ltd
Priority to CN202110925624.4A priority Critical patent/CN113850092A/en
Publication of CN113850092A publication Critical patent/CN113850092A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0095Testing the sensing arrangement, e.g. testing if a magnetic card reader, bar code reader, RFID interrogator or smart card reader functions properly

Abstract

The invention relates to a card reader, a system and a test method supporting smart card power-off test, belonging to the technical field of smart cards, wherein the method comprises the following steps: the upper computer sends a power-off configuration instruction, and the MCU stores configuration parameters and responds to the upper computer; the card communication thread transparently transmits an instruction to be tested to the card, and a timer is started after the transmission is finished; the timer judges whether a preset value of the configuration parameters is reached, if so, the card is powered off, and the card communication thread is informed of being powered off; the card communication thread circularly judges whether the power is off or not and whether the card has response data or not, and if the power is off, the power is returned to the upper computer; if the card is judged to have the response data, the timer is stopped, and the response data is returned to the upper computer after being received; and the upper computer continues to perform the test process according to the response result. The card reader, the system and the test method provided by the invention can realize accurate positioning, have continuous test flow, support the common smart card communication protocol and meet most test requirements.

Description

Card reader, system and test method supporting smart card power-off test
Technical Field
The invention belongs to the technical field of intelligent cards, and particularly relates to a card reader, a system and a test method supporting intelligent card power-off test.
Background
Smart cards have been widely used in various industries around the world due to their portability and ease of use. In order to ensure the working stability of the smart card, smart card manufacturers need to carry out various tests on the card, wherein the power-off test is an important test item, and the abnormal power-off condition of the smart card in the use process is simulated. The abnormal power failure in the use process of the card can cause the program confusion or data abnormity of the intelligent card, influence the normal use of the card and cause dangerous transaction when the normal use is serious.
At present, smart card readers and writers supporting power-off test functions in the market are few, and most of the power-off functions in the prior art are simulated by upper computer software or simply powered off at regular time, so that the accuracy in time and test flow cannot be achieved.
The simple timing power-off process comprises the following steps: starting a timer to time for a fixed time before a test process; starting a normal communication test flow; powering off the card immediately after the timing time is up; and modifying the timing time of the timer, and repeating the process. The technology cannot achieve accurate positioning (relative test command) regularly, and only can perform coverage test at multiple time points, so that the test efficiency is influenced; meanwhile, the card is powered off immediately after the timing time, the data return state of the card cannot be judged, and the test flow cannot be continuous.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a card reader, a system and a test method for supporting the power-off test of a smart card, which can realize accurate positioning, have continuous test flow, support the communication protocol of the common smart card and meet most test requirements.
According to a first aspect, an embodiment of the present invention provides a card reader supporting a smart card power-off test, including an MCU unit, a smart card interface unit, and an upper computer communication interface unit, where the upper computer communication interface unit is connected to the MCU unit, and data exchange between the MCU unit and an upper computer is implemented through the upper computer communication interface unit;
an intelligent card driving unit is arranged between the MCU unit and the intelligent card interface unit, and data exchange between the MCU unit and the intelligent card is realized through the intelligent card driving unit and the intelligent card interface unit;
the reader-writer further comprises a power management unit which is respectively connected with the upper computer communication interface unit, the MCU unit and the smart card driving unit, and the MCU unit realizes the power-on and power-off of the smart card through the power management unit.
Further, as for the card reader supporting the smart card power-off test, the MCU unit includes a card communication thread and a timer, the card communication thread is responsible for data interaction with the smart card and the host computer, and the timer is used to assist in implementing the power-off function.
Further, the card reader supporting the smart card power-off test as described above, the types of the smart card include a contact smart card, a contactless smart card, and a PSAM card.
Further, the card reader supporting smart card power-off test as described above, the smart card interface unit includes a contact smart card interface unit, a contactless smart card interface unit and a PSAM card interface unit.
Further, the card reader supporting the smart card power-off test as described above, the smart card driving unit includes a level converting unit and an NFC interface chip unit, wherein,
the level conversion unit is connected with the contact type intelligent card interface unit to realize data exchange between the MCU unit and the contact type intelligent card;
the NFC interface chip unit is connected with the non-contact smart card interface unit to realize data exchange between the MCU unit and the non-contact smart card;
the MCU unit is directly connected with the PSAM interface unit to realize data exchange between the MCU unit and the PSAM card.
According to a second aspect, an embodiment of the present invention provides a smart card power-off test system, including an upper computer, a smart card reader, and a smart card, where the smart card reader is the card reader described in any one of the first aspect or the first aspect, the smart card reader is connected to the upper computer through an upper computer communication interface unit, the smart card is connected to the smart card reader through a corresponding interface unit of the smart card reader, and the upper computer is configured to send a power-off configuration instruction and a test instruction to the smart card reader, and receive a response of the smart card reader.
According to a third aspect, an embodiment of the present invention provides a smart card power-off test method, where the method is based on the card reader described in any implementation manner of the first aspect, and the method includes the following steps:
the method comprises the steps that an upper computer sends a power-off configuration instruction containing power-off configuration parameters to a smart card reader, and an MCU (microprogrammed control unit) of the smart card reader stores the power-off configuration parameters and responds to the upper computer;
the upper computer sends a to-be-tested instruction for testing the outage performance to the MCU after receiving the response of the MCU, a card communication thread of the MCU transparently transmits the to-be-tested instruction to the smart card, and the MCU starts a timer after the transparent transmission is finished;
the timer judges whether the power-off configuration parameters are reached, if so, the power management unit of the smart card reader controls the smart card to power off and returns the result to the card communication thread;
the card communication thread circularly judges whether the smart card is powered off and whether the smart card has response data, and if the smart card is powered off, the powered off is returned to the upper computer; if the smart card is judged to have response data, stopping timing of the timer, and returning a result to the upper computer after the response data are received;
and the upper computer continues to perform a test process according to the response result.
Compared with the prior art, the invention has the beneficial effects that: the card reader, the system and the test method supporting the power-off test of the intelligent card can realize accurate positioning through the power-off configuration instruction, the timing precision is 1us, the timing error is less than 1%, and the test process is continuous; and the method supports the common smart card communication protocol and meets most test requirements.
Drawings
FIG. 1 is a schematic diagram of a card reader supporting smart card power-off test according to the present invention;
FIG. 2 is a flowchart of a smart card power-off test method according to the present invention;
fig. 3 is an implementation mechanism of the smart card power-off test method provided by the present invention.
Detailed Description
In order to make the technical problems solved, the technical solutions adopted, and the technical effects achieved by the present invention clearer, the technical solutions of the embodiments of the present invention will be further described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Fig. 1 is a schematic diagram illustrating an architecture of a reader/writer supporting a smart card power-off test according to an embodiment of the present invention, and as can be seen from the diagram, the reader/writer includes:
the intelligent card comprises an MCU unit 100, a smart card interface unit 200 and an upper computer communication interface unit 300, wherein the upper computer communication interface unit 300 is connected with the MCU unit 100, and data exchange between the MCU unit 100 and an upper computer is realized through the upper computer communication interface unit 300.
A smart card driving unit 400 is disposed between the MCU unit 100 and the smart card interface unit 200, and data exchange between the MCU unit 100 and the smart card is achieved through the smart card driving unit 400 and the smart card interface unit 200.
The type of smart card may be a contact smart card, a contactless smart card, or a PSAM card.
In order to accommodate different types of smart cards, the smart card interface unit 200 is provided with a contact smart card interface unit 201, a contactless smart card interface unit 202, and a PSAM card interface unit 203, accordingly.
In order to drive different types of smart card interface units, the smart card driving unit 400 is provided with a level conversion unit 401 and an NFC interface chip unit 402, respectively, wherein,
the MCU unit 100 is connected to the contact smart card interface unit 201 through the level shifter unit 401, so as to exchange data between the MCU unit 100 and the contact smart card. The contact smart card interface unit 201 is used for bearing a contact smart card, and the supported communication protocols include 7816, GP-SPI/I2C and the like; the level shifter unit 401 supports contact smart cards with different voltage ranges (5V/3V/1.8V).
The MCU unit 100 is connected to the contactless smart card interface unit 202 through the NFC interface chip unit 402, so as to exchange data between the MCU100 unit and the contactless smart card. The contactless smart card interface unit 202 is used to carry a contactless smart card and supports communication protocols including 14443-a/B and the like.
The MCU unit 100 is directly connected to the PSAM card interface unit 203, so as to realize data exchange between the MCU unit 100 and the PSAM card.
The smart card reader-writer further comprises a power management unit 500, which is respectively connected with the upper computer communication interface unit 300, the MCU unit 100 and the level conversion unit 401, and provides power for the whole card reader. The MCU100 realizes power-on and power-off control of the smart card through the power management unit 500.
The MCU unit 100 adopts a dual-thread data processing technology, including a card communication thread and a timer, where the card communication thread is responsible for data interaction with the smart card, and the timer is used to assist in implementing a power-off function.
Based on the smart card reader, the embodiment of the invention provides a smart card power-off test system, which comprises an upper computer, a smart card reader and a smart card, wherein the smart card reader is the card reader in any embodiment, the smart card reader is connected with the upper computer through an upper computer communication interface unit, the smart card is connected with the smart card reader through a corresponding interface unit of the smart card reader, and the upper computer is used for sending a power-off configuration instruction and a test instruction to the smart card reader and receiving the response of the smart card reader.
Based on the smart card reader, the embodiment of the present invention further provides a smart card power-off test method, as shown in fig. 2 and 3, the method mainly includes the following steps:
and S1, the upper computer sends a power-off configuration instruction containing power-off configuration parameters to the smart card reader, and the MCU of the smart card reader stores the power-off configuration parameters and responds to the upper computer. This process does not involve any manipulation of the smart card.
And S2, after receiving the response of the MCU, the upper computer sends a to-be-tested instruction for testing the outage performance to the MCU, the card communication thread of the MCU transparently transmits the to-be-tested instruction to the smart card, and the MCU starts a timer after the transparent transmission is finished. The next instruction of the power-off configuration instruction is considered as a to-be-tested instruction for testing the power-off function by the MCU unit.
And S3, the timer judges whether the power-off configuration parameters are reached, if so, the power management unit of the smart card reader controls the smart card to power off and returns the result to the card communication thread.
S4, circularly judging whether the smart card is powered off and whether the smart card has response data by the card communication thread, and if the smart card is powered off, returning to the upper computer; and if the smart card has response data, stopping timing by the timer, and returning a result to the upper computer after the response data is received.
And S5, the upper computer continues to perform the test process according to the response result.
The card reader, the system and the test method supporting the power-off test of the intelligent card can realize accurate positioning through the power-off configuration instruction, the timing precision is 1us, the timing error is less than 1%, and the test process is continuous; and common smart card communication protocols such as 7816, 14443, GP-SPI/I2C and the like are supported, and most test requirements are met.
It will be understood by those skilled in the art that the present invention is not limited to the embodiments described in the detailed description, and the detailed description is for the purpose of explanation and not limitation. Other embodiments will be apparent to those skilled in the art from the following detailed description, which is intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A card reader supporting a smart card power-off test is characterized by comprising an MCU unit, a smart card interface unit and an upper computer communication interface unit, wherein the upper computer communication interface unit is connected with the MCU unit and used for realizing data exchange between the MCU unit and an upper computer;
an intelligent card driving unit is arranged between the MCU unit and the intelligent card interface unit, and data exchange between the MCU unit and the intelligent card is realized through the intelligent card driving unit and the intelligent card interface unit;
the reader-writer further comprises a power management unit which is respectively connected with the upper computer communication interface unit, the MCU unit and the smart card driving unit, and the MCU unit realizes the power-on and power-off of the smart card through the power management unit.
2. The card reader supporting the smart card power-off test as claimed in claim 1, wherein the MCU unit comprises a card communication thread and a timer, the card communication thread is responsible for data interaction with the smart card and the upper computer, and the timer is used for assisting in realizing a power-off function.
3. The card reader supporting smart card power-down testing as recited in claim 2 wherein the types of smart cards include contact smart cards, contactless smart cards, and PSAM cards.
4. The card reader supporting smart card power-off test as recited in claim 3 wherein the smart card interface unit comprises a contact smart card interface unit, a contactless smart card interface unit and a PSAM card interface unit.
5. The card reader supporting smart card power-off test as recited in claim 4, wherein the smart card driving unit includes a level conversion unit and an NFC interface chip unit, wherein,
the level conversion unit is connected with the contact type intelligent card interface unit to realize data exchange between the MCU unit and the contact type intelligent card;
the NFC interface chip unit is connected with the non-contact smart card interface unit to realize data exchange between the MCU unit and the non-contact smart card;
the MCU unit is directly connected with the PSAM interface unit to realize data exchange between the MCU unit and the PSAM card.
6. A smart card power-off test system is characterized by comprising an upper computer, a smart card reader and a smart card, wherein the smart card reader is the card reader in any one of claims 1 to 5, the smart card reader is connected with the upper computer through an upper computer communication interface unit, the smart card is connected with the smart card reader through a corresponding interface unit of the smart card reader, and the upper computer is used for sending a power-off configuration command and a test command to the smart card reader and receiving the response of the smart card reader.
7. A method for testing the power failure of a smart card based on a reader as claimed in any one of claims 1 to 5, comprising the steps of:
the method comprises the steps that an upper computer sends a power-off configuration instruction containing power-off configuration parameters to a smart card reader, and an MCU (microprogrammed control unit) of the smart card reader stores the power-off configuration parameters and responds to the upper computer;
the upper computer sends a to-be-tested instruction for testing the outage performance to the MCU after receiving the response of the MCU, a card communication thread of the MCU transparently transmits the to-be-tested instruction to the smart card, and the MCU starts a timer after the transparent transmission is finished;
the timer judges whether the power-off configuration parameters are reached, if so, the power management unit of the smart card reader controls the smart card to power off and returns the result to the card communication thread;
the card communication thread circularly judges whether the smart card is powered off and whether the smart card has response data, and if the smart card is powered off, the powered off is returned to the upper computer; if the smart card is judged to have response data, stopping timing of the timer, and returning a result to the upper computer after the response data are received;
and the upper computer continues to perform a test process according to the response result.
CN202110925624.4A 2021-08-12 2021-08-12 Card reader, system and test method supporting smart card power-off test Pending CN113850092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110925624.4A CN113850092A (en) 2021-08-12 2021-08-12 Card reader, system and test method supporting smart card power-off test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110925624.4A CN113850092A (en) 2021-08-12 2021-08-12 Card reader, system and test method supporting smart card power-off test

Publications (1)

Publication Number Publication Date
CN113850092A true CN113850092A (en) 2021-12-28

Family

ID=78975323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110925624.4A Pending CN113850092A (en) 2021-08-12 2021-08-12 Card reader, system and test method supporting smart card power-off test

Country Status (1)

Country Link
CN (1) CN113850092A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114942871A (en) * 2022-07-19 2022-08-26 北京紫光青藤微系统有限公司 NFC chip testing method and device, readable medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114942871A (en) * 2022-07-19 2022-08-26 北京紫光青藤微系统有限公司 NFC chip testing method and device, readable medium and electronic equipment

Similar Documents

Publication Publication Date Title
JP7200366B2 (en) Memory cards, memory card adapters and terminal devices
US8621568B2 (en) WAN module based remote wakeup system and terminal thereof
CN111027369B (en) Smart card with fingerprint sensing system and control method thereof
CN112800795B (en) Low-power-consumption card detection control system and method
CN102842154A (en) Power grid equipment polling device and polling method based on RFID (radio frequency identification)
EP1892645B1 (en) Smart card
CN113850092A (en) Card reader, system and test method supporting smart card power-off test
CN110245048B (en) Intelligent management system and management method for chassis
CN101673220B (en) Method for improving work parallelism of dual-interface SIM card
CN103412836A (en) Hot plug processing method, device and system
CN103064695A (en) Dynamic loading system of field-programmable gate array and loading method thereof
CN102915209B (en) Storage control chip, storage equipment and system data writing method
CN104111359A (en) Contact card reliability testing system
EP2367108A2 (en) Portable electronic device, communication device, and command processing method
CN105975382A (en) Hardware configuration change alarming method
US9655052B2 (en) Storage medium having stored communication program, information processing apparatus, communication system, and communication method
CN114564095A (en) Intelligent network card charging control system and server
CN111652008A (en) RFID card reading equipment, system, method, device and storage medium
CN114328044B (en) AIC+box topology testing method, device and system
CN212435680U (en) Multichannel radio frequency read-write equipment
CN108766487A (en) A kind of hard disk descends method for electrically, system, equipment and computer storage media extremely
CN110070149B (en) Operating system and operating method for performing parameter setting on a large number of electronic devices
CN217332726U (en) Automatic test system of MCU chip
CN201449603U (en) AMD platform main board for supporting dual-mode internal storage and automatically identifying CPU type
CN115665714B (en) Near field communication method and device, master control equipment, NFC chip and NFC 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