[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110995913A - Non-contact smart card testing method based on NFC smart phone - Google Patents

Non-contact smart card testing method based on NFC smart phone Download PDF

Info

Publication number
CN110995913A
CN110995913A CN201911110429.5A CN201911110429A CN110995913A CN 110995913 A CN110995913 A CN 110995913A CN 201911110429 A CN201911110429 A CN 201911110429A CN 110995913 A CN110995913 A CN 110995913A
Authority
CN
China
Prior art keywords
smart card
mobile phone
nfc
data
test
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
CN201911110429.5A
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 CEC Huada Electronic Design Co Ltd
Original Assignee
Beijing CEC Huada Electronic Design 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 CEC Huada Electronic Design Co Ltd filed Critical Beijing CEC Huada Electronic Design Co Ltd
Priority to CN201911110429.5A priority Critical patent/CN110995913A/en
Publication of CN110995913A publication Critical patent/CN110995913A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/73Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for taking measurements, e.g. using sensing coils

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a non-contact smart card testing method based on an NFC function smart phone, aiming at the problem of data communication compatibility between the non-contact smart card and NFC mobile phones of different models. The non-contact smart card testing method based on the NFC function smart phone comprises the following steps: the mobile phone end compiles a test script, analyzes the test script, sends an instruction of the smart card, responds and receives the smart card and processes data. The invention realizes the complete data test and transaction process of the mobile phone with the NFC function and the non-contact smart card by establishing a complete test process, and the data process also comprises the steps of judging the abnormal processing between the non-contact smart card and the mobile phone with the NFC function, and the storage and format judgment of test data. The invention relates to the field of test and verification of a non-contact smart card, which is applied to the test between the non-contact smart card and smart phones with NFC functions of different models, thereby achieving the purpose of compatibility test.

Description

Non-contact smart card testing method based on NFC smart phone
Technical Field
The invention relates to the technical field of test verification, in particular to compatibility test of a smart card, an NFC smart phone and a non-contact smart card.
Background
Near Field Communication (NFC) is a short-range, high-frequency wireless Communication technology that allows contactless point-to-point data transmission and exchange of data between electronic devices. NFC is widely applied to mobile payment, identity authentication, entrance guard and other scenes. Along with the wide application of the NFC to the mobile phone end, data interaction between different NFC smart phones and contactless smart cards is more and more frequent.
Due to the wide application of the NFC smart phone and the non-contact smart card, the compatibility problem of data communication between different types of NFC smart phones and different types of non-contact smart cards is caused. Most of the existing schemes for the compatibility test in the market have inflexible functions and low automation degree, and are mainly the intelligent card compatibility test realized based on a PC. Currently, an effective automatic test scheme for an NFC smart phone and a contactless smart card is lacking, and particularly, an automatic detection scheme that can complete all test procedures at a phone end and flexibly formulate a test strategy is lacking.
Disclosure of Invention
In order to solve the test problem of the non-contact smart card, the invention provides a non-contact smart card test method based on an NFC smart phone, which can realize a complete automatic test flow at a mobile phone end, realize test schemes under different conditions and improve test efficiency and accuracy.
The invention provides a non-contact smart card testing method based on an NFC smart phone, which comprises the steps of compiling a testing script at a mobile phone end, loading and analyzing the testing script by the mobile phone, sending an APDU testing instruction set to a smart card by the mobile phone, returning response data by the smart card, receiving and analyzing the data by the mobile phone, giving a testing result and achieving the goal of compatibility testing of the smart card.
The invention relates to a smart phone with an NFC function, in particular to a non-contact smart card, which is a smart phone with an NFC function, wherein the communication mode between the smart card and a mobile phone is NFC communication.
The invention compiles and debugs the test script at the mobile phone end, and the test script has a fixed grammar format. And flexibly customizing the required test scheme according to different test targets through APDU instructions, SW expected to be returned, numerical values expected to be returned, data length expected to be returned, script annotation, cycle control and other functions.
The mobile phone sends the test instruction to the smart card in an NFC transmission mode. The mobile phone establishes NFC connection with the smart card by using the system API, and transmits an APDU command to the smart card through the NFC module transmission system API interface. And when the connection is unsuccessful or the data transmission is abnormal, the mobile phone intercepts abnormal information and performs abnormal processing.
The smart card receives the instruction data, transmits the response data to the mobile phone through the NFC transmission channel, and the mobile phone analyzes the response data, separates and extracts different fields of the data according to NFC related protocols for data verification.
According to the verification strategy made in the script, the mobile phone verifies the response data through the state characters, the numerical values and the data length data, and judges whether the response data is in accordance with the expectation, so that whether the data communication between the mobile phone and the intelligent card is correct or not is judged, and the compatibility problem exists.
The invention controls the integrity of the test through the cycle times and the interruption conditions, and ensures that the compatibility communication performance of the mobile phone and the smart card is accurately judged.
In the invention, each link of the test process can record the log text, and all the processes can be displayed on the mobile phone, including the abnormal information. The log name and the display format can be flexibly defined on the mobile phone.
Drawings
Fig. 1 is a schematic diagram of a testing method of a contactless smart card and an NFC handset.
Fig. 2 is a schematic diagram of a cycle test procedure.
Detailed Description
The following description will discuss the present invention with reference to fig. 1 and 2. This embodiment is described in detail to enable those skilled in the art to practice the invention.
In the attached figure 1 of the embodiment of the invention, a test system of a non-contact smart card and an NFC mobile phone communicates through an NFC communication protocol between the mobile phone and the smart card, and an NFC module belongs to a system module of the mobile phone. Before testing, the mobile phone and the smart card are connected, and if the connection failure program is started, the test can display error information.
And (1) writing and loading a script. And writing a test script by the mobile phone terminal, wherein data in the script has a fixed grammar format. The script data contains a loop number instruction, and fields of an APDU instruction, an expected return SW, an expected response value and an expected response data length. The mobile phone loads the script.
And (2) analyzing the instruction. And (4) after the mobile phone is loaded, carrying out format judgment on the data, if the format conforms to the specified grammar, analyzing the data, if the format does not conform to the specified grammar, carrying out exception handling, displaying error information by the mobile phone, and carrying out the step (6). Otherwise, performing step (3).
And (3) sending an instruction. And the mobile phone sends and tests the analyzed APDU instruction sets one by one through the NFC module. The data transmission test procedure is shown in fig. 2.
And (4) responding to data reception. The smart card sends response data information after receiving the instruction information, and the mobile phone end receives the response data information through the NFC module.
And (5) responding to data processing. And the mobile phone judges the received response data. If the returned data information does not match the expected returned data, indicating a check Fail, step (6) is entered, and Pass is checked, followed by step (7).
And (6) exception handling. And recording the abnormal information in detail.
And (7) storing data. In the test process, the test data and the exception handling information are stored through the step, the test information is stored in a test log, and the test data is displayed in real time by the mobile phone terminal.
Step 4-the received data processing of step 7 is as described in fig. 2. After the instruction set test is completed for one time, if the test times are reached, storing the statistical information in the log, and ending the test, otherwise, continuing to perform the test according to the step (8).
And (8) performing cyclic testing. In fig. 2, the test is performed in a loop until the test instruction set is repeatedly tested according to a predetermined number of times. After the script is analyzed by the mobile phone, a test instruction set is obtained, then legal instructions are sent to the smart card one by one, data verification is carried out on each instruction, verification information of the instruction is generated, and a log is stored. When the loop test is completed, the statistical information is stored in the log.

Claims (8)

1. A non-contact smart card testing method based on an NFC smart phone is characterized by mainly comprising the following steps: 1) writing a test script at a mobile phone end, loading and analyzing the test script by the mobile phone, 2) sending an APDU test instruction set to the smart card by the mobile phone, 3) returning response data by the smart card, receiving and analyzing the data by the mobile phone, and giving a test result, thereby realizing the compatibility test of the mobile phone and the non-connected smart card.
2. The method for testing the contactless smart card based on the NFC smart phone according to claim 1, wherein the mobile phone includes a smart phone having an NFC function, the type of the smart card is a contactless smart card, and the mobile phone communicates with the smart card through an NFC method.
3. The method for testing the non-contact smart card based on the NFC smart phone according to claim 1, wherein the test script is debugged at the mobile phone end, the mobile phone compiles and runs the test script, the test instruction is sent to the smart card through an NFC module of the mobile phone, the smart card receives the instruction, response data is returned through the NFC module, and the mobile phone receives the response data and performs data analysis.
4. The method for testing the contactless smart card based on the NFC smart phone according to claim 1, wherein a test script is written at the phone end, script data includes APDU commands and fields such as SW, values or data lengths that are expected to be returned, and the script supports grammars such as comments and loop control. After the test script is loaded by the mobile phone, syntax analysis is carried out on the script program, format judgment is carried out on the test data, and if the data format meets the requirement, the mobile phone analyzes the script data; and if the data format does not meet the requirements, the mobile phone performs exception handling.
5. The method for testing the contactless smart card based on the NFC smart phone according to claim 1, wherein the mobile phone sends the APDU test instruction set to the smart card, the mobile phone sends the APDU instruction to the contactless smart card through an API interface of an open source in the NFC module, and when sending the instruction, the mobile phone first establishes a connection with the contactless smart card through the NFC module.
6. The method for testing the non-contact smart card based on the NFC smart phone according to claim 1, wherein the smart card returns response data, the smart card receives an APDU command sent by the mobile phone and returns the response data, the mobile phone receives the response data, the mobile phone analyzes the content of the returned data, different fields of the data are separated and extracted according to a protocol, the mobile phone processes the response data according to a check strategy after receiving the response data, and the check strategy is defined in script content through keywords.
7. The method for testing the contactless smart card based on the NFC smart phone according to claims 1 and 6, wherein the mobile phone processes the response data after receiving the response data according to the verification policy, determines whether the APDU response is correct according to whether the status word, the numerical value, or the data length of the APDU response is a set value, and determines that the APDU response data is correct and the mobile phone and the smart card communicate correctly if the response data is the set value; and if the response data is not the set value, the APDU responds an error, and the mobile phone and the smart card communicate abnormally.
8. The method for testing the contactless smart card based on the NFC smart phone according to claim 1, wherein the method is applied to different types of NFC smart phones and contactless smart cards for performing transaction flow communication, and is also applied to different types of NFC smart phones and contactless smart cards for performing transaction flow communication, thereby achieving the purpose of compatibility testing.
CN201911110429.5A 2019-11-14 2019-11-14 Non-contact smart card testing method based on NFC smart phone Pending CN110995913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911110429.5A CN110995913A (en) 2019-11-14 2019-11-14 Non-contact smart card testing method based on NFC smart phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911110429.5A CN110995913A (en) 2019-11-14 2019-11-14 Non-contact smart card testing method based on NFC smart phone

