CN112904129A - Test equipment and test method for anti-pulling function - Google Patents

Test equipment and test method for anti-pulling function Download PDF

Info

Publication number
CN112904129A
CN112904129A CN202110108804.3A CN202110108804A CN112904129A CN 112904129 A CN112904129 A CN 112904129A CN 202110108804 A CN202110108804 A CN 202110108804A CN 112904129 A CN112904129 A CN 112904129A
Authority
CN
China
Prior art keywords
smart card
tested
instruction
module
main control
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
CN202110108804.3A
Other languages
Chinese (zh)
Other versions
CN112904129B (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.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202110108804.3A priority Critical patent/CN112904129B/en
Publication of CN112904129A publication Critical patent/CN112904129A/en
Application granted granted Critical
Publication of CN112904129B publication Critical patent/CN112904129B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The embodiment of the invention relates to the technical field of intelligent card testing, and discloses testing equipment and a testing method for an anti-pulling function of an intelligent card. Above-mentioned smart card prevents pulling out test equipment of function and is connected to the host computer, include: the device comprises a main control module, an interface module, a transmission module and a power supply module; the power supply module is respectively connected with the main control module and the interface module and is used for supplying power to the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting an intelligent card to be tested; the transmission module is connected the host system with between the host computer, host system is used for passing through transmission module receives the test instruction that is used for carrying out the anti-pulling test that the host computer sent, and passes through interface module is right the smart card that awaits measuring carries out the anti-pulling test for can reduce the cost that the test of accomplishing the smart card anti-pulling function needs, and reduce test equipment's volume.

Description

Test equipment and test method for anti-pulling function
Technical Field
The embodiment of the invention relates to the technical field of intelligent card testing, in particular to a testing device and a testing method for an anti-pulling function of an intelligent card.
Background
A Smart Card (Smart Card) is a generic term for a plastic Card (usually the size of a credit Card) with an integrated circuit chip embedded therein. At present, foreign intelligent card testing tools MP300 and other related products are generally adopted for testing the anti-pulling function of the intelligent card, but the MP300 series products are expensive, so that the cost required for completing the testing of the anti-pulling function of the intelligent card is higher, and the volume of the MP300 series products is larger.
Disclosure of Invention
The invention aims to provide a test device and a test method for an anti-pulling function of an intelligent card, so that the cost required for completing the test of the anti-pulling function of the intelligent card can be reduced, and the volume of the test device is reduced.
In order to solve the above technical problem, an embodiment of the present invention provides a test apparatus for an anti-unplugging function of a smart card, including: the device comprises a main control module, an interface module, a transmission module and a power supply module; the power supply module is respectively connected with the main control module and the interface module and is used for supplying power to the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting an intelligent card to be tested; the transmission module is connected host system with between the host computer, host system is used for passing through transmission module receives the test instruction that is used for carrying out the anti-pulling test that the host computer sent, and passes through interface module is right the smart card that awaits measuring carries out the anti-pulling test, wherein, test instruction does the host computer detects send behind the smart card that awaits measuring, test instruction includes: the second instruction is an instruction sent by the upper computer after the first instruction is sent; the main control module is used for identifying the power-down delay time length carried in the first instruction, sending the second instruction to the to-be-tested smart card through the interface module and starting timing after receiving the second instruction, and controlling the power-down of the to-be-tested smart card through the interface module after the timing time length reaches the power-down delay time length; the smart card to be tested responds to the second instruction after receiving the second instruction, and stops responding to the second instruction after power failure; the main control module is further used for controlling the smart card to be tested to be powered on through the interface module after the smart card to be tested is powered off, reading a response result of the smart card to be tested to the second instruction through the interface module, and determining whether the smart card to be tested has an anti-pulling function or not according to the response result.
The embodiment of the invention also provides a method for testing the anti-unplugging function of the intelligent card, which is applied to a main control module, wherein the main control module is a main control module in the test equipment for the anti-unplugging function of the intelligent card, and the test equipment comprises: the main control module, the interface module, the transmission module and the power supply module; the power supply module is respectively connected with the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting an intelligent card to be tested; the transmission module is connected between the main control module and the upper computer; the method comprises the following steps: receiving a test instruction which is sent by the upper computer and used for carrying out an anti-pulling test through the transmission module; according to the test instruction, the interface module is used for carrying out anti-pulling test on the smart card to be tested, wherein the test instruction is sent after the upper computer detects the smart card to be tested, and the test instruction comprises the following steps: the intelligent card anti-pulling test system comprises a first instruction and a second instruction, wherein the second instruction is an instruction sent by the upper computer after the first instruction is sent, and according to the test instruction, the intelligent card to be tested is subjected to anti-pulling test through the interface module, and the intelligent card anti-pulling test system comprises: identifying the power failure delay time length carried in the first instruction; after receiving the second instruction, sending the second instruction to the smart card to be tested through the interface module and starting timing, and controlling the power failure of the smart card to be tested through the interface module after the timing duration reaches the power failure delay duration; the smart card to be tested responds to the second instruction after receiving the second instruction, and stops responding to the second instruction after power failure; after the smart card to be tested is powered off, controlling the smart card to be tested to be powered on through the interface module, and reading a response result of the smart card to be tested to the second instruction through the interface module; and determining whether the smart card to be tested has an anti-pulling function or not according to the response result.
In the test equipment, a power supply module is respectively connected with a main control module and an interface module and used for supplying power to the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting the smart card to be tested; the transmission module is connected between the main control module and the upper computer, and the main control module is used for receiving a test instruction which is sent by the upper computer and used for carrying out the anti-pulling test through the transmission module and carrying out the anti-pulling test on the to-be-tested intelligent card through the interface module. Namely, the anti-pulling function of the intelligent card to be tested is tested through the instruction interaction among the upper computer, the main control module and the interface module. Considering that MP300 series products integrate many types of test functions, often with very high price and large volume, if only the anti-pulling function test of smart card is desired, the MP300 series products are inevitably selected with high cost. When the MP300 series products are adopted to carry out the anti-pulling function test, firstly, the anti-pulling test item is selected from a plurality of test items to generate the anti-pulling test instruction, but in the test equipment related to the embodiment of the invention, the upper computer automatically sends the test instruction for carrying out the anti-pulling test after detecting the smart card to be tested, and the anti-pulling test instruction is generated without selecting the anti-pulling test item from the plurality of test items, so the test equipment of the embodiment has stronger specificity and lower cost. The test equipment of the embodiment belongs to a single anti-pulling test product, and compared with MP300 series products, the test equipment has lower manufacturing cost and smaller volume, namely, the test equipment can reduce the cost required by the test of the anti-pulling function of the intelligent card and reduce the volume of the test equipment. The upper computer sends the first instruction and the second instruction to the main control module in sequence, and the power failure delay time length carried in the first instruction is used for accurately controlling the power failure time point of the smart card to be tested. After receiving the first instruction, the main control module waits for a next instruction, namely a second instruction, sent by the upper computer, and after receiving the second instruction, the main control module sends the second instruction to the to-be-tested smart card through the interface module, starts timing, and controls the to-be-tested smart card to be powered down through the interface module after the timing duration reaches the power-down delay duration. And the response result of the smart card to be tested to the second instruction facilitates the determination of whether the smart card to be tested has the anti-pulling function. Moreover, the power failure delay time length carried in the first instruction is changed, so that the test is facilitated to obtain the anti-pulling function limit point, and the anti-pulling function limit point can be understood as follows: in order to enable the smart card to be tested to correctly respond to the power-down verification instruction, the shortest power-down delay time length carried in the power-down instruction is required.
In addition, the test equipment supports the test of contact type smart cards to be tested and non-contact type smart cards to be tested; the interface module comprises a first interface chip supporting a contact communication protocol and a card slot connected with the first interface chip, the card slot is used for connecting the contact type to-be-detected smart card, and a controlled pin of the first interface chip is connected with a control pin corresponding to the first interface chip in the main control module; the interface module further comprises a second type interface chip supporting a non-contact communication protocol and an antenna connected with the second type interface chip, wherein the antenna is used for connecting the non-contact type to-be-detected smart card, and a controlled pin of the second type interface chip is connected with a control pin corresponding to the second type interface chip in the main control module. That is, in the embodiment of the present invention, one testing device may be used to complete the anti-unplugging test of the contact-type smart card and the non-contact-type smart card, and one testing device may be used to complete the anti-unplugging test of the different types of smart cards, which is beneficial to further reducing the cost required for completing the anti-unplugging test.
In addition, the transmission module is a USB-to-serial port. Considering that the data volume needing to be transmitted is not large when the anti-pulling test is carried out, and the USB-to-serial port is the most economical, the transmission module adopts the USB-to-serial port, so that the cost of the test equipment is further reduced.
In addition, the main control module is also used for controlling the smart card to be tested to be powered on through the interface module after the timing duration reaches the pre-acquired recovery duration; and the recovery time length is longer than the time length for entering normal work after the power failure of the intelligent card to be tested is restarted. The timing duration is controlled to automatically recover the power-on of the smart card to be detected after the timing duration reaches the recovery duration, so that the response result of the smart card to be detected to the second instruction is detected conveniently after the power-on is automatically recovered, whether illegal data are written in the smart card to be detected or not is determined, and whether the smart card to be detected has the anti-pulling function or not is determined conveniently.
In addition, the main control module is also used for receiving a third instruction which is sent by the upper computer and carries a target voltage value, and the interface module supplies power to the smart card to be tested according to the target voltage value. Considering that one to-be-tested smart card can support various different power supply voltages, the third instruction carrying the target voltage value is sent to the to-be-tested smart card through the upper computer, so that the power supply voltage of the to-be-tested smart card can be switched, the anti-pulling function test of the to-be-tested smart card under different power supply voltages can be completed, and the anti-pulling function of the to-be-tested smart card can be tested more comprehensively.
In addition, the test instruction further comprises a smart card type identifier; the main control module is used for selecting one of the first type interface chip and the second type interface chip as a target interface chip according to the type identification of the smart card, and performing anti-pulling test on the smart card to be tested connected with the target interface chip through the target interface chip. Namely, after the main control module receives the test instruction, the interface chip to be controlled currently can be determined according to the type identification of the smart card carried in the test instruction, so that the anti-pulling function of the smart cards of different types can be tested according to the test instruction under the condition that the test equipment can simultaneously test the contact smart card and the non-contact smart card.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic structural diagram of a test apparatus according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a testing device for testing the anti-unplugging function of a contact smart card according to a first embodiment of the invention;
fig. 3 is a schematic structural diagram of a testing device for testing the anti-unplugging function of a contactless smart card according to a first embodiment of the invention;
FIG. 4 is a schematic structural diagram of a test apparatus according to a second embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a test apparatus according to a third embodiment of the present invention;
FIG. 6 is a flow chart of a testing method according to a fourth embodiment of the invention;
fig. 7 is a flow chart of the substeps of step 602 according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
To facilitate understanding of the embodiments of the present invention, the following first describes a smart card and its anti-unplugging function:
the smart card generally includes a Central Processing Unit (CPU), a programmable read-only memory (EEPROM), a Random Access Memory (RAM), and an in-Card Operating System (COS) that is fixed in the ROM, and the smart card needs to perform data interaction through a reader/writer. The smart card is powered down suddenly due to some reason, and errors of user data in the card are easily caused. For example, if the smart card is modifying the user data, the cardholder suddenly pulls or removes the card from the card reader, or the card reader suddenly loses power for some reason, which may cause interruption of the user data modification operation, thereby easily causing error in the user data in the card. Therefore, in order to ensure the integrity of the data, the COS itself should have the capability of handling such an emergency event, i.e., the capability of anti-unplugging. That is, the anti-unplugging function of the smart card may also be understood as the anti-power-down function of the smart card.
The first embodiment of the invention relates to a test device for an anti-unplugging function of a smart card, which can be used for testing the anti-unplugging function of the smart card so as to obtain a test result of whether the smart card has the anti-unplugging function. The following describes implementation details of the test equipment for the anti-unplugging function of the smart card in the present embodiment in detail, and the following only provides implementation details for easy understanding, and is not necessary to implement the present invention.
The test apparatus 100 for a smart card anti-unplugging function in this embodiment may include, as shown in fig. 1: the system comprises a main control module 101, an interface module 102, a transmission module 103 and a power supply module 104. The transmission module 103 is connected between the main control module 101 and the upper computer, so that data can be transmitted between the upper computer and the main control module 101. The power module 104 is connected to the main control module 101 and the interface module 102, respectively, and is configured to supply power to the main control module 101 and the interface module 102. The main control module 101 is connected to the interface module 102, and the interface module 102 is used for connecting to the smart card to be tested.
The data transmitted between the upper computer and the main control module 101 comprises a test instruction which is sent by the upper computer and used for performing the anti-pulling test, and after the main control module 101 receives the test instruction, the anti-pulling test is performed on the to-be-tested smart card through the interface module 102. For example, the main control module 101 controls the smart card to be tested to power down and to resume power up through the interface module 102. After the smart card to be tested is electrified, whether the smart card to be tested has the anti-pulling function or not can be determined by checking whether illegal data are written in the smart card to be tested or not. If illegal data are written in the to-be-tested intelligent card, the to-be-tested intelligent card can be determined not to have the anti-pulling function, and if illegal data are not written in the to-be-tested intelligent card, the to-be-tested intelligent card can be determined to have the anti-pulling function.
In a specific implementation, the test instruction is sent by the upper computer after the smart card to be tested is detected. For example, when the test equipment 100 detects that the to-be-tested smart card is connected to the interface module 102, the test equipment 100 sends feedback information to the upper computer, and the upper computer can determine that the to-be-tested smart card is detected after receiving the feedback information, so as to automatically send a test instruction. Optionally, the upper computer may also send the test instruction periodically.
Optionally, the power module 104 may take power from a USB interface of the upper computer. However, the power module 104 may also be powered by a separate power source.
The main control module 101 may be a main control chip, and the types that the main control chip may select include: STM32, SC8051, MSP430, LPC1768, etc., the types that may be selected by the power module 104 include AMS1117, BMS1117, etc.
In one example, the test instructions include: the power-down delay time length can be set according to actual needs, such as 2us and 10 us. In specific implementation, if the performance of the main control chip is good enough, the power-down delay time can be set to be shorter nanosecond time, and 50ns, 100ns and the like can be selected, so that the rapid power-down of the smart card to be tested is facilitated. The second instruction is an instruction sent by the upper computer after sending the first instruction, and the second instruction may be an operation instruction for the smart card to be tested, where the operation instruction may be an update instruction of user data in the smart card to be tested, and the update instruction may be writing, deleting, and the like of the user data, but not limited thereto. That is, the first instruction may be understood as: the instruction is used for instructing the main control module 101 to control the power down of the smart card to be tested at a set power down time point, and the set power down time point can be understood as a time point when the main control module 101 passes through the power down delay time after sending the second instruction to the smart card to be tested, so that the first instruction can also be called a power down instruction. The second instruction may be understood as: the second instruction may also be referred to as a power failure verification instruction, because the second instruction is used to verify whether illegal data is written into the smart card to be tested after power failure.
In one example, the process of testing may be as follows: after receiving the first instruction, the main control module 101 identifies the power-down delay time carried in the first instruction, after receiving the second instruction, sends the second instruction to the smart card to be tested through the interface module 102 and starts timing, and after the timing time reaches the power-down delay time, controls the power-down of the smart card to be tested through the interface module 102. It can be understood that the smart card to be tested can respond to the second instruction after receiving the second instruction, and stop responding to the second instruction after power down, and the smart card to be tested can record the response result to the second instruction; after the power of the smart card to be tested is lost, the main control module 101 controls the smart card to be tested to recover power through the interface module 102, reads a response result of the smart card to be tested through the interface module 102, and determines whether the smart card to be tested has a pull-out prevention function according to the response result. The response result of the smart card to be tested to the second instruction is used for representing whether the smart card to be tested has the anti-pulling function or not. The response result may include the following three: correct response, no response, false response; if the response result is correct response or no response, the smart card to be tested can be considered to be provided with the anti-pulling function, and if the response result is wrong response, the smart card to be tested can be considered not to be provided with the anti-pulling function. The following explains the three response results with a specific example:
suppose that the smart card to be tested is a bank card (for example, the current amount of money stored in the bank card is 5 thousand yuan), the power-down instruction, that is, the power-down delay time carried in the first instruction, is 2us, and the power-down verification instruction, that is, the second instruction, is a data write instruction (for example, 5 thousand yuan is written into the bank card). The main control module 101 determines that the power failure delay time is 2us after receiving a power failure instruction sent by an upper computer, the main control module 101 waits for a next power failure verification instruction sent by the upper computer, when the main control module 101 receives the power failure verification instruction, the power failure verification instruction is sent to the interface module 102, and the interface module 102 sends the power failure verification instruction to the bank card. And the bank card receives the power failure verification instruction and responds to the power failure verification instruction. The main control module 101 starts timing after sending the power failure verification instruction to the interface module 102, and controls the bank card to power down through the interface module 102 after the timing reaches 2 us. After the bank card is electrified, three possible response results of the checked bank card to the power failure verification instruction are respectively as follows: the correct response means that the current amount of money in the bank card is 1 ten thousand yuan, that is, the bank card correctly responds to a data writing instruction of writing 5 thousand yuan into the bank card before power failure. The current amount of money in the bank card is 5 thousand yuan if the bank card does not respond, that is, the bank card does not respond to a data writing instruction of writing 5 thousand yuan into the bank card, and the power is lost. If the error response is that the current amount of money in the bank card is not 5 kilo-dollars or 1 ten-thousand-dollars, for example, 8 kilo-dollars, it can be determined that illegal data is written into the bank card, that is, wrong data is written into the bank card in the power-down process.
In the embodiment, the power-down delay time length carried in the power-down command is utilized, so that the power-down time point of the to-be-tested smart card can be accurately controlled. Moreover, the power failure delay time carried in the power failure instruction is changed, so that the test is facilitated to obtain the anti-pulling function limit point, and the anti-pulling function limit point can be understood as follows: in order to enable the smart card to be tested to correctly respond to the power-down verification instruction, the shortest power-down delay time length carried in the power-down instruction is required.
In one example, the power down instruction may be in the format of: CLA + INS + P1+ P2+ P3, five bytes long, compatible with standard Application Protocol Data Unit (APDU) commands. Where CLA is an instruction class indicating what class of instructions it belongs to, INS is the instruction code in the instruction class, and CLA + INS can be understood as the command header. In this example, the values of the command header may be: CLA is 0xFF, INS is 0x01, which represents that this is a power down command, and P1, P2, and P3 are the total number of power down steps (not 0), assuming that the power down steps are preset to 2 us. Such as:
the power-down instruction is as follows: FF 01000001 (1 step power down command, that is, power down after 1 × power down step is 2 us), that is, the power down delay time length carried in the power down command is 2 us.
In an example, the way for the main control module 101 to control the smart card to be tested to recover to power up may be: the main control module 101 starts timing after sending a power failure verification instruction to the interface module 102, and controls the smart card to be tested to be powered on through the interface module 102 after the timing duration reaches the pre-acquired recovery duration; the recovery time length is longer than the time length for the smart card to be tested to enter normal work after being restarted after power failure, the recovery time length can be set according to actual needs, the time length for the smart card to be tested to enter normal work after being restarted after power failure can be predetermined, and the time lengths for the smart cards to be tested to enter normal work after being restarted after power failure of different types of smart cards to be tested may have differences. The recovery time length is longer than the time length of the to-be-detected intelligent card entering normal operation after power failure restart, so that the purpose of power failure can be achieved by ensuring that the to-be-detected intelligent card can be completely powered down, and if the to-be-detected intelligent card is powered up in a too early recovery mode, the to-be-detected intelligent card is powered up after the to-be-detected intelligent card does not completely enter a power failure. For example, the power down delay time period is set to 2us, and the recovery time period may be set to 200 us. That is to say, the main control module 101 starts timing after sending the power failure verification instruction to the interface module 102, when the timing reaches 2us, the main control module 101 controls the smart card to be tested to power down through the interface module 102, and when the timing reaches 200us, the main control module 101 controls the smart card to be tested to resume to power up through the interface module 102. The smart card to be tested is powered on again through the automatic timing of the main control module 101, which is beneficial to automatically powering on the smart card to be tested at a higher speed. However, in a specific implementation, the upper computer may also send an instruction to the main control module 101 to resume powering on, so that after receiving the instruction to resume powering on, the main control module 101 controls the smart card to be tested to resume powering on through the interface module 102.
In one example, the recovery duration is pre-obtained by: in specific implementation, the upper computer can send the recovery duration to the main control module before sending a test instruction to the main control module, so that the main control module obtains the recovery duration. Optionally, the main control module may have a recovery duration of manual writing in advance, so that the recovery duration of manual writing may be obtained in advance.
In a specific implementation, the main control module 101 may output a power-down voltage (for example, 0v) through the control interface module 102, so that the smart card to be tested connected to the interface module 102 is powered down. The main control module 101 may output the power-on voltage through the control interface module 102, so that the smart card to be tested is powered on again.
In an example, the transmission module 103 may be a USB to serial port, and the transmission module 103 may obtain power from a USB interface of the upper computer. Considering that the data volume needing to be transmitted is not large when the anti-pulling test is carried out, and the USB-to-serial port is the most economical, the transmission module adopts the USB-to-serial port, so that the cost of the test equipment is further reduced. However, in a specific implementation, the transmission module 103 may be implemented by a portal.
In an example, the test equipment supports testing a contact-type smart card to be tested (abbreviated as a contact-type smart card), and a schematic structural diagram of the test equipment 200 may refer to fig. 2, where the interface module 102 includes a first interface chip 201 supporting a contact-type communication protocol and a card slot 202 connected to the first interface chip 201, the card slot 202 is used to connect the contact-type smart card, and the controlled pin 1 of the first interface chip 201 is connected to the control pin 1 corresponding to the first interface chip 201 in the main control module 101. When the anti-unplugging function of the contact smart card needs to be tested, the contact smart card can be inserted into the card slot 202, so that the contact smart card can be connected with the first interface chip 201 through the card slot 202. The upper computer sends a test instruction after detecting the smart card to be tested, and the test instruction can be understood as follows: the upper computer automatically sends a test instruction after detecting that the contact smart card is inserted into the card slot 202.
The first interface chip supports a contact communication protocol, which may be, for example: international Organization for Standardization (ISO) 7816 communication protocol. In a specific implementation, the types that can be selected by the first type interface chip include: ST8024LCDR, DS8113, 73S8009C, NCN6001, and the like.
In another example, the test equipment supports testing a non-contact type smart card to be tested (abbreviated as a non-contact smart card), and a schematic structural diagram of the test equipment 300 may refer to fig. 3, where the interface module 102 includes a second type interface chip 301 supporting a non-contact communication protocol and an antenna 302 connected to the second type interface chip 301, the antenna 302 is used for connecting the non-contact smart card, and the control pin 1 of the second type interface chip 301 is connected to the control pin 2 of the main control module 101 corresponding to the second type interface chip 301. When the contactless smart card needs to be tested for the anti-unplugging function, the contactless smart card may be placed on the surface of the testing device 300, so that the contactless smart card may be connected with the second type interface chip 301 through the antenna 302. The upper computer sends a test instruction after detecting the smart card to be tested, and the test instruction can be understood as follows: the host computer automatically sends a test instruction after detecting that the contactless smart card is placed on the surface of the test equipment 300.
The second type of interface chip supports a contactless communication protocol, which may be, for example: ISO14443 communication protocol. In a specific implementation, the types that can be selected by the second type interface chip include: MS523, MFRC500SLE66R35, and the like.
It should be noted that, in order to highlight the innovative part of the present invention, pins which are not so closely related to solve the technical problem proposed by the present invention are not introduced in the present embodiment, but this does not indicate that there are no other pins in the present embodiment, such as in fig. 2 and 3.
The above examples in the present embodiment are for convenience of understanding, and do not limit the technical aspects of the present invention.
According to the embodiment, the anti-pulling function of the intelligent card to be tested is tested through the instruction interaction among the upper computer, the main control module and the interface module. Considering that MP300 series products integrate many types of test functions, often with very high price and large volume, if only the anti-pulling function test of smart card is desired, the MP300 series products are inevitably selected with high cost. The test equipment in the embodiment of the invention belongs to a single anti-pulling test product, and has lower manufacturing cost and smaller volume compared with MP300 series products, namely, the test equipment can reduce the cost required by the test of the anti-pulling function of the intelligent card and reduce the volume of the test equipment.
The second embodiment of the invention relates to a test device for an anti-pulling function of a smart card, and the test device in the embodiment can also realize switching of the power supply voltage of the smart card to be tested, so that the anti-pulling function of the smart card to be tested under different power supply voltages can be tested. The following describes implementation details of the test equipment for the anti-unplugging function of the smart card in the present embodiment in detail, and the following only provides implementation details for easy understanding, and is not necessary to implement the present invention.
In this embodiment, the main control module, in addition to the functions of the first embodiment, is further configured to receive a third instruction carrying a target voltage value sent by the upper computer, and supply power to the to-be-tested smart card with the target voltage value through the interface module. That is, the third instruction may be used to switch the power supply voltage of the smart card to be tested, and therefore the third instruction may also be referred to as a voltage switching instruction. Considering that one to-be-tested smart card can support various different power supply voltages (for example, 5V/3V/1.8V), the third instruction is sent to the to-be-tested smart card through the upper computer, so that the power supply voltage of the to-be-tested smart card can be switched, the anti-pulling function test of the to-be-tested smart card under different power supply voltages can be completed, and the anti-pulling function of the to-be-tested smart card can be tested more comprehensively.
For example, if the current power supply voltage of the smart card to be tested is 5v, after the power supply voltage is 5v and the smart card to be tested has the anti-pulling function, a voltage switching instruction carrying 3.3v (target voltage value) can be sent to the main control module through the upper computer, and after the main control module receives the voltage switching instruction, the power is supplied to the smart card to be tested through the interface module at 3.3 v. After testing whether the intelligent card to be tested has the anti-pulling function when the power supply voltage is 3.3v, a voltage switching instruction carrying 1.8v (target voltage value) is sent to the main control module through the upper computer, and after the main control module receives the voltage switching instruction, the intelligent card to be tested is powered by 1.8v through the interface module, so that whether the intelligent card to be tested has the anti-pulling function when the power supply voltage is 1.8v is tested.
In an example, referring to fig. 4, in fig. 4, a schematic structural diagram of a test device 400 for a smart card anti-unplugging function may be implemented by using a main control chip 401, the main control chip may specifically use STM32, an interface module includes an interface chip 402 and a card slot 405, the interface chip may specifically use ST8024LCDR, a transmission module is implemented by using a USB to serial port 403, the USB to serial port may specifically use CH340, and a power module 404 may specifically use AMS 1117.
In fig. 4, the control pins (e.g., PB10, PB12, P2, PB13, PB15, and PB9) of the main control chip 401 include N voltage control pins (e.g., 2 pins PB15 and PB9), the controlled pins (e.g., 2 pins PB I/OUC, XTAL1, RSTIN, CMDVCC, OFF, 5V/3V, and 1.8V) of the interface chip 402 include N voltage controlled pins (e.g., 2 pins PB 5V/3V and 1.8V), and the N voltage control pins are connected to the N voltage controlled pins in a one-to-one correspondence (e.g., the PB15 pin is connected to the 5V/3V pin, and the PB9 pin is connected to the 1.8V pin). For example, referring to table 1, the combinations of the level signals output by the 2 pins PB15 and PB9 include 01, 10 and X1, and the corresponding voltage values are 3V, 5V and 1.8V, respectively.
TABLE 1
PB15 pin (connecting 5V/3V pin) PB9 pin (1.8V pin) VCC pin
0 1 3V
1 0 5V
X
1 1.8V
The main control chip 401 is configured to select a combination of level signals corresponding to a target voltage value and output the selected combination of level signals through the N voltage control pins, and the interface chip 402 is configured to receive the combination of level signals output by the N voltage control pins through the N voltage control pins and supply power to the smart card to be tested according to the target voltage value corresponding to the combination of level signals.
For example, if the current power supply voltage of the contact smart card is 5V, and the target voltage value carried by the third command is 3V, referring to table 1, the combination of the level signals selected by the main control chip 401 and corresponding to the target voltage value is 01, the main control chip 401 outputs 0 through a PB15 pin and outputs 1 through a PB9 pin, the interface chip 402 receives 0 and 1 output by a PB15 pin and a PB9 pin through a 5V/3V pin and a 1.8V pin, respectively, and supplies power to the smart card to be tested according to the target voltage value (3V) corresponding to the combination (01) of the level signals. Specifically, the interface chip 402 may output a target voltage (3V) corresponding to the combination (01) of the level signals through the VCC pin, the VCC pin in the interface chip 402 is connected to the pin C1 of the card slot 405, and the card slot 405 receives the target voltage output by the VCC pin in the interface chip 402 through the pin C1, so that the supply voltage of the contact smart card inserted into the card slot 405 is switched from 5V to 3V. The meanings represented by the 8 pins of the card slot 405 can be seen in table 2:
TABLE 2
Pin number Means of Pin number Means of
C1 Power supply voltage input (VCC) C5 Ground, reference voltage (GND)
C2 Reset signal input (RST) C6 Programming Voltage (VPP)
C3 Clock signal input (CLK) C7 Input/output (I/O)
C4 Reserved for future use C8 Reserved for future use
When a contact smart card to be tested is inserted into the card slot 405, the reset RST signal input pin in the card slot 405 is a soft reset, and the power down of the entire contact smart card is not caused after the reset RST signal input pin is pulled high. Therefore, the method for controlling the power failure of the smart card in the embodiment is as follows: and the power supply of the power supply voltage input VCC pin is disconnected, namely the main control chip controls the interface chip to output power-down voltage, namely 0V.
As can be seen from fig. 4, the control pins of the main control chip 401 include: the enable control pin (such as PB13 pin) for powering on or powering off the smart card under test includes, in the controlled pin of the interface chip 402: an enabling pin (such as a CMDVCC pin) for powering on or powering off the smart card to be tested; the enable pin is connected to an enable control pin (e.g., PB13 pin and CMDVCC pin).
If the main control chip 401 outputs a first level signal (for example, 0) representing power failure through the enable control pin, the interface chip 402 receives the first level signal through the enable pin and controls the smart card to be tested to power down. For example, if the level signal received by the interface chip 402 through the CMDVCC pin is 0, the interface chip 402 outputs 0V voltage to the card slot 405 through the VCC pin, so that the contact smart card inserted into the card slot 405 is powered down.
If the main control chip 401 outputs a second level signal (for example, 1) representing power-on through the enable control pin, the interface chip 402 receives the second level signal through the enable pin and controls the smart card to be tested to power-on. For example, if the level signal received by the interface chip 402 through the CMDVCC pin is 1, the interface chip 402 outputs a power-on voltage to the card slot 405 through the VCC pin, so that the contact smart card inserted into the card slot 405 is powered on again. The voltage value of the power-on voltage output by the VCC pin can refer to table 1, that is, the combination of the level signals output by the 2 pins PB15 and PB9 of the main control chip 401 determines the voltage output by the interface chip 402 through the VCC pin.
It should be noted that, in order to highlight the innovative part of the present invention, pins which are not so closely related to solve the technical problem proposed by the present invention are not introduced in fig. 4, but this does not indicate that there are no other pins in fig. 4.
In one example, the format of the voltage switching command is: CLA + INS + P1+ P2+ P3, five bytes long, compatible with standard APDU commands. CLA 0xFF, INS 0x02, P1 0x03 (representing 3v), or P1 0x05 (representing 5v), or P1 0x18 (representing 1.8v), with P2 and P3 being arbitrary values. That is, when CLA is 0xFF and INS is 0x02, it means that this is a voltage switching command, for example:
the voltage switching command is: FF 02032202 indicates that 3v needs to be switched to supply power to the smart card to be tested;
the voltage switching command is: FF 02052202 indicates that 5v needs to be switched to supply power to the smart card to be tested;
the voltage switching command is: FF 02182202 indicates that it is necessary to switch to 1.8v to power the smart card under test.
In a specific implementation, after the main control chip STM32 executes the voltage switching instruction, it may return a response message to the upper computer indicating that the corresponding voltage switching instruction has been executed. For example, the returned response information may be any one of the following: 0x30 (i.e., a voltage switch command to switch to 3v was executed), 0x50 (i.e., a voltage switch command to switch to 5v was executed), and 0x18 (i.e., a voltage switch command to switch to 1.8v was executed).
The above examples in the present embodiment are for convenience of understanding, and do not limit the technical aspects of the present invention.
In the embodiment, the intelligent card to be tested can support various different power supply voltages, and the voltage switching instruction is sent to the intelligent card to be tested through the upper computer, so that the power supply voltage of the intelligent card to be tested can be switched, the anti-pulling function test of the intelligent card to be tested under different power supply voltages can be completed, and the anti-pulling function of the intelligent card to be tested can be tested more comprehensively.
The third embodiment of the present invention relates to a testing apparatus for an anti-unplugging function of a smart card, in which one testing apparatus can be used to complete the testing of the anti-unplugging functions of a contact smart card and a non-contact smart card, that is, the testing of the anti-unplugging functions of different types of smart cards can be completed by one testing apparatus. The following describes implementation details of the test equipment for the anti-unplugging function of the smart card in the present embodiment in detail, and the following only provides implementation details for easy understanding, and is not necessary to implement the present invention.
The test equipment 500 for the anti-unplugging function of the smart card according to the present embodiment supports testing of a contact type smart card to be tested (contact type smart card for short) and a non-contact type smart card to be tested (non-contact type smart card for short). The structural diagram of the test device 500 can refer to fig. 5, and includes: the device comprises a main control chip 501, a first interface chip 502 supporting a contact communication protocol, a second interface chip 503 supporting a non-contact communication protocol, a card slot 504, an antenna 505, a USB (universal serial bus) to serial port 506 and a power module 507.
The pins of the main control chip 501 include a control pin 1 corresponding to the first type interface chip 502 and a control pin 2 corresponding to the second type interface chip 503, the control pin 1 is connected to the controlled pin 1 of the first type interface chip 502, and the control pin 2 is connected to the controlled pin 1 of the second type interface chip 503. The first interface chip 502 is connected to a card slot 504, and the first interface chip 502 is connected to a contact smart card through the card slot 504. The second type interface chip 503 is connected with an antenna 505, and the second type interface chip 503 is connected with the contactless smart card through the antenna 505. The host computer is connected with a USB-to-serial port 506, the USB-to-serial port 506 is connected with a power supply module 507, and the power supply module 507 is respectively connected with the main control chip 501, the first interface chip 502 and the second interface chip 503. The power module 507 can get power from a USB interface of the upper computer, so that the power module 507 can supply power to the main control chip 501, the first interface chip 502, and the second interface chip 503.
It can be understood that the main control chip 501 may include many pins, and those skilled in the art may select a part of the pins of the main control chip 501 as the control pins 1 corresponding to the first type of interface chip 502 and select another part of the pins as the control pins 2 corresponding to the second type of interface chip 503 according to actual needs. For example, assuming that the main control chip is STM32, referring to fig. 4, the selected control pin 1 may include PB2, PB9, PB10, PB13, PB14, and PB15, and the control pin 2 may be selected from the remaining pins of the STM32 according to actual needs, which is not specifically limited in this embodiment.
In this embodiment, the test instruction includes a smart card type identifier, after the main control chip 501 receives the test instruction sent by the upper computer, the smart card type identifier is determined according to the test instruction, then one of the first type interface chip 502 and the second type interface chip 503 is selected as a target interface chip according to the smart card type identifier, and the anti-pulling test is performed on the smart card to be tested connected with the target interface chip through the target interface chip. When the target interface chip is the first type interface chip 502, the target smart card to be tested connected with the target interface chip is a contact smart card, and when the target interface chip is the second type interface chip 503, the target smart card to be tested connected with the target interface chip is a non-contact smart card. For example, when the type identifier of the smart card is a, the target interface chip determined by the main control chip 501 is the first type interface chip 502, and when the type identifier of the smart card is B, the target interface chip determined by the main control chip 501 is the second type interface chip 503.
In an example, the test instruction in this embodiment may include a power-down instruction and a power-down verification instruction similar to those described in the first embodiment, and is different from the first embodiment in that both the power-down instruction and the power-down verification instruction in this embodiment may carry the above-mentioned smart card type identifier. The smart card type identifier carried in the power down command indicates that: currently, it is necessary to control the power failure of a contactless smart card or a contact smart card. The smart card type identifier carried in the power failure verification instruction represents: currently, a non-contact smart card needs to be controlled to execute a power failure verification instruction, or a contact smart card needs to be controlled to execute the power failure verification instruction.
In one example, the format of the power down instruction is: CLA + INS + P1+ P2+ P3 may represent different smart card type identifiers by setting different values to the INS, so that the main control chip 501 may determine the smart card type identifier by the value of the INS after receiving the power down command, so as to determine which type of smart card is to be tested currently. The following illustrates the testing of different types of smart cards using the testing apparatus 500, using a specific example:
testing the contact type smart card: the contact type smart card is inserted into the card slot 504, a test instruction carrying a smart card type identifier a is sent to the main control chip 501 by the upper computer, the main control chip 501 determines that the target interface chip is the first interface chip 502 according to the smart card type identifier a, and the contact type smart card is subjected to anti-pulling test by the first interface chip 502.
Testing the non-contact smart card: the non-contact smart card is placed on the test equipment 500, the upper computer is used for sending a test instruction carrying a smart card type identifier B to the main control chip 501, the main control chip 501 determines that the target interface chip is the second type interface chip 503 according to the smart card type identifier B, and the non-contact smart card is subjected to anti-pulling test through the second type interface chip 503.
In an example, the testing apparatus 500 in this embodiment may also implement switching of the power supply voltage of the smart card to be tested similarly to the second embodiment, so that the anti-unplugging function of the smart card to be tested under different power supply voltages may be tested. The voltage switching command in this embodiment is different from the voltage switching command in the second embodiment in that the voltage switching command in this embodiment may also carry the smart card type identifier. The smart card type identifier carried in the voltage switching command indicates that: currently, the supply voltage of a contactless smart card needs to be switched, or the supply voltage of a contact smart card needs to be switched.
The above examples in the present embodiment are for convenience of understanding, and do not limit the technical aspects of the present invention. In order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that no other elements exist in the present embodiment.
In the embodiment, one test device can be used for testing the anti-pulling functions of the contact type smart card and the non-contact type smart card, so that the test of the anti-pulling functions of different types of smart cards can be completed through one test device, and the cost required for completing the test of the anti-pulling functions is further reduced. After the main control module receives the test instruction, the interface chip to be controlled at present can be determined according to the type identification of the smart card carried in the test instruction, so that the anti-pulling function of the smart cards of different types can be conveniently tested according to the test instruction under the condition that the test equipment can simultaneously test the contact smart card and the non-contact smart card.
A fourth embodiment of the present invention relates to a method for testing an anti-unplugging function of a smart card, which is applied to a main control module, wherein the main control module is a main control module in a testing device for the anti-unplugging function of the smart card, and the testing device comprises: the device comprises a main control module, an interface module, a transmission module and a power supply module; the power supply module is respectively connected with the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting the smart card to be tested; the transmission module is connected between the main control module and the upper computer. In a specific implementation, the main control module may be a main control module in the test equipment for an anti-unplugging function of the smart card in any of the above embodiments. The following describes implementation details of the method for testing the anti-unplugging function of the smart card in the present embodiment in detail, and the following description is only provided for facilitating understanding of the implementation details and is not necessary for implementing the present embodiment.
As shown in fig. 6, a flowchart of a method for testing a smart card anti-unplugging function according to this embodiment may include:
step 601: and receiving a test instruction which is sent by the upper computer and used for carrying out the anti-pulling test through the transmission module.
Step 602: and according to the test instruction, carrying out anti-pulling test on the intelligent card to be tested through the interface module.
And the test instruction is sent by the upper computer after the smart card to be tested is detected.
In one example, the test equipment supports testing of a contact type smart card to be tested and/or a non-contact type smart card to be tested;
in the case that the test equipment supports testing of a contact-type to-be-tested smart card, the structural schematic diagram of the test equipment may refer to fig. 2, that is, an interface module includes a first type interface chip supporting a contact-type communication protocol and a card slot connected to the first type interface chip, the card slot is used to connect the contact-type to-be-tested smart card, and a controlled pin of the first type interface chip is connected to a control pin of the main control module corresponding to the first type interface chip;
under the condition that the test equipment supports testing of a non-contact type to-be-tested smart card, the structural schematic diagram of the test equipment may refer to fig. 3, that is, the interface module includes a second type interface chip supporting a non-contact communication protocol and an antenna connected to the second type interface chip, where the antenna is used to connect the non-contact type to-be-tested smart card, and the controlled pin of the second type interface chip is connected to the control pin of the main control module corresponding to the second type interface chip.
Fig. 5 may be referred to as a schematic structural diagram of the test equipment in a case where the test equipment supports testing of a contact type smart card to be tested and a non-contact type smart card to be tested. The test instructions may include a smart card type identifier; carry out the anti-pulling test to the smart card that awaits measuring through interface module, include: and selecting one of the first type interface chip and the second type interface chip as a target interface chip according to the type identifier of the smart card, and performing anti-pulling test on the smart card to be tested connected with the target interface chip through the target interface chip.
In one example, the power module can take power from a USB interface of the upper computer, so that the power module can supply power to the main control module and the interface module. Optionally, the transmission module may be a USB to serial port.
In one example, the test instructions include: the step 602 may be implemented by the following sub-steps:
step 6021: and identifying the power-down delay time length carried in the first instruction.
Step 6022: and after receiving the second instruction, sending the second instruction to the smart card to be tested through the interface module and starting timing.
Step 6023: and after the timing time reaches the power-down delay time, controlling the power-down of the intelligent card to be tested through the interface module.
And the smart card to be tested responds to the second instruction after receiving the second instruction, and stops responding to the second instruction after power failure, and the smart card to be tested can record a response result to the second instruction.
In one example, the master control module includes: the intelligent card that awaits measuring is gone up the enable control pin of electricity or power failure, and interface module includes: enabling pins for powering on or powering off the smart card to be tested; the enable pin is connected with the enable control pin; the main control module controls the power failure of the smart card to be tested through the interface module, and comprises: the main control module outputs a first level signal representing power failure through the enable control pin, so that the interface module receives the first level signal through the enable pin and controls the smart card to be tested to be powered down.
Step 6024: after the smart card to be tested is powered off, controlling the smart card to be tested to be powered on through the interface module, and reading a response result of the smart card to be tested through the interface module;
in one example, the method for controlling the power-on of the smart card to be tested through the interface module may be as follows: after the timing time reaches the pre-acquired recovery time, controlling the smart card to be tested to be powered on through the interface module; and the recovery time length is longer than the time length for entering normal work after the power failure restart of the intelligent card to be tested.
In one example, the way that the main control module controls the smart card to be tested to be powered on through the interface module may be: the main control module outputs a second level signal representing the electrification through the enabling control pin so that the interface module receives the second level signal through the enabling pin and controls the electrification of the intelligent card to be tested.
Step 6025: and determining whether the smart card to be tested has the anti-pulling function or not according to the response result.
In one example, if the main control module receives a third instruction carrying a target voltage value sent by the upper computer, the interface module supplies power to the smart card to be tested with the target voltage value.
In one example, the control pins of the main control module include N voltage control pins, and the controlled pins of the interface module include N voltage controlled pins; the N voltage control pins are connected with the N voltage controlled pins in a one-to-one correspondence mode, and multiple combinations of level signals output by the N voltage control pins correspond to multiple voltage values; supply power with the smart card that awaits measuring with the target voltage value through interface module, include: selecting a combination of level signals corresponding to the target voltage value; and outputting the selected combination of the level signals through the N voltage control pins so that the interface module receives the combination of the level signals output by the N voltage control pins through the N voltage controlled pins, and supplying power to the intelligent card to be tested according to a target voltage value corresponding to the combination of the level signals.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
It is to be noted that this embodiment is an embodiment of the test method corresponding to the first to third embodiments, and may be implemented in cooperation with the first to third embodiments. The related technical details and technical effects mentioned in the first to third embodiments are still valid in this embodiment, and are not described herein again in order to reduce repetition.
A fifth embodiment of the present invention relates to a main control module, in which instructions executable by the main control module are stored, and the instructions are executed by the main control module, so that the main control module can execute the method for testing the anti-unplugging function of the smart card according to the fourth embodiment. In a specific implementation, the main control module may be a main control chip, where an instruction executable by the main control chip is stored in the main control chip, and when the main control chip executes the instruction, the method for testing the anti-unplugging function of the smart card according to the fourth embodiment may be implemented.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above method embodiments when executed by the main control module.
That is, as can be understood by those skilled in the art, all or part of the steps in the method of the foregoing embodiments may be implemented by controlling related hardware through a program, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method of the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific embodiments for practicing the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. The utility model provides a smart card prevents pulling out test equipment of function is connected to the host computer, its characterized in that includes: the device comprises a main control module, an interface module, a transmission module and a power supply module;
the power supply module is respectively connected with the main control module and the interface module and is used for supplying power to the main control module and the interface module;
the main control module is connected with the interface module, and the interface module is used for connecting an intelligent card to be tested;
the transmission module is connected host system with between the host computer, host system is used for passing through transmission module receives the test instruction that is used for carrying out the anti-pulling test that the host computer sent, and passes through interface module is right the smart card that awaits measuring carries out the anti-pulling test, wherein, test instruction does the host computer detects send behind the smart card that awaits measuring, test instruction includes: the second instruction is an instruction sent by the upper computer after the first instruction is sent;
the main control module is used for identifying the power-down delay time length carried in the first instruction, sending the second instruction to the to-be-tested smart card through the interface module and starting timing after receiving the second instruction, and controlling the power-down of the to-be-tested smart card through the interface module after the timing time length reaches the power-down delay time length;
the smart card to be tested responds to the second instruction after receiving the second instruction, and stops responding to the second instruction after power failure;
the main control module is further used for controlling the smart card to be tested to be powered on through the interface module after the smart card to be tested is powered off, reading a response result of the smart card to be tested to the second instruction through the interface module, and determining whether the smart card to be tested has an anti-pulling function or not according to the response result.
2. The device for testing the anti-unplugging function of the smart card according to claim 1, wherein the testing device supports testing of a contact type smart card to be tested and a non-contact type smart card to be tested;
the interface module comprises a first interface chip supporting a contact communication protocol and a card slot connected with the first interface chip, the card slot is used for connecting the contact type to-be-detected smart card, and a controlled pin of the first interface chip is connected with a control pin corresponding to the first interface chip in the main control module;
the interface module further comprises a second type interface chip supporting a non-contact communication protocol and an antenna connected with the second type interface chip, wherein the antenna is used for connecting the non-contact type to-be-detected smart card, and a controlled pin of the second type interface chip is connected with a control pin corresponding to the second type interface chip in the main control module.
3. The device for testing the anti-unplugging function of a smart card according to claim 2, wherein the test instruction further comprises a smart card type identifier; the main control module is used for selecting one of the first type interface chip and the second type interface chip as a target interface chip according to the type identification of the smart card, and performing anti-pulling test on the smart card to be tested connected with the target interface chip through the target interface chip.
4. The device for testing the anti-unplugging function of the smart card according to claim 1, wherein the main control module is further configured to control the smart card to be tested to be powered on through the interface module after the timing duration reaches a pre-acquired recovery duration; and the recovery time length is longer than the time length for the intelligent card to be tested to enter normal work after the power failure restart.
5. The device for testing the anti-unplugging function of the smart card according to claim 1, wherein the transmission module is a USB-to-serial port.
6. The device for testing the anti-unplugging function of a smart card according to claim 1, wherein the main control module comprises: the intelligent card that awaits measuring is power-on or the enable control pin of power failure, interface module includes: the intelligent card to be tested is provided with an enabling pin for power-on or power-off; the enable pin is connected with the enable control pin;
if the main control module outputs a first level signal representing power failure through the enabling control pin, the interface module receives the first level signal through the enabling control pin and controls the smart card to be tested to be powered down;
if the main control module outputs a second level signal representing electrification through the enabling control pin, the interface module receives the second level signal through the enabling pin and controls the intelligent card to be tested to be electrified.
7. The device for testing the anti-unplugging function of the smart card according to any one of claims 1 to 6, wherein the main control module is further configured to receive a third instruction carrying a target voltage value and sent by the upper computer, and to supply power to the smart card to be tested through the interface module by using the target voltage value.
8. The device for testing the anti-unplugging function of the smart card according to claim 7, wherein the control pins of the main control module comprise N voltage control pins, and the controlled pins of the interface module comprise N voltage controlled pins; the N voltage control pins are connected with the N voltage controlled pins in a one-to-one correspondence manner, and various combinations of level signals output by the N voltage control pins correspond to various voltage values;
the main control module is used for selecting a combination of level signals corresponding to the target voltage value and outputting the selected combination of the level signals through the N voltage control pins;
the interface module is used for receiving the combination of the level signals output by the N voltage control pins through the N voltage controlled pins and supplying power to the intelligent card to be tested by using the target voltage value corresponding to the combination of the level signals.
9. The method for testing the anti-pulling function of the intelligent card is characterized by being applied to a main control module, wherein the main control module is a main control module in test equipment for the anti-pulling function of the intelligent card, and the test equipment comprises: the main control module, the interface module, the transmission module and the power supply module; the power supply module is respectively connected with the main control module and the interface module; the main control module is connected with the interface module, and the interface module is used for connecting an intelligent card to be tested; the transmission module is connected between the main control module and the upper computer; the method comprises the following steps:
receiving a test instruction which is sent by the upper computer and used for carrying out an anti-pulling test through the transmission module;
according to the test instruction, the interface module is used for carrying out anti-pulling test on the smart card to be tested, wherein the test instruction is sent after the upper computer detects the smart card to be tested, and the test instruction comprises the following steps: the intelligent card anti-pulling test system comprises a first instruction and a second instruction, wherein the second instruction is an instruction sent by the upper computer after the first instruction is sent, and according to the test instruction, the intelligent card to be tested is subjected to anti-pulling test through the interface module, and the intelligent card anti-pulling test system comprises:
identifying the power failure delay time length carried in the first instruction;
after receiving the second instruction, sending the second instruction to the smart card to be tested through the interface module and starting timing, and controlling the power failure of the smart card to be tested through the interface module after the timing duration reaches the power failure delay duration; the smart card to be tested responds to the second instruction after receiving the second instruction, and stops responding to the second instruction after power failure;
after the smart card to be tested is powered off, controlling the smart card to be tested to be powered on through the interface module, and reading a response result of the smart card to be tested to the second instruction through the interface module;
and determining whether the smart card to be tested has an anti-pulling function or not according to the response result.
10. The method for testing the anti-unplugging function of a smart card of claim 9, wherein the test equipment supports testing of a contact type smart card to be tested and a non-contact type smart card to be tested;
the interface module comprises a first interface chip supporting a contact communication protocol and a card slot connected with the first interface chip, the card slot is used for connecting the contact type to-be-detected smart card, and a controlled pin of the first interface chip is connected with a control pin corresponding to the first interface chip in the main control module;
the interface module further comprises a second type interface chip supporting a non-contact communication protocol and an antenna connected with the second type interface chip, wherein the antenna is used for connecting the non-contact type to-be-detected smart card, and a controlled pin of the second type interface chip is connected with a control pin corresponding to the second type interface chip in the main control module.
CN202110108804.3A 2021-01-27 2021-01-27 Test equipment and test method for anti-pulling function Active CN112904129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110108804.3A CN112904129B (en) 2021-01-27 2021-01-27 Test equipment and test method for anti-pulling function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110108804.3A CN112904129B (en) 2021-01-27 2021-01-27 Test equipment and test method for anti-pulling function

Publications (2)

Publication Number Publication Date
CN112904129A true CN112904129A (en) 2021-06-04
CN112904129B CN112904129B (en) 2022-09-27

Family

ID=76120561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110108804.3A Active CN112904129B (en) 2021-01-27 2021-01-27 Test equipment and test method for anti-pulling function

Country Status (1)

Country Link
CN (1) CN112904129B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372482A (en) * 2021-12-17 2022-04-19 武汉天喻信息产业股份有限公司 Multifunctional test method and device for smart card

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830300A (en) * 2012-08-06 2012-12-19 大唐微电子技术有限公司 Testing system and method for realizing non-contact type intelligent card chip
CN104950240A (en) * 2014-03-26 2015-09-30 北京同方微电子有限公司 Working voltage segment testing system and testing method for smart card
CN105137227A (en) * 2015-08-03 2015-12-09 昆腾微电子股份有限公司 Testing device and method for power-down protection of intelligent card
CN105372619A (en) * 2014-08-06 2016-03-02 国家电网公司 Safe chip power-down testing equipment
CN106093659A (en) * 2016-07-22 2016-11-09 工业和信息化部电子工业标准化研究院 Smart card power-off protection test device, system and method
CN107729972A (en) * 2017-09-01 2018-02-23 捷德(中国)信息科技有限公司 A kind of data guard method of intellective IC card
CN207164210U (en) * 2017-09-29 2018-03-30 北京智芯微电子科技有限公司 A kind of test device of smart card

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830300A (en) * 2012-08-06 2012-12-19 大唐微电子技术有限公司 Testing system and method for realizing non-contact type intelligent card chip
CN104950240A (en) * 2014-03-26 2015-09-30 北京同方微电子有限公司 Working voltage segment testing system and testing method for smart card
CN105372619A (en) * 2014-08-06 2016-03-02 国家电网公司 Safe chip power-down testing equipment
CN105137227A (en) * 2015-08-03 2015-12-09 昆腾微电子股份有限公司 Testing device and method for power-down protection of intelligent card
CN106093659A (en) * 2016-07-22 2016-11-09 工业和信息化部电子工业标准化研究院 Smart card power-off protection test device, system and method
CN107729972A (en) * 2017-09-01 2018-02-23 捷德(中国)信息科技有限公司 A kind of data guard method of intellective IC card
CN207164210U (en) * 2017-09-29 2018-03-30 北京智芯微电子科技有限公司 A kind of test device of smart card

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372482A (en) * 2021-12-17 2022-04-19 武汉天喻信息产业股份有限公司 Multifunctional test method and device for smart card

Also Published As

Publication number Publication date
CN112904129B (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US8174365B2 (en) IC tag, method of controlling the IC tag, and IC tag system
CN100492407C (en) Integral circuit device with multiple communication model and its operation method
US6820208B2 (en) IC card, IC chip, data assuring method and power supply monitor method
US20080301497A1 (en) Testing Apparatus, System, and Method for Testing at Least One Device with a Connection Interface
CN102568580B (en) The CD writers of microarray strip test function and method for burn-recording thereof
US6615390B1 (en) Method of manufacturing IC cards
CN112904129B (en) Test equipment and test method for anti-pulling function
CN112000351B (en) Updating method, updating device, updating equipment and storage medium of BMC (baseboard management controller) firmware
CN109063488A (en) A kind of PowerPC standby system secure bootstrapping method and system
CN105279543A (en) Radiofrequency transponder circuit
CN101258553A (en) Passive contact-free integrated circuit comprising a flag for monitoring an erasing-programming voltage
CN107463341A (en) Method for deleting, device and the mobile terminal of FLASH chip
CN104850421A (en) Computer system and detection method of universal sequence bus device thereof
CN110569680A (en) Automatic plug-pull card testing method and system for ETC user card
CN102169442A (en) Method, equipment, device and system for performing system boot by using USB (universal serial bus) device
CN104570821B (en) Integrated circuit and operation method thereof
CN101165710A (en) Smart card and method of testing smart card
CN101706864B (en) Method for identifying logical encryption card
CN104517140A (en) RFID multi-card-in-one integration method
CN209657346U (en) It is a kind of can the shoes of physical security take anti-fake RFID card
CN114822667A (en) Method for accurately injecting VDT in eMMC test, storage medium and electronic equipment
CN109144528B (en) Method and system for automatically detecting pins and identifying specific type of SPI Flash
CN110764956B (en) SD or MMC interface testing device and method based on FPGA
CN107239229A (en) Method for performing data renewal
CN202995765U (en) 18-module non-contact IC card INLAY testing device

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