Nothing Special   »   [go: up one dir, main page]

CN118916273A - Method, system, device, equipment and storage medium for realizing virtual card reader debugging - Google Patents

Method, system, device, equipment and storage medium for realizing virtual card reader debugging Download PDF

Info

Publication number
CN118916273A
CN118916273A CN202410954686.1A CN202410954686A CN118916273A CN 118916273 A CN118916273 A CN 118916273A CN 202410954686 A CN202410954686 A CN 202410954686A CN 118916273 A CN118916273 A CN 118916273A
Authority
CN
China
Prior art keywords
virtual card
card reader
data
software
upper computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410954686.1A
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.)
China United Network Communications Group Co Ltd
China Unicom Online Information Technology Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
China Unicom Online Information Technology Co Ltd
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, China Unicom Online Information Technology Co Ltd filed Critical China United Network Communications Group Co Ltd
Publication of CN118916273A publication Critical patent/CN118916273A/en
Pending legal-status Critical Current

Links

Abstract

The application provides a method, a system, a device, equipment and a storage medium for realizing debugging of a virtual card reader, and relates to the technical field of equipment communication. The method comprises the following steps: acquiring a dynamic library file, and adding a virtual card reader according to the dynamic library file so as to realize communication connection between the software of the upper computer and the virtual card reader; transmitting data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system; and receiving returned information after the data information is processed by the virtual card reader, and taking the returned information as a debugging result. The method solves the problems of simple and convenient debugging operation and strong universality of the virtual card reader on the premise of not additionally installing the driving software.

Description

