[go: up one dir, main page]

CN100409165C - Device and method for providing intelligent card interface by large scale storage equipment - Google Patents

Device and method for providing intelligent card interface by large scale storage equipment Download PDF

Info

Publication number
CN100409165C
CN100409165C CNB2006101126089A CN200610112608A CN100409165C CN 100409165 C CN100409165 C CN 100409165C CN B2006101126089 A CNB2006101126089 A CN B2006101126089A CN 200610112608 A CN200610112608 A CN 200610112608A CN 100409165 C CN100409165 C CN 100409165C
Authority
CN
China
Prior art keywords
large scale
storage equipment
scale storage
module
monitoring module
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.)
Expired - Fee Related
Application number
CNB2006101126089A
Other languages
Chinese (zh)
Other versions
CN1912822A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Beijing Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feitian Technologies Co Ltd filed Critical Beijing Feitian Technologies Co Ltd
Priority to CNB2006101126089A priority Critical patent/CN100409165C/en
Publication of CN1912822A publication Critical patent/CN1912822A/en
Application granted granted Critical
Publication of CN100409165C publication Critical patent/CN100409165C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A device enabling large capacity storage unit (LCSU) to provide intelligent card interface is driving layer of virtual card reader including monitor module for monitoring plug-in and pull-off state of LCSU to obtain object name of said unit, PC / SC interface module for providing drive interface to application layer to receive IRP and to send it to data processing module, data processing module for receiving and processing IRP and for reorganizing data packet as well as for sending these data packets to driving layer of magnetic disc according to obtained object names. Its operating method is also disclosed.

Description