Publications (1)

Publication Number Publication Date
CN110995913A true CN110995913A (en) 2020-04-10

Family

ID=70084260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911110429.5A Pending CN110995913A (en) 2019-11-14 2019-11-14 Non-contact smart card testing method based on NFC smart phone

Country Status (1)

Country Link
CN (1) CN110995913A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113193923A (en) * 2021-04-29 2021-07-30 中国工商银行股份有限公司 Remote testing method, equipment and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034028A1 (en) * 2003-08-05 2005-02-10 Won-Woo Son Device for testing smart card and method of testing the smart card
US20090312009A1 (en) * 2008-06-13 2009-12-17 Jot Automation, Inc. Systems and methods of providing intelligent handset testing
WO2010118612A1 (en) * 2009-04-14 2010-10-21 中兴通讯股份有限公司 Method for installing contactless payment application, smart card and mobile terminal
WO2011035659A1 (en) * 2009-09-28 2011-03-31 中兴通讯股份有限公司 Method and apparatus for secondary development of function mobile phone
CN102378212A (en) * 2010-08-20 2012-03-14 上海手机测试公共服务平台有限公司 Device and method for automatically testing compatibility of subscriber identity module (SIM) card
CN105184337A (en) * 2015-08-25 2015-12-23 大唐微电子技术有限公司 Intelligent card application detection method and system for NFC equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034028A1 (en) * 2003-08-05 2005-02-10 Won-Woo Son Device for testing smart card and method of testing the smart card
US20090312009A1 (en) * 2008-06-13 2009-12-17 Jot Automation, Inc. Systems and methods of providing intelligent handset testing
WO2010118612A1 (en) * 2009-04-14 2010-10-21 中兴通讯股份有限公司 Method for installing contactless payment application, smart card and mobile terminal
WO2011035659A1 (en) * 2009-09-28 2011-03-31 中兴通讯股份有限公司 Method and apparatus for secondary development of function mobile phone
CN102378212A (en) * 2010-08-20 2012-03-14 上海手机测试公共服务平台有限公司 Device and method for automatically testing compatibility of subscriber identity module (SIM) card
CN105184337A (en) * 2015-08-25 2015-12-23 大唐微电子技术有限公司 Intelligent card application detection method and system for NFC equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113193923A (en) * 2021-04-29 2021-07-30 中国工商银行股份有限公司 Remote testing method, equipment and system
CN113193923B (en) * 2021-04-29 2022-10-11 中国工商银行股份有限公司 Remote testing method, equipment and system