Method, system, device, equipment and storage medium for realizing virtual card reader debugging
Technical Field
The present application relates to the field of device communications technologies, and in particular, to a method, a system, an apparatus, a device, and a storage medium for implementing virtual card reader debugging.
Background
A smart card is a plastic card with a microelectronic chip embedded therein. The smart card has a very wide application range, and covers a plurality of fields of mobile communication, public transportation, medical care and the like, and is an indispensable part of the society nowadays due to portability, security and versatility. However, the virtual card system adopted for reading and data interaction of the smart card is mainly implemented by each smart card developer, and there is no unified open source system, and the processing is complex in terms of data and other functions of the smart card.
Most of the current methods for realizing virtual electronic card communication are based on socket communication protocol, and data interaction between the virtual electronic card and the upper computer is performed; or the socket communication protocol is matched with the circuit to complete the data interaction. However, the implementation is complex, driving software needs to be installed in advance, and the universality is poor.
On the premise of not additionally installing driving software, the method can realize simple and convenient debugging operation and strong universality of the virtual card reader, and is a problem to be solved urgently.
Disclosure of Invention
The application provides a method, a system, a device, equipment and a storage medium for realizing virtual card reader debugging, which are used for solving the problem that the virtual card reader debugging is simple and convenient to operate and high in universality on the premise of not additionally installing driving software.
In a first aspect, the present application provides a method for implementing debugging of a virtual card reader, where the method is applied to an upper computer, and the method includes:
Acquiring a dynamic library file, and adding a virtual card reader according to the dynamic library file so as to realize communication connection between software of an upper computer and the virtual card reader;
transmitting data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system;
And receiving the returned information after the data information is processed by the virtual card reader, and taking the returned information as a debugging result.
In one possible design, the adding of the virtual card reader according to the dynamic library file includes:
Obtaining a virtual card list according to a first function in a dynamic library file corresponding to software of an upper computer;
And adding the virtual card reader according to the virtual card list.
In one possible design, sending data information to a virtual reader includes:
when the communication connection between the software of the upper computer and the virtual card reader is successful, the ATR data returned by the virtual card reader is obtained, so that whether the communication connection between the virtual card reader and the virtual card system is correct or not is verified according to the ATR data;
When the communication connection between the virtual card reader and the virtual card system is correct, data information is sent to the virtual card reader; wherein, the data information refers to application protocol data unit data information.
In a second aspect, the present application provides a method for implementing virtual card reader debugging, where the method is applied to a virtual card reader, and the method includes:
creating a port, sending an instruction for acquiring ATR data to the virtual card system through the port, and acquiring ATR data returned by the virtual card system;
Transmitting the ATR data to software of an upper computer, and transmitting the acquired data information to a virtual card system; wherein, the data information refers to application protocol data unit data information;
and receiving the information returned after the data information is processed by the virtual card system, and transmitting the information returned after the data information is processed by the virtual card system to software of the upper computer.
In one possible design, the ports include a socket data port and a socket control port, wherein the socket control port is used to indicate status communications between the virtual card reader and the virtual card system; the socket data port is used for indicating data communication between the virtual card reader and the virtual card system;
the dynamic library file comprises a first function, a second function, a third function and a fourth function;
Wherein the first function is generated from a SCARDLISTREADERSA function and a SCARDLISTREADERSW function; the first function is used for indicating to add a card reader name to the card reader list so as to facilitate the addition of the virtual card reader according to the card reader list;
The second function is derived from the SCardConnectA and ScardConnectW functions; the second function is used for establishing a connection mode between software of the upper computer and the virtual card reader;
The third function is generated according to the ScardDisconnect function; the third function is used for indicating the disconnection mode of the software of the upper computer and the virtual card reader;
The fourth function is generated according to SCARDTRANSMIT functions; the fourth function is used for indicating the data transmission mode of the software of the upper computer and the virtual card reader.
In one possible design, sending an instruction for acquiring ATR data to the virtual card system through a port, acquiring ATR data returned by the virtual card system, includes:
Starting a virtual card system, and listening to a socket data port and a socket control port so as to receive instructions of a virtual card reader;
Sending a hot reset instruction to the virtual card system through a socket control port; the hot reset instruction is used for indicating an instruction for acquiring ATR data;
and acquiring ATR data returned by the virtual card system through a socket data port.
In one possible design, the transmitting ATR data to the software of the host computer and transmitting the acquired data information to the virtual card system includes:
transmitting ATR data to software of the host computer through a second function;
and acquiring data information sent by the software of the upper computer through the fourth function, and sending the data information to the virtual card system through the socket data port.
In one possible design, the software for receiving information returned after the data information is processed by the virtual card system and sending the information returned after the data information is processed by the virtual card system to the upper computer includes:
The method comprises the steps that a socket data port is used for receiving information returned after the virtual card system processes data information, and the information returned after the virtual card system processes the data information is sent to software of an upper computer through a fourth function;
After the information returned after the data information is processed by the virtual card system is sent to the software of the upper computer through the fourth function, the method further comprises the following steps:
When receiving a disconnection instruction sent by software of an upper computer, closing a port and returning disconnection return information; wherein the instruction for disconnecting is sent by the software of the upper computer through a third function.
In a third aspect, the present application provides a method for implementing a virtual card reader debug system, including: the host computer and the virtual card reader;
The virtual machine is used for realizing the method for debugging the virtual card reader in the first aspect, and the virtual card reader is used for realizing the method for debugging the virtual card reader in the second aspect.
In a fourth aspect, the present application provides a device for implementing debugging of a virtual card reader, where the device is applied to an upper computer, and the device includes:
the acquisition module is used for acquiring the dynamic library file, and adding the virtual card reader according to the dynamic library file so as to realize the communication connection between the software of the upper computer and the virtual card reader;
the data information module is used for sending data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system;
the debugging module is used for receiving the returned information after the data information is processed by the virtual card reader and taking the returned information as a debugging result.
In a fifth aspect, the present application provides a device for implementing debugging of a virtual card reader, where the device is applied to the virtual card reader, and the device includes:
the port creation module is used for creating a port, sending an instruction for acquiring the ATR data to the virtual card system through the port, and acquiring the ATR data returned by the virtual card system;
the data transmitting module is used for transmitting the ATR data to the software of the upper computer and transmitting the acquired data information to the virtual card system; wherein, the data information refers to application protocol data unit data information;
the data receiving module is used for receiving the information returned after the data information is processed by the virtual card system and sending the information returned after the data information is processed by the virtual card system to the software of the upper computer.
In a sixth aspect, the present application provides an electronic device, comprising: a processor, a memory communicatively coupled to the processor;
The memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory for implementing a method for implementing virtual card reader debugging in accordance with the first aspect of the invention and the second aspect of the invention.
In a seventh aspect, the present application provides a computer readable storage medium, where computer executable instructions are stored, where the computer executable instructions, when executed by a processor, are configured to implement the first aspect of the present application and the second aspect of the present application, and a method for implementing a virtual card reader debugging method.
In an eighth aspect, the present application provides a computer program product comprising: computer program, which when being executed by a processor, is used for realizing the method for debugging the virtual card reader.
The method, the system, the device, the equipment and the storage medium for realizing the debugging of the virtual card reader acquire the dynamic library file, and add the virtual card reader according to the dynamic library file so as to realize the communication connection between the software of the upper computer and the virtual card reader; transmitting data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system; and receiving the returned information after the data information is processed by the virtual card reader, and taking the returned information as a debugging result. The following technical effects are realized: the dynamic library file contains a plurality of repackaged functions, so that different functions can be realized respectively, and the functions can be used for realizing the communication between the upper computer and the virtual card reader and the debugging of the upper computer software on the virtual card system; the function in the dynamic library file is utilized to verify the connection correctness of the virtual card system and transfer data, the data is used as data to be debugged, and the upper computer software and the virtual card reader are connected by the dynamic library file; the communication between the virtual card reader and the virtual card system is realized by using the port, and the communication between the upper computer software and the virtual card reader is realized by using the dynamic library file, so that additional driving software and programming are not required to be installed for realizing communication debugging, and the universality is strong.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a system architecture diagram for implementing a virtual card reader debugging method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for implementing virtual card reader debugging according to an embodiment of the present application;
FIG. 3 is a second flow chart for implementing a method for debugging a virtual card reader according to an embodiment of the present application;
FIG. 4 is a third flow chart for implementing a method for debugging a virtual card reader according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for implementing virtual card reader debugging according to an embodiment of the present application;
FIG. 6 is an interaction schematic diagram for implementing a virtual card reader debugging method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a configuration of a system for implementing virtual card reader debugging according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a configuration of a device for implementing virtual card reader debugging according to an embodiment of the present application;
FIG. 9 is a second schematic structural diagram of a device for implementing virtual card reader debugging according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present application.
Reference numerals:
100-upper computer software; 110-virtual card reader I; 120-virtual card system;
710-an upper computer; 720-a second virtual card reader;
810 an acquisition module; 820-a data information module; 830-a debug module;
910-a port creation module; 920-a data transmission module; 930-a data receiving module;
1010-a processor; 1020-memory; 1030-a communication component; 1040-bus.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In embodiments of the present application, the words "first," "second," and the like are used to distinguish between identical or similar items that have substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ. It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion. In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more.
It should be noted that "at … …" in the embodiment of the present application may be an instant when a certain situation occurs, or may be a period of time after a certain situation occurs, which is not particularly limited in the embodiment of the present application. In addition, the implementation method for debugging the virtual card reader provided by the embodiment of the application is only used as an example, and the implementation method for debugging the virtual card reader can also comprise more or less contents.
In order to facilitate the clear description of the technical solutions of the embodiments of the present application, the following simply describes some terms and techniques involved in the embodiments of the present application:
A smart card: is a card with embedded microelectronic chips, generally similar in shape to a credit card, with the ability to store and process data. These cards are not only capable of storing information, but also of performing certain computing tasks. The smart card needs to interact with data through a reader-writer.
Smart card system: the intelligent card system is a comprehensive technical solution for storing and processing data by utilizing the intelligent card, and combines hardware, software and communication technology for realizing the functions of safety identity verification, data protection, transaction management and the like. The method is mainly used for receiving and processing various information sent to the intelligent card by the outside (such as a mobile phone or a card reader), executing various instructions sent by the outside, managing the memory space in the card, sending back response information to the outside and the like.
Virtual card system: the virtual intelligent card system is a set of intelligent card operating system, which can simulate the processing behavior and logic related to the intelligent card.
Virtual card reader: a virtual card reader is a software or hardware solution that mimics the function of a physical card reader, thereby enabling a computer or other electronic device to read information from a smart card, magnetic stripe card tag, or other type of card, even without physical card reader hardware. The communication method is used for realizing communication between the virtual card system and the upper computer software.
Upper computer software: software that communicates with the virtual card reader and that debugs the virtual card system.
Reset response (ATR for short): ATR data in smart card and RFID (radio frequency identification) technology, ATR refers to a series of data sent from a smart card to a card reader after a device reset. ATR data contains information about the smart card, such as its communication rate, protocol characteristics, etc., which is critical to the reader to properly communicate with the smart card.
Application protocol data unit data information (Application Protocol Data Unit, abbreviated APDU data): is a basic information unit for transmitting commands and responses between a smart card and an external device, such as a smart card reader.
7816 Protocol: the 7816 protocol is a set of standards commonly established by the international organization for standardization (ISO) and the International Electrotechnical Commission (IEC), and is primarily used to regulate communication between smart cards (IC cards) and card readers (or interface devices). The series of standards covers a number of aspects including the physical characteristics, electrical characteristics, command set and application program interface of the smart card, etc.
Dynamic link library: it is part of the microsoft windows (Microsoft Windows) operating system and is mainly used for smart card related functions.
Dynamic library file: the dynamic library file of the application repackages some functions on the basis of dynamic link library, so as to facilitate the presentation of the implementation effect of the application.
SCARDLISTREADERSA functions and SCARDLISTREADERSW functions: both functions return a list of names to the reader using a character set.
ScardConnectA functions and SCardConnectW functions: a portion of the PC/SC (Personal Computer/SMART CARD) specification is used to establish a connection with a smart card reader in a smart card application. The main function of both functions is to open a handle to the smart card reader and allow the application to communicate with the smart card via this handle.
SCardReconnect function: SCardReconnect functions are an API function defined in the PC/SC (Personal Computer/SMART CARD) standard for reestablishing a connection between a smart card application and a smart card. This function allows the application to change the sharing mode or communication protocol with the smart card or to resume the connection when an error is encountered during the connection.
SCardDisconnect function: the SCardDisconnect function is an important function in the smart card API (PC/SC specification) for disconnecting the connection to the smart card. When the application completes all interactions with the smart card, this function should be invoked to free up the smart card reader resources and ensure that the smart card returns to a state that is accessible by other applications.
SCardStatusA and SCardStatusW functions: SCardStatusA and SCardStatusW functions are part of the smart card API (PC/SC specification) for querying the status information of the smart card. These two functions allow the application to obtain detailed information about the currently connected smart card, including the name of the reader, the status of the smart card, and some related protocols and communication parameters.
SCardTransmit function: the SCardTransmit function is a key function in the smart card API (PC/SC Specification) for sending and receiving data between the smart card and the application. It is one of the core mechanisms for data exchange in smart card programming, enabling applications to interact with applications on the smart card, performing operations such as authentication, data reading and writing, command responses, etc.
The current smart card has a very wide application range, covers a plurality of fields of mobile communication, public transportation, medical care and the like, and is an indispensable part of the current society due to portability, safety and versatility.
The existing virtual card systems corresponding to the intelligent card or the electronic card are all realized by all intelligent card developers, and a unified open source platform is not available. Nowadays, the method for implementing virtual electronic card communication mainly includes: the created circuit is called to cooperate with socket communication protocol to realize communication and reading and writing in the electronic card and the upper computer software.
However, there are the following technical problems:
in the first aspect, the existing smart card and the electronic matched virtual card system are developed by a smart card developer, different cards correspond to different systems, and a unified platform is not used for management, so that the universality is low;
In the second aspect, the existing virtual card reader technology is generally complex to implement, requires additional installation of driving software and programming of a system driver, is complex in implementation mode, and is complex in debugging process of the virtual card system.
Therefore, how to realize simple and convenient debugging operation and strong universality of the virtual card reader without additionally installing driving software is a problem to be solved in the invention.
Based on this, the embodiment of the application provides a method, a system, a device, equipment and a storage medium for realizing the debugging of a virtual card reader, which can be used in the technical field of equipment communication and aims to solve the technical problems in the prior art.
Fig. 1 is a schematic diagram of a system architecture for implementing a virtual card reader debugging method according to an embodiment of the present application. The system architecture diagram may be used in various scenarios as described below, as well as in other scenarios not indicated. The virtual card system, virtual card reader and host software shown in the figures are not actual devices and are drawn separately for distinction.
As shown in fig. 1, when a dynamic library file is placed in a software folder of the upper computer software 100, a card reader list is obtained through the dynamic library file at the same time, and a name of a virtual card reader 110 is added, so that communication connection between the upper computer software 100 and the virtual card reader 110 is finally realized; thus, the virtual card reader can implement instructions and data interaction between the host computer software 100 and the virtual card reader through functions in the dynamic library file.
The virtual card system 120 acquires the instruction or data sent by the virtual card reader 110 through the listening data port and the control port, and then sends the processed data to the virtual card reader 110 through the port. The first virtual card reader 110 sends the data to the host computer software 100, so that the host computer software 100 can debug the virtual card system 120.
Fig. 2 is a flowchart illustrating a method for implementing virtual card reader debugging according to an embodiment of the present application. As shown in fig. 2, the method includes:
S201, acquiring a dynamic library file, and adding a virtual card reader according to the dynamic library file to realize communication connection between software of an upper computer and the virtual card reader.
Specifically, a dynamic library file is obtained, a virtual card reader function is realized according to the dynamic library file, and the own virtual card reader name is added, so that the communication connection between the software of the upper computer and the virtual card reader is realized.
S202, sending data information to the virtual card reader.
The data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system.
Specifically, the host software transmits data for debugging the virtual card system to the virtual card reader.
S203, receiving returned information after the virtual card reader processes the data information, and taking the returned information as a debugging result;
Specifically, the information returned after the virtual card reader processes the data information is received, and the obtained information is the data after the upper computer software debugs the virtual card system.
The application provides a method for realizing virtual card reader debugging, which comprises the steps of obtaining a dynamic library file, and adding a virtual card reader according to the dynamic library file so as to realize communication connection between software of an upper computer and the virtual card reader; transmitting data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system; and receiving the returned information after the data information is processed by the virtual card reader, and taking the returned information as a debugging result. The following technical effects are realized: the dynamic library file contains a plurality of repackaged functions, so that different functions can be realized respectively, and the functions can be used for realizing the communication between the upper computer and the virtual card reader and the debugging of the upper computer software on the virtual card system; the function in the dynamic library file is utilized to verify the connection correctness of the virtual card system and transfer data, the data is used as data to be debugged, and the upper computer software and the virtual card reader are connected by the dynamic library file; the communication between the virtual card reader and the virtual card system is realized by using the port, and the communication between the upper computer software and the virtual card reader is realized by using the dynamic library file, so that additional driving software and programming are not required to be installed for realizing communication debugging, and the universality is strong.
FIG. 3 is a second flowchart illustrating a method for implementing virtual card reader debugging according to an embodiment of the present application. The embodiment describes in detail a method for implementing virtual card reader debugging applied to an upper computer based on the embodiment of fig. 2, as shown in fig. 3, and the method for implementing virtual card reader debugging provided in the embodiment includes:
S301, acquiring a dynamic library file.
Specifically, the dynamic library file is to repackage the functions in the dynamic link library. And acquiring the dynamic library file at the moment.
S302, obtaining a virtual card list according to a first function in a dynamic library file corresponding to software of the upper computer.
Specifically, a path of the dynamic library file is identified, and according to the path, the dynamic library file corresponding to the software of the upper computer on the same path can be preferentially identified.
And obtaining a virtual card reader list through the dynamic library file, and obtaining a card list corresponding to the upper computer software according to the first function by the dynamic library file.
S303, adding the virtual card reader according to the virtual card list.
Specifically, according to the obtained virtual card reader list, a virtual card reader required by the user is added.
S304, when the communication connection between the software of the upper computer and the virtual card reader is successful, the ATR data returned by the virtual card reader is obtained, so that whether the communication connection between the virtual card reader and the virtual card system is correct or not is verified according to the ATR data.
Specifically, when the software of the upper computer and the virtual card reader are successfully connected in communication, an instruction for acquiring the ATR data is sent to the virtual card reader, and the ATR data returned by the virtual card reader is acquired. According to the returned ATR data, the upper computer can verify through the function of the dynamic library file to check whether the connection is correct.
And S305, when the communication connection between the virtual card reader and the virtual card system is correct, transmitting data information to the virtual card reader.
Wherein, the data information refers to application protocol data unit data information.
Specifically, when the virtual card reader and the virtual card system are connected properly in communication, APDU data is transmitted to the virtual card reader.
The method for realizing the debugging of the virtual card reader, which is applied to the upper computer, realizes the function of the virtual card reader by utilizing the dynamic library file, thereby solving the communication debugging problem of the software of the upper computer and the virtual card system.
Fig. 4 is a flowchart illustrating a third method for implementing a virtual card reader debugging method according to an embodiment of the present application. The embodiment describes in detail a method for implementing virtual card reader debugging applied to a virtual card reader based on the embodiment of fig. 2, as shown in fig. 4, and the method for implementing virtual card reader debugging provided in the embodiment includes:
s401, creating a port, sending an instruction for acquiring ATR data to the virtual card system through the port, and acquiring the ATR data returned by the virtual card system.
Specifically, a port is created, and an instruction is sent to the virtual card system through the port, wherein the instruction is to acquire ATR data, and acquire ATR data of the virtual card system.
S402, transmitting the ATR data to software of an upper computer, and transmitting the acquired data information to a virtual card system.
Wherein, the data information refers to application protocol data unit data information.
Specifically, the acquired ATR data is transmitted to the host computer software, data information transmitted from the host computer software is received, and the data information is transmitted to the virtual card system.
S403, receiving information returned after the data information is processed by the virtual card system, and sending the information returned after the data information is processed by the virtual card system to software of the upper computer.
Specifically, the information returned after the data information is processed by the virtual card system is received, and the returned information is sent to the software of the upper computer.
The application provides a method for realizing debugging of a virtual card reader, which comprises the steps of creating a port, sending an instruction for acquiring ATR data to a virtual card system through the port, and acquiring the ATR data returned by the virtual card system; transmitting the ATR data to software of an upper computer, and transmitting the acquired data information to a virtual card system; wherein, the data information refers to application protocol data unit data information; and receiving the information returned after the data information is processed by the virtual card system, and transmitting the information returned after the data information is processed by the virtual card system to software of the upper computer. The following technical effects are realized: through the created port, the interaction between the virtual card reader and the virtual card system is realized; and the interaction between the virtual card reader and the software of the upper computer is realized by using the repackaged function in the dynamic library file.
Fig. 5 is a flowchart illustrating a method for implementing virtual card reader debugging according to an embodiment of the present application. The embodiment describes in detail specific steps of a method for implementing virtual card reader debugging applied to a virtual card reader on the basis of the embodiment of fig. 4, and as shown in fig. 4, the method for implementing virtual card reader debugging provided in the embodiment includes:
S501, creating a port.
Specifically, two ports are created, a socket data port and a socket control port, respectively.
In one possible design, the ports include a socket data port and a socket control port, wherein the socket control port is used to indicate status communications between the virtual card reader and the virtual card system; the socket data port is used for indicating data communication between the virtual card reader and the virtual card system;
the dynamic library file comprises a first function, a second function, a third function and a fourth function;
Wherein the first function is generated from a SCARDLISTREADERSA function and a SCARDLISTREADERSW function; the first function is used for indicating to add a card reader name to the card reader list so as to facilitate the addition of the virtual card reader according to the card reader list;
The second function is derived from the SCardConnectA and ScardConnectW functions; the second function is used for establishing a connection mode between software of the upper computer and the virtual card reader;
The third function is generated according to the ScardDisconnect function; the third function is used for indicating the disconnection mode of the software of the upper computer and the virtual card reader;
The fourth function is generated according to SCARDTRANSMIT functions; the fourth function is used for indicating the data transmission mode of the software of the upper computer and the virtual card reader.
Specifically, the created two ports, namely the added and modified Socket communication port, implement 7816 protocol, so that the virtual card system can perform communication interaction with the virtual card reader through the Socket port according to 7816 protocol.
The dynamic library file contains a plurality of functions: the first function is generated based on SCARDLISTREADERSA functions and SCARDLISTREADERSW functions, repackaging the relevant data. The first function may be used to add its own virtual card reader name to the card reader list, and read to the virtual card reader list through SCARDLISTREADERSA functions and SCARDLISTREADERSW functions, so that the original card reader list and the newly added virtual card reader name may be obtained.
The second function is generated based on the SCardConnectA and ScardConnectW functions. The second function is used to determine whether the selection is a virtual reader. If the virtual card reader is selected, a specific resource manager context is used for calling the application program and the smart card contained in the specific reader to establish connection, namely, the software of the upper computer establishes connection with the smart card in the virtual card reader.
The third function is generated based on the ScardDisconnect functions. The third function can judge whether the selected virtual card reader is the virtual card reader, if the selected virtual card reader is the virtual card reader, the Socket communication port is closed, and a message of successful closing is returned; and if the selection is not the virtual card reader, calling the original dynamic link library file function. The third function is used for the connection that the terminal previously opened between the calling application and the smart card in the target reader.
The fourth function is generated based on the SCARDTRANSMIT functions. The fourth function is used to indicate that a service request is sent to the smart card and that data is desired to be received from the smart card. The fourth function may determine whether the connection is a virtual card reader, and if so, send and receive APDU data.
The dynamic library file further comprises: a fifth function and a sixth function.
The fifth function is generated based on the ScardReconnect function for reestablishing the existing connection between the application and thus the smart card. The fifth function can judge whether the selected function is a virtual card reader or not, and if the selected function is the virtual card reader, the dynamic link library is called; if not, the ATR data may be retrieved for verification.
The sixth function is generated based on SCardStatusA and ScardStatusW. For providing the status of a smart card in a reader. The sixth function can judge whether the selection is a virtual card reader or not, and if the selection is not the virtual card reader, the dynamic link library is called; if the card reader is a virtual card reader, the protocol parameters can be modified, the ATR value can be modified, the name of the virtual card reader can be added, and the successful addition information can be returned.
S502, starting the virtual card system, and listening to the socket data port and the socket control port so as to receive instructions of the virtual card reader.
Specifically, a virtual card system is started, and the virtual card system listens to a socket port so as to receive instructions and data sent by a virtual card reader.
S503, sending a hot reset instruction to the virtual card system through a socket control port; wherein the hot reset instruction is used to instruct the instruction to acquire ATR data.
Specifically, the virtual card reader sends a hot reset instruction to the virtual card system through the socket control port so as to acquire ATR data from the virtual card system.
S504, obtaining ATR data returned by the virtual card system through a socket data port.
Specifically, the virtual card reader obtains ATR data returned by the virtual card system through a socket data port.
S505, transmitting the ATR data to software of the upper computer through a second function.
Specifically, the acquired ATR data is sent to the software of the host computer through the second function.
S506, acquiring data information sent by the software of the upper computer through a fourth function, and sending the data information to the virtual card system through a socket data port.
Specifically, the data information sent by the software of the upper computer is obtained through the fourth function, and the received data information is sent to the virtual card system through the socket data port.
S507, receiving information returned after the data information is processed by the virtual card system through the socket data port, and sending the information returned after the data information is processed by the virtual card system to software of the upper computer through a fourth function.
Specifically, after the data information is sent to the virtual card system, the virtual card system processes the data information, acquires the data information processed by the virtual card system, and sends the data information processed by the virtual card system to software of the upper computer.
The application provides a method for realizing debugging of a virtual card reader, which is used for realizing interaction between the virtual card reader and a virtual card system through a created port; the interaction between the virtual card reader and the software of the upper computer is realized by utilizing the repackaged function in the dynamic library file, the problem that the driving software is required to be installed and the new program is written when the virtual card system is debugged is avoided by utilizing the dynamic library file, and the communication and debugging among the upper computer software, the virtual card reader and the virtual card system are realized.
The following is a specific case provided by this embodiment based on fig. 2, 3,4 and 5:
taking the upper computer software PyApduTool as an example, the developer dynamic link library corresponding to the smart card is a wincard.
FIG. 6 is an interaction diagram for implementing a method for debugging a virtual card reader according to an embodiment of the present application.
As shown in fig. 6, the method includes:
s601, acquiring a dynamic library file of a virtual card reader;
On the basis of the dynamic link library, writing a dynamic library file, reloading the function of the original wincard. The dynamic library file is required to be placed in a software file of the upper computer, so that newly added virtual card readers are identified when software of the upper computer acquires a card list of the upper computer.
And adding and modifying a socket communication interface by the owner of the virtual card system to realize 7816 protocol. The port is used for realizing communication connection between the virtual card reader and the virtual card system.
S602, software of the upper computer acquires a card reader list and adds a virtual card reader.
The software of the upper computer obtains a card reader list through a dynamic link library, and the dynamic library file can obtain the card list of the upper computer through a first function and adds the required virtual card reader name.
S603, the virtual card reader returns the card list to software of the upper computer.
The virtual card system is started and the port is listened to. The virtual card system is enabled to be in an operation state, and the virtual card system is enabled to listen to the port so as to receive instructions and data from the virtual card reader at any time.
S604, the upper computer selects a virtual card reader from the card list.
The software of the upper computer selects the virtual card reader to be connected from the card list.
S605, creating a port by the virtual card reader.
The virtual card reader adds or modifies a socket communication interface to realize 7816 protocol.
S606, the virtual card reader returns the successful selection information to the software of the upper computer.
S607, the software of the upper computer is connected with the virtual card reader.
The software of the upper computer can establish connection with the virtual card reader through a second function.
And S608, the virtual card reader sends a hot reset notification to the virtual card system through the socket control port.
The virtual card reader sends a notification of obtaining ATR data to the virtual card system through the socket control port.
S609, the virtual card system obtains a hot reset instruction from the socket control port, and sends an ATR to the virtual card reader through the socket data port.
The virtual card system obtains a hot reset instruction from the socket control port, and sends the ATR to the virtual card reader through the socket data port for sending.
And S610, the virtual card reader returns the acquired ATR data to the software of the upper computer through a second function.
And the virtual card reader sends the acquired ATR data to software of the upper computer through a second function. The software of the upper computer can judge whether the target virtual card reader is selected according to the ATR data through a function in the dynamic library file. If the virtual card reader is selected, a sixth function provides the current state of the intelligent card in the current card reader, the protocol parameters are modified, the ATR value is modified, the name of the virtual card reader is added, and the information of successful selection is returned; or the fifth function may call the reset method to retrieve the ATR. If the selected virtual card reader is not the target virtual card reader, calling the original dynamic link library.
S611, software of the upper computer sends APDU data to the virtual card reader through the fourth function.
And the software of the upper computer sends ADPU data to the virtual card reader through a fourth function.
S612, the virtual card reader sends the APDU data to the virtual card system.
The virtual card reader sends the APDU data to the virtual card system through the socket data port.
S613, the virtual card system performs debugging processing on the APDU data.
And the virtual card system performs debugging processing on the acquired APDU data.
And S614, returning the processed APDU data to the virtual card reader.
And returning the processed APDU data to the virtual card reader.
S615, the virtual card reader sends the processed APDU data to software of the upper computer through a fourth function.
And the virtual card reader sends the processed APDU data to software of the upper computer through a fourth function.
The software of the upper computer, the virtual card reader and the virtual card system repeatedly execute the steps S611-S615. Until the software of the upper computer does not interact with the virtual card system any more, the virtual card system is debugged.
S616, the software of the upper computer sends a disconnection instruction to the virtual card reader through a third function.
S617, the virtual card reader closes the port according to the instruction of disconnection.
And S618, the virtual card reader sends the information of successful disconnection to the software of the upper computer.
According to the method for realizing the virtual card reader debugging, the functions of the original functions are reloaded by replacing some function methods of the corresponding dynamic link library according to different upper computer software, so that the upper computer software can communicate and debug the virtual card reader and the virtual card system according to different dynamic library files; with the new modified functions, the virtual card reader and the virtual card system can be verified, and if not, the ATR data can be obtained again for verification; the number of the ports is two, and different ports are adopted for transmission according to different instructions and data transmission.
The scheme provided by the embodiment of the invention is introduced aiming at the functions realized by the electronic equipment and the main control equipment. It will be appreciated that the electronic device or the master device, in order to implement the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. The present embodiments can be implemented in hardware or a combination of hardware and computer software in combination with the various exemplary elements and algorithm steps described in connection with the embodiments disclosed in the embodiments of the present invention. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present invention.
The system for realizing the virtual card reader debugging is shown in fig. 7, and comprises an upper computer and a virtual card reader, and is applied to the method for realizing the virtual card reader debugging in the embodiment.
An implementation virtual card reader commissioning system comprising: the host computer 710 and the virtual card reader two 720.
The virtual machine is used for realizing the method for debugging the virtual card reader in the first aspect, and the virtual card reader is used for realizing the method for debugging the virtual card reader in the second aspect.
According to the virtual card reader debugging system, the upper computer acquires the dynamic library file, and the name of the virtual card reader is added according to the dynamic library file, so that the upper computer software is connected with the target virtual card reader, and the virtual card reader can realize data interaction and instruction interaction with the upper computer software through functions of the dynamic library file.
Fig. 8 is a schematic diagram of a structure for implementing a virtual card reader debugging device according to an embodiment of the present application. As shown in fig. 8, the implementation of the virtual card reader debugging device is applied to an upper computer, and includes: an acquisition module 810, a data information module 820, and a debug module 830.
The obtaining module 810 is configured to obtain a dynamic library file, and perform addition of a virtual card reader according to the dynamic library file, so as to implement communication connection between software of an upper computer and the virtual card reader;
A data information module 820 for sending data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system;
the debug module 830 is configured to receive information returned after the data information is processed by the virtual card reader, and take the returned information as a debug result.
In one possible design, the acquisition module 810 includes:
the list module is used for acquiring a virtual card list according to a first function in a dynamic library file corresponding to software of the upper computer;
And the adding module is used for adding the virtual card reader according to the virtual card list.
In one possible design, the data information module 820 includes:
The verification module is used for acquiring ATR data returned by the virtual card reader when the software of the upper computer and the virtual card reader are successfully connected in communication, so as to verify whether the virtual card reader and the virtual card system are correctly connected in communication according to the ATR data;
the information sending module is used for sending data information to the virtual card reader when the communication connection between the virtual card reader and the virtual card system is correct; wherein, the data information refers to application protocol data unit data information.
FIG. 9 is a second schematic diagram of a configuration of a device for implementing virtual card reader debugging according to an embodiment of the present application. As shown in fig. 9, implementing a virtual card reader debugging device, applied to a virtual card reader, includes: a port creation module 910, a data transmission module 920, and a data reception module 930.
The port creation module 910 is configured to create a port, send an instruction for acquiring ATR data to the virtual card system through the port, and acquire ATR data returned by the virtual card system;
The data sending module 920 is configured to send ATR data to software of an upper computer, and send the obtained data information to a virtual card system; wherein, the data information refers to application protocol data unit data information;
The data receiving module 930 is configured to receive information returned after the data information is processed by the virtual card system, and send the information returned after the data information is processed by the virtual card system to software of the upper computer.
In one possible design, the ports include a socket data port and a socket control port, wherein the socket control port is used to indicate status communications between the virtual card reader and the virtual card system; the socket data port is used for indicating data communication between the virtual card reader and the virtual card system;
the dynamic library file comprises a first function, a second function, a third function and a fourth function;
Wherein the first function is generated from a SCARDLISTREADERSA function and a SCARDLISTREADERSW function; the first function is used for indicating to add a card reader name to the card reader list so as to facilitate the addition of the virtual card reader according to the card reader list;
The second function is derived from the SCardConnectA and ScardConnectW functions; the second function is used for establishing a connection mode between software of the upper computer and the virtual card reader;
The third function is generated according to the ScardDisconnect function; the third function is used for indicating the disconnection mode of the software of the upper computer and the virtual card reader;
The fourth function is generated according to SCARDTRANSMIT functions; the fourth function is used for indicating the data transmission mode of the software of the upper computer and the virtual card reader.
In one possible design, port creation module 910 includes:
The starting module is used for starting the virtual card system, and listening to the socket data port and the socket control port so as to receive the instruction of the virtual card reader;
The instruction module is used for sending a hot reset instruction to the virtual card system through the socket control port; the hot reset instruction is used for indicating an instruction for acquiring ATR data;
And the return module is used for acquiring the ATR data returned by the virtual card system through the socket data port.
In one possible design, the data transmission module 920 includes:
the data sending module is used for sending the ATR data to the software of the upper computer through the second function;
and the unit data module is used for acquiring data information sent by the software of the upper computer through the fourth function and sending the data information to the virtual card system through the socket data port.
In one possible design, the data receiving module 930 includes:
The return information processing module is used for receiving information returned after the data information is processed by the virtual card system through the socket data port, and sending the information returned after the data information is processed by the virtual card system to software of the upper computer through a fourth function;
After the data receiving module 930, the method further includes:
The disconnection module is used for closing the port and returning the disconnection return information when receiving a disconnection instruction sent by the software of the upper computer; wherein the instruction for disconnecting is sent by the software of the upper computer through a third function
The implementation of the virtual card reader debugging device provided in this embodiment may be performed by implementing the virtual card reader debugging method in the above embodiment, and the implementation principle and technical effects are similar, which is not repeated here.
In the foregoing specific implementation of a method for implementing a virtual card reader, each module may be implemented as a processor, and the processor may execute computer-executable instructions stored in a memory, so that the processor executes the foregoing method for implementing a virtual card reader.
The embodiment of the invention can divide the functional modules of the electronic device or the main control device according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present invention, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 10 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device includes: at least one processor 1010 and a memory 1020. The electronic device further comprises a communication part 1030. Wherein the processor 1010, the memory 1020, and the communication unit 1030 are connected by a bus 1040.
In a particular implementation, the at least one processor 1010 executes computer-executable instructions stored in the memory 1020 such that the at least one processor 1010 performs one implementation of the virtual card reader debugging method as performed on the electronic device side above.
The specific implementation process of the processor 1010 may refer to the above method embodiment, and its implementation principle and technical effects are similar, which is not described herein.
In the above embodiment, it should be understood that the Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: DIGITAL SIGNAL Processor, abbreviated as DSP), application specific integrated circuits (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The scheme provided by the embodiment of the invention is introduced aiming at the functions realized by the electronic equipment and the main control equipment. It will be appreciated that the electronic device or the master device, in order to implement the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. The present embodiments can be implemented in hardware or a combination of hardware and computer software in combination with the various exemplary elements and algorithm steps described in connection with the embodiments disclosed in the embodiments of the present invention. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present invention.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are used for realizing the virtual card reader debugging method when being executed by a processor.
The above-described readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). The processor and the readable storage medium may reside as discrete components in an electronic device or a master device.
The present application also provides a computer program product comprising: a computer program stored in a readable storage medium, from which the computer program can be read by at least one processor of an electronic device, the computer program, when executed by the processor, being adapted to carry out a method for implementing a virtual card reader debugging as described above.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
While the present application has been described with reference to the preferred embodiments shown in the drawings, it will be readily understood by those skilled in the art that the scope of the application is not limited to those specific embodiments, and the above examples are intended only to illustrate the technical aspects of the application, not to limit it; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (13)