A kind of device and method that makes large scale storage equipment that intelligent card interface can be provided
Technical field
The present invention relates to the device and method of monitoring large scale storage equipment in kernel drives, be meant a kind of device and method that makes large scale storage equipment that intelligent card interface can be provided especially.
Background technology
WDM (Win32 Driver Mode, Win32 driving model) is that Microsoft is a kind of general driver model of the Driver Design of Windows.Along with the upgrading of system, WDM has become the main flow of Windows system driver exploitation.The WDM architecture is carried out layering and is handled, and promptly device drives is divided into: filter drive program, function driver and bus driver.Every layer of driver is divided into simpler request to the I/O request again, carries out with the driver of passing to lower floor.Bus driver is had an effect by hardware abstraction layer and hardware, thereby is finished the I/O solicit operation after receiving the I/O request at last.
General intelligence card manufacturer is usually except providing the smart card physical equipment, also to provide the function corresponding driver, this function driver both can be used as card reader interface and upper layer application is carried out data communication, again can be by carrying out communication with the bus driver of lower floor, finish and hardware between reading and writing data.Two kinds of functions of this of function driver promptly can realize in a function drives, also can be designed to two independent drivings as required, a part is finished functions of card reader, and a part is finished hardware-related partial function (following unification is called the smart card device function and drives).The order of data transmission process is: use when sending data, data through smart card service system, the driving of smart card device function, bus driver, arrive the smart card physical equipment successively.When data were returned from hardware, data arrived and use through bus driver, the driving of smart card device function, smart card service system successively.
When design smart card device function drives, PC/SC call back function interface need be provided in driving, and in functions of the equipments drive, specify the card reader title.Call back function is mostly by user oneself definition name, function body is that system definition is good, the usage of call back function is: the user defines a function variable type, define such variable then, and to this variable assignments, again variable is passed to caller (being generally system itself) as parameter, caller is according to the parameter call call back function.
Application layer just can begin the normal communication work of smart card by using the PC/SC interface of smart card service.The smart card that designs like this can be realized whole application of smart card.
The Standard User interface (API) that the PC/SC working group that the PC/SC standard is made up of Microsoft and other famous smart card manufacturer of the world proposes based on the WINDOWS platform, integration environment from PC (Personal Computer) to smart card (SmartCard) is provided, and application program is carried out communication by this Standard User interface and smart card.
General serial (USB) bus interface is a kind of quick, interface flexibly, have great ease for use, all finish automatically etc., be fit to be applied to plurality of devices such as digital camera, mp3 player, high-speed data acquisition by system as supporting hot plug, all layoutprocedure.
Usually used USB flash disk, portable hard drive use USB interface, also all belong to large scale storage equipment.The USB tissue has defined the standard of mass storage class, and such standard comprises four independently subclass standards:
1.USB?Mass?Storage?Class?Control/Bulk/Interrupt(CBI)Transport;
2.USB?Mass?Storage?Class?Bulk-Only?Transport;
3.USB?Mass?Storage?Class?ATA?Command?Block;
4.USB?Mass?Storage?Class?UFI?Command?Specification。
Above-mentioned preceding two sub-normalized definitions the transmission method of data/order/state on USB.The Bulk-Only transmission specification only uses the Bulk end points to transmit data/order/state, and the CBI transmission specification then uses the end points of three types of Control/Bulk/Interrupt to carry out data/order/state and transmits.
Above-mentioned latter two cuckoo model has defined the operational order of storage medium.The ata command standard is used for hard disk, and the UFI ordering norms is at the USB mobile storage.
Provide support among the Microsoft Windows, so the USB mobile device only need follow Mass Storage agreement and organize data and processing command, can realize and the PC swap data Mass Storage agreement.
Application program is carried out data interaction by driving and the large scale storage equipment that system carries.But the driving that system carries is not a card-reader driver program, and the PC/SC driving interface is not provided, so application program can not directly be visited large scale storage equipment by using PC/SC API.Thereby make large scale storage equipment be subjected to certain limitation in the use of field of intelligent cards.
Summary of the invention
In order to solve the problem that large scale storage equipment can not directly apply to the smart card every field, realize intelligent card function, the invention provides a kind of device and method that makes large scale storage equipment that intelligent card interface can be provided.
The present invention realizes by following scheme: a kind of device that makes large scale storage equipment that intelligent card interface can be provided, be virtual card-reader driver program layer module, this virtual card-reader driver program layer module comprises: monitoring module, be used to monitor the insertion of large scale storage equipment and pull out, obtain the title of large scale storage equipment object;
The PC/SC interface module, the driving interface to application layer provides standard to meet the PC/SC standard receives the IRP that sends from application layer, and this IRP is passed to data processing module;
Data processing module is used for receiving and handle the IRP that sends from application layer by the PC/SC interface module and re-assemblies packet, and the title of the large scale storage equipment object that obtains according to monitoring module sends packet to disk sort Drive Layer (disk.sys).
Described data processing module connects the disk sort Drive Layer by obtaining the mode of large scale storage equipment object.
The method of work of described device comprises:
Monitoring step:
1) when large scale storage equipment inserts, monitoring module monitors the insertion of large scale storage equipment;
2) monitoring module obtains the title of lower floor's large scale storage equipment object;
3) monitoring module judges whether the large scale storage equipment that inserts is the large scale storage equipment that needs processing;
4) variable in the monitoring module initialize routine, and notice smart card service system has smart card to insert;
5) when pulling out large scale storage equipment, monitoring module monitors pulling out of large scale storage equipment, empties the system resource that takies after large scale storage equipment inserts, and notice smart card service system has smart card to pull out.
Data processing step:
1) data processing module is received the IRP relevant with large scale storage equipment that application layer is sent, and re-assemblies packet according to the mass storage class Data Transport Protocol;
2) data processing module sends to lower floor's disk sort Drive Layer with the packet that re-assemblies and carries out data interaction, and the result after will be mutual returns application layer.
Described monitoring step 1) monitoring module can utilize the insertion of the call back function monitoring large scale storage equipment of registration in.
Described monitoring step 1) monitoring module can be monitored the insertion of large scale storage equipment by the mode of repeating query in.
Described monitoring step 2) monitoring module is according to the title of the parameter acquiring lower floor large scale storage equipment object of the call back function of registration in.
Described monitoring step 5) monitoring module can utilize the call back function of registration to monitor pulling out of large scale storage equipment in.
Described monitoring step 5) monitoring module can be monitored pulling out of large scale storage equipment by the mode of repeating query in.
Described data processing step 2) data processing module carries out data interaction by the file read-write function and according to large scale storage equipment object and lower floor's disk sort Drive Layer in.
The present invention increases the passage of a visit large scale storage equipment by virtual card-reader driver program layer module of framework, realizes the large scale storage equipment intelligent card function, thereby make its using method more flexible that application is more extensive.
Description of drawings
Fig. 1 is a driving system synoptic diagram of the present invention.
Fig. 2 is a kind of operational flowchart of device when monitoring the large scale storage equipment insertion that makes large scale storage equipment that intelligent card interface can be provided of the present invention.
Fig. 3 is a kind of process flow diagram of device when carrying out data processing operation that makes large scale storage equipment that intelligent card interface can be provided of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is described in more detail.
Referring to Fig. 1, a kind of device that makes large scale storage equipment that intelligent card interface can be provided of the present invention is meant a virtual card-reader driver program layer 13 that increases in existing driving system.The driving system that increases behind the virtual card-reader driver program layer 13 comprises four basic layers, i.e. large scale storage equipment (hardware layer) 11, disk sort Drive Layer (disk.sys) 12, virtual card-reader driver program layer 13 and application layers 14.
Virtual card-reader driver program layer 13 comprises monitoring module 131, data processing module 132 and PC/SC interface module 133; Described monitoring module 131 is used to monitor the insertion of large scale storage equipment 11 and pull out, and obtains the title of large scale storage equipment object; Described data processing module 132 is used for receiving and handling the IRP that sends from application layer by PC/SC interface module 133, and the title of the large scale storage equipment object that obtains according to monitoring module 131 sends data to disk sort Drive Layer 12; The driving interface that 133 pairs of application layers 14 of described PC/SC interface module provide standard to meet the PC/SC standard receives the IRP that sends from application layer 14, and this IRP is passed to described data processing module 132.
Described data processing module 132 connects disk sort Drive Layer 12 by getting the mode of large scale storage equipment object.
Application layer 14 can conduct interviews by 141 pairs of large scale storage equipments 11 of smart card service system, realizes the monitoring to large scale storage equipment 11.
The driving interface that the standard that 13 pairs of application layer 14 of virtual card-reader driver program layer provide meets the PC/SC standard has following several:
RDF_TRANSMIT
RDF_CARD_POWER
RDF_SET_PROTOCOL
RDF_CARD_TRACKING
RDF_CARD_EJECT
RDF_READER_SWALLOW
RDF_DEBUG_LEVEL
RDF_CARD_CONFISCATE
RDF_IOCTL_VENDOR
RDF_ATR_PARSE
Handling relevant above-mentioned corresponding interface according to actual needs, mainly is to handle here:
RDF_TRANSMIT
RDF_CARD_POWER
RDF_SET_PROTOCOL
The function Io Register Plug Play Notification that the user uses DDK to provide registers the CallbackRoutine call back function in virtual card-reader driver program layer 13, monitoring module 131 in the virtual card-reader driver program layer 13 is monitored the insertion of large scale storage equipment 11 by the CallbackRoutine call back function and is pulled out, and Io Register Plug Play Notification is defined as:
NTSTATUS
Io?Register?Plug?Play?Notification
IN?IO_NOTIFICATION_EVENT_CATEGORY?EventCategory,
IN?ULONG?Event?Category?Flags,
IN?PVOID?Event?Category?Data?OPTIONAL,
IN?PDRIVER_OBJECT?Driver?Object,
IN?PDRIVER_NOTIFICATION_CALLBACK_ROUTINECallbackRoutine,
IN?PVOID?Context,
OUT?PVOID*Notification?Entry
Event Category Data parameter in the function is set to the GUID of disk sort Drive Layer 12 registrations, and parameters C allbackRoutine is the call back function that virtual card-reader driver program layer 13 needs processing.
Said apparatus, the method for work of promptly virtual card-reader driver program layer 13 comprises monitoring step and data processing step.Virtual card-reader driver program layer is started working after successful installation, uses Io Register Plug Play Notification function registered callbacks function C allbackRoutine in the process of installation.
The step of monitoring module in the virtual card-reader driver program layer when the monitoring large scale storage equipment inserts as shown in Figure 2.Comprise:
Step 201: after large scale storage equipment inserted, monitoring module monitored the insertion of large scale storage equipment by call back function Callback Routine;
Monitoring module also can be monitored the insertion of large scale storage equipment by the mode of repeating query.
Step 202: monitoring module obtains the title of lower floor's large scale storage equipment object, and judges whether the large scale storage equipment that inserts is the large scale storage equipment that needs processing;
If, execution in step 204 again after the execution in step 203 then, otherwise direct execution in step 204.
Step 203: monitoring module takes off layer large scale storage equipment object according to title and preserves, foundation is got in touch with large scale storage equipment, notice smart card service system smart card inserts, and smart card service startup sign is set, and virtual card-reader driver program layer enters waiting status;
Step 204: return.
Described monitoring module can monitor pulling out of large scale storage equipment by the mode of call back function Callback Routine or repeating query.When monitoring module monitors pulling out of large scale storage equipment, empty the system resource that takies after large scale storage equipment inserts, and notice smart card service system there is smart card to pull out.
The step of data processing module when carrying out data processing in the virtual card-reader driver program layer comprises as shown in Figure 3:
Step 301: data processing module receives the IRP that application layer is sent;
Step 302: data processing module judges whether the IRP that application layer sends is relevant with hardware (being large scale storage equipment);
If uncorrelated then execution in step 303, if relevant then execution in step 304.
Step 303: data processing module inter-process IRP, and result returned application layer;
Step 304: data processing module re-assemblies packet according to the mass storage class Data Transport Protocol;
Step 305: the packet after data processing module will be assembled is issued the disk sort Drive Layer by the mode of written document;
Step 306: data processing module is obtained data by the mode of reading file from the disk sort Drive Layer;
Step 307: data processing module carries out respective handling to the data described in the step 306, and result is returned application layer.