Similar Documents

Publication Publication Date Title
CN112965908B (en) Communication test method, device, communication equipment and storage medium
CN108563567B (en) Automated testing method, apparatus, device and computer readable storage medium
CN107908485A (en) Interface parameters transmission method, device, equipment and computer-readable recording medium
EP1677197A1 (en) Test case automatic generation method for testing proactive GSM applications on SIM card
CN103678067A (en) Test method and device for intelligent card power failure and tested device
CN117421217B (en) Automatic software function test method, system, terminal and medium
CN105184337B (en) A kind of NFC device carries out application of IC cards detection method and system
CN110837429A (en) Intelligent repairing method and device for online codes of web terminal
CN114386366A (en) Automatic detection system and method for chip read-write performance in IC verification environment
CN115514680B (en) Method and device for verifying compatibility of module, electronic equipment and storage medium
CN110995913A (en) Non-contact smart card testing method based on NFC smart phone
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
CN113434405A (en) Method and device for determining test file, storage medium and electronic device
CN112000579B (en) Software interface testing method, system, equipment and medium
CN116579365A (en) Antenna detection device, method and equipment of RFID (radio frequency identification) tag used by power grid
CN101221519A (en) Read-write debugging method for flash memory device in processor system
CN110119646B (en) Device parameter setting method and system based on radio frequency card
CN114371966A (en) Multi-interface testing method and system
CN113645052B (en) Firmware debugging method and related equipment
US7020600B2 (en) Apparatus and method for improvement of communication between an emulator unit and a host device
CN112782551B (en) Chip and test system thereof
CN111176975B (en) Test method, device, equipment and computer readable storage medium
CN113806153A (en) Chip verification method
CN113094059A (en) Firmware system data transmission method and burning device thereof
CN107195081B (en) The test method and device of financial transaction terminal, test card, computer-readable medium

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