1. The method for realizing the debugging of the virtual card reader is characterized by being applied to an upper computer, and comprises the following steps:
acquiring a dynamic library file, and adding a virtual card reader according to the dynamic library file so as to realize communication connection between the software of the upper computer and the virtual card reader;
Transmitting data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system;
And receiving returned information after the data information is processed by the virtual card reader, and taking the returned information as a debugging result.
2. The method of claim 1, wherein the adding a virtual card reader based on the dynamic library file comprises:
Obtaining a virtual card list according to a first function in a dynamic library file corresponding to the software of the upper computer;
And adding the virtual card reader according to the virtual card list.
3. The method of claim 2, wherein the sending data information to the virtual reader comprises:
When the communication connection between the software of the upper computer and the virtual card reader is successful, acquiring ATR data returned by the virtual card reader, and verifying whether the communication connection between the virtual card reader and the virtual card system is correct according to the ATR data;
When the communication connection between the virtual card reader and the virtual card system is correct, the data information is sent to the virtual card reader; wherein the data information refers to application protocol data unit data information.
4. A method for implementing virtual card reader debugging, wherein the method is applied to a virtual card reader, and the method comprises:
Creating a port, sending an instruction for acquiring ATR data to a virtual card system through the port, and acquiring the ATR data returned by the virtual card system;
Transmitting the ATR data to software of an upper computer, and transmitting the acquired data information to the virtual card system; wherein, the data information refers to application protocol data unit data information;
And receiving the information returned after the data information is processed by the virtual card system, and sending the information returned after the data information is processed by the virtual card system to the software of the upper computer.
5. The method of claim 4, wherein the ports comprise a socket data port and a socket control port, wherein the socket control port is configured to indicate status communications between the virtual card reader and the virtual card system; the socket data port is used for indicating data communication between the virtual card reader and the virtual card system;
The dynamic library file comprises a first function, a second function, a third function and a fourth function;
Wherein the first function is generated according to SCARDLISTREADERSA functions and SCARDLISTREADERSW functions; the first function is used for indicating to add a card reader name to a card reader list so as to add a virtual card reader according to the card reader list;
the second function is derived from the SCardConnectA and ScardConnectW functions; the second function is used for establishing a connection mode between the software of the upper computer and the virtual card reader;
the third function is generated according to the ScardDisconnect function; the third function is used for indicating the disconnection mode of the software of the upper computer and the virtual card reader;
The fourth function is generated according to SCARDTRANSMIT functions; and the fourth function is used for indicating the software of the upper computer and the data transmission mode of the virtual card reader.
6. The method of claim 5, wherein said sending, via said port, an instruction to a virtual card system for obtaining ATR data, obtaining said ATR data returned by said virtual card system, comprises:
starting the virtual card system, and listening to the socket data port and the socket control port so as to receive the instruction of the virtual card reader;
sending a hot reset instruction to the virtual card system through the socket control port; wherein the hot reset instruction is used for indicating an instruction for acquiring ATR data;
And acquiring ATR data returned by the virtual card system through the socket data port.
7. The method of claim 6, wherein the transmitting the ATR data to the software of the host computer and transmitting the acquired data information to the virtual card system comprises:
Software for transmitting the ATR data to the host computer via the second function;
and acquiring data information sent by the software of the upper computer through a fourth function, and sending the data information to the virtual card system through a socket data port.
8. The method of claim 7, wherein the software for receiving the information returned by the virtual card system after processing the data information and transmitting the information returned by the virtual card system after processing the data information to the host computer comprises:
receiving information returned after the data information is processed by the virtual card system through the socket data port, and sending the information returned after the data information is processed by the virtual card system to software of the upper computer through a fourth function;
after the information returned after the virtual card system processes the data information is sent to the software of the upper computer through a fourth function, the method further comprises the following steps:
When receiving a disconnection instruction sent by the software of the upper computer, closing the port and returning disconnection return information; and the instruction of disconnection is sent by the software of the upper computer through a third function.
9. A system for implementing a virtual reader debug, comprising: the host computer and the virtual card reader;
The virtual machine is used for realizing the method for realizing the debugging of the virtual card reader according to any one of claims 1 to 3, and the virtual card reader is used for realizing the method for realizing the debugging of the virtual card reader according to any one of claims 4 to 8.
10. The device for realizing the debugging of the virtual card reader is characterized by being applied to an upper computer, and comprises:
the acquisition module is used for acquiring a dynamic library file, and adding a virtual card reader according to the dynamic library file so as to realize communication connection between the software of the upper computer and the virtual card reader;
The data information module is used for sending data information to the virtual card reader; the data information is used for indicating software of the upper computer to debug the virtual card system; the virtual card system refers to a smart card operating system;
And the debugging module is used for receiving the returned information after the data information is processed by the virtual card reader and taking the returned information as a debugging result.
11. An apparatus for implementing virtual card reader debugging, wherein the apparatus is applied to a virtual card reader, and the apparatus comprises:
The port creation module is used for creating a port, sending an instruction for acquiring ATR data to the virtual card system through the port, and acquiring the ATR data returned by the virtual card system;
The data transmitting module is used for transmitting the ATR data to software of an upper computer and transmitting the acquired data information to the virtual card system; wherein, the data information refers to application protocol data unit data information;
and the data receiving module is used for receiving the information returned after the data information is processed by the virtual card system and sending the information returned after the data information is processed by the virtual card system to the software of the upper computer.
12. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor, when executing the computer-executable instructions stored in the memory, is configured to implement a method for implementing a virtual card reader debug as claimed in any one of claims 1 to 3 or a method for implementing a virtual card reader debug as claimed in any one of claims 4 to 8.
13. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, are adapted to implement a method of implementing a virtual reader debugging method as claimed in any one of claims 1 to 3 or a method of implementing a virtual reader debugging method as claimed in any one of claims 4 to 8.
CN202410954686.1A 2024-07-16 Method, system, device, equipment and storage medium for realizing virtual card reader debugging Pending CN118916273A (en)