Claims (9)

1. device that makes large scale storage equipment that intelligent card interface can be provided, it is characterized in that: described device is virtual card-reader driver program layer module, this virtual card-reader driver program layer module comprises:
Monitoring module is used to monitor the insertion of large scale storage equipment and pull out, and obtains the title of large scale storage equipment object;
The PC/SC interface module, the driving interface to application layer provides standard to meet the PC/SC standard receives the IRP that sends from application layer, and this IRP is passed to data processing module;
Data processing module is used for receiving and handle the IRP that sends from application layer by the PC/SC interface module and re-assemblies packet, and the title of the large scale storage equipment object that obtains according to monitoring module sends packet to the disk sort Drive Layer.
2. the device that makes large scale storage equipment that intelligent card interface can be provided according to claim 1 is characterized in that: described data processing module connects the disk sort Drive Layer by obtaining the mode of large scale storage equipment object.
3. the method for work according to the described device of claim 1 is characterized in that, described method comprises the following steps:
1) when large scale storage equipment inserts, monitoring module monitors the insertion of large scale storage equipment;
2) monitoring module obtains the title of lower floor's large scale storage equipment object;
3) monitoring module judges whether the large scale storage equipment that inserts is the large scale storage equipment that needs processing, if then carry out next step, if not then returning;
4) variable in the monitoring module initialize routine, and notice smart card service system has smart card to insert;
5) data processing module is received the IRP relevant with large scale storage equipment that application layer is sent, and re-assemblies packet according to the mass storage class Data Transport Protocol;
6) data processing module sends to lower floor's disk sort Drive Layer with the packet that re-assemblies and carries out data interaction, and the result after will be mutual returns application layer;
7) when pulling out large scale storage equipment, monitoring module monitors pulling out of large scale storage equipment, empties the system resource that takies after large scale storage equipment inserts, and notice smart card service system has smart card to pull out.
4. method of work according to claim 3 is characterized in that: the insertion of the call back function monitoring large scale storage equipment of monitoring module utilization registration in the described step 1).
5. method of work according to claim 3 is characterized in that: monitoring module is monitored the insertion of large scale storage equipment in the described step 1) by the mode of repeating query.
6. method of work according to claim 3 is characterized in that: monitoring module is according to the title of the parameter acquiring lower floor large scale storage equipment object of the call back function of registration described step 2).
7. method of work according to claim 3 is characterized in that: the call back function monitoring large scale storage equipment of monitoring module utilization registration pulls out in the described step 7).
8. method of work according to claim 3 is characterized in that: monitoring module is monitored pulling out of large scale storage equipment by the mode of repeating query in the described step 7).
9. method of work according to claim 3 is characterized in that: data processing module carries out data interaction by the file read-write function and according to large scale storage equipment object and lower floor's disk sort Drive Layer in the described step 6).
CNB2006101126089A 2006-08-25 2006-08-25 Device and method for providing intelligent card interface by large scale storage equipment Expired - Fee Related CN100409165C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101126089A CN100409165C (en) 2006-08-25 2006-08-25 Device and method for providing intelligent card interface by large scale storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101126089A CN100409165C (en) 2006-08-25 2006-08-25 Device and method for providing intelligent card interface by large scale storage equipment

Publications (2)

Publication Number Publication Date
CN1912822A CN1912822A (en) 2007-02-14
CN100409165C true CN100409165C (en) 2008-08-06

Family

ID=37721767

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101126089A Expired - Fee Related CN100409165C (en) 2006-08-25 2006-08-25 Device and method for providing intelligent card interface by large scale storage equipment

Country Status (1)

Country Link
CN (1) CN100409165C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023940B (en) * 2009-09-16 2013-07-10 研祥智能科技股份有限公司 CPCI (compact peripheral component interconnection) hot swapping system
CN102141897B (en) * 2010-02-02 2013-01-02 慧荣科技股份有限公司 Method and device for improving access performance
CN102289696A (en) * 2011-08-31 2011-12-21 广州致远电子有限公司 Multichannel parallel access method based on PC/SC (Personal Computer/Smart Card) standard

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2512045Y (en) * 2001-12-29 2002-09-18 台均实业有限公司 IC card identification storage device with expansion interface
CN2580522Y (en) * 2002-09-26 2003-10-15 北京蓝拓扑电子技术有限公司 Computer external data receiving equipment with intelligent card reading function
CN1503957A (en) * 2000-10-11 2004-06-09 St Multi-mode smart card, system and corresponding method
CN1532659A (en) * 1998-11-10 2004-09-29 ������֪ʶϵͳ���޹�˾ USB key apparatus for interacting with a USB host via USB port
US6898653B2 (en) * 2002-12-27 2005-05-24 Neodio Technologies Corporation Plug-and-play interconnection architecture and method with in-device storage module in peripheral device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1532659A (en) * 1998-11-10 2004-09-29 ������֪ʶϵͳ���޹�˾ USB key apparatus for interacting with a USB host via USB port
CN1503957A (en) * 2000-10-11 2004-06-09 St Multi-mode smart card, system and corresponding method
CN2512045Y (en) * 2001-12-29 2002-09-18 台均实业有限公司 IC card identification storage device with expansion interface
CN2580522Y (en) * 2002-09-26 2003-10-15 北京蓝拓扑电子技术有限公司 Computer external data receiving equipment with intelligent card reading function
US6898653B2 (en) * 2002-12-27 2005-05-24 Neodio Technologies Corporation Plug-and-play interconnection architecture and method with in-device storage module in peripheral device