Publications (1)

Publication Number Publication Date
CN118916273A true CN118916273A (en) 2024-11-08

Family

ID=

Similar Documents

Publication Publication Date Title
US8768250B2 (en) Enhanced near field communication terminal, smart card and communication method thereof
US8424770B2 (en) Method and device for customizing a portable electronic entity
US10268494B2 (en) Information processing device, information processing method and program
US9311588B2 (en) Secure portable object
US9158598B2 (en) Apparatus, method, program and system for processing information utilizing a multi-platform capable of managing a plurality of applications
EP2048590A1 (en) Method for communication, communication device and secure processor
CN106663017B (en) Method, terminal, data routing method and device for realizing host card simulation
CN103455349A (en) Method and device for accessing intelligent card by application program
CN105184337B (en) A kind of NFC device carries out application of IC cards detection method and system
CN105068910B (en) The method of testing and device of a kind of smart card
CN113518341B (en) eSIM code number management method and device
US20100251261A1 (en) Method and Device for Automatically Selecting an Application That Can Be Implemented by Said Device
CN110414651A (en) Debug the method and device of smart card
US8533747B2 (en) Method and system for selecting one or more integrated circuit card interface devices
US8844827B2 (en) Chip card, and method for the software-based modification of a chip card
KR100374526B1 (en) Simplified use of smart cards
CN118916273A (en) Method, system, device, equipment and storage medium for realizing virtual card reader debugging
CN101425120A (en) Card reader and executing method thereof
CN114417900A (en) System and method for realizing unified read-write card and peripheral access
EP3270620A1 (en) Method and devices for managing a secure element
CN112613872A (en) Type 4NFC tag as protocol interface
CN116170794B (en) Online idle issuing system and method for smart card
US11809898B2 (en) Process implemented in an integrated circuit module, corresponding integrated circuit module, system comprising such a module and corresponding computer program
US20240211579A1 (en) Protection of an electronic device
JP2024087308A (en) Electronic information storage medium, ic chip, message transmission method, and program

Legal Events

Date Code Title Description
PB01 Publication