Also Published As

Publication number Publication date
CN1912822A (en) 2007-02-14

Similar Documents

Publication Publication Date Title
US10445258B1 (en) Method for creation of device drivers and device objects for peripheral devices
EP2612252B1 (en) Virtual usb compound device enumeration
US7802022B2 (en) Generic USB drivers
US7131595B2 (en) Automatic drive icon assignment by media type in single slot USB card readers
US7921244B2 (en) Data sharing and transfer systems and methods
US7945710B2 (en) Apparatus enabling the human interface device to provide a smart card interface and operating method therein
TW200846920A (en) Interfacing an external attachment device to a computing device
CN104881105B (en) Electronic installation
CN101493786B (en) Computer virtual machine system and equipment accessing method
CN102662897A (en) Mobile terminal and data interaction method between mobile terminals
CN102023960A (en) Computer network system, computer and hardware equipment remote management method thereof
CN100409165C (en) Device and method for providing intelligent card interface by large scale storage equipment
US20060136934A1 (en) Method, apparatus and system for instructing a virtual device from a virtual machine
CN101739246A (en) Smart card and application data processing method
CN116303149B (en) Method and system for expanding controller interface based on BMC chip
McDowell et al. USB explained
US6665752B1 (en) Interrupt driven interface coupling a programmable media access controller and a process controller
CN100520756C (en) Method for managing the plug-in or removal of a memory card into or from a card reader and apparatus for use in said method
CN2911789Y (en) Portable device able to exchange date memory or process data
CN102455970B (en) Multi-peripheral-equipment boot implementation method, equipment and system with reliability detection function
CN101661444B (en) Method and system for dynamically managing a pluggable device
WO2010070530A1 (en) Electronic apparatus comprising a common bus
CN101110013A (en) Device for electronic equipment synchronous display through USB port and method thereof
Zhe et al. Development of Linux based USB device driver for portable spectrometer
CN100397851C (en) Realizing method for inserting speech board card

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: FEITIAN TECHNOLOGIES CO., LTD.

Free format text: FORMER NAME: BEIJING FEITIAN CHENGXIN TECHNOLOGY CO., LTD.

CP03 Change of name, title or address

Address after: 100085 Beijing city Haidian District Xueqing Road No. 9 Ebizal building B block 17 layer

Patentee after: Feitian Technologies Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 40 research, 7A building, 5 floor

Patentee before: FEITIAN TECHNOLOGIES Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080806