CN101639771A - Method for converting HID interface to PC/SC interface - Google Patents

Method for converting HID interface to PC/SC interface Download PDF

Info

Publication number
CN101639771A
CN101639771A CN200810134494A CN200810134494A CN101639771A CN 101639771 A CN101639771 A CN 101639771A CN 200810134494 A CN200810134494 A CN 200810134494A CN 200810134494 A CN200810134494 A CN 200810134494A CN 101639771 A CN101639771 A CN 101639771A
Authority
CN
China
Prior art keywords
interface
hid
equipment
service
card reader
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
CN200810134494A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN200810134494A priority Critical patent/CN101639771A/en
Publication of CN101639771A publication Critical patent/CN101639771A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method for realizing conversion from an HID development interface to a PC/SC development interface under a Windows platform, which is to run a core service program in a core layer of a Windows system. The service program registers a state monitoring interface of HID equipment to the system, when target HID equipment exists, the name of an interface of PC/SC equipment is registered and is in accordance with the HID equipment, and when the target HID equipment is removed, the name of the corresponding interface of the PC/SC equipment is unregistered; the service programis simultaneously in charge of data interaction between a PC/SC interface and the HID equipment, so that an application program can directly control a USB card reader/USB KEY of the HID interface by astandard PC/SC interface; and the service program ensures that the prior equipment drive structure of the system is not changed, the prior files are not replaced, and the prior HID equipment structure and development interfaces are not affected. The service program provides the real PC/SC interface to realize seamless compatibility of the prior application program.

Description

The HID interface is to the PC/SC interface conversion method
Affiliated technical field
The present invention relates to a kind of method of carrying out application development interface (API) conversion under windows platform, mainly is to realize the conversion of HID development interface to the PC/SC development interface.Make the developer can directly utilize the PC/SC interface that the card reader/USB KEY equipment of HID interface is developed, thereby realize handling the card reader/USB KEY equipment of HID interface with standard interface.When the card reader that has the HID interface in the system/USB KEY equipment, this method can be added corresponding PC/SC equipment interface name automatically in system, utilize this PC/SC equipment interface name just can directly visit the card reader/USB KEY equipment of corresponding HID interface.
Background technology
At present, smart card reader/(USB KEY) is at computer safety field, and the application of especially identification aspect is very general.In order to tackle this demand, the support of reading card device equipment that windows platform is special integrated, Windows provides standard set PC/SC development interface.As long as user installation the reader device of reader device and standard drive, so all can rely on Standard PC/SC interface function of Windows carry out the visit (the PC/SC interface of Windows can be automatically and the USB card reader/USB KEY device drives that exists in the system carry out alternately) of card reader/USB KEY.The user utilizes the application program of this socket exploitation to be independent of particular hardware and manufacturer, and this just brings great convenience to the final user.But reader device is not a kind of standard device, each manufacturer mainly is exactly to control the reader device of manufacturer oneself and the PC/SC interface of Windows carries out data interaction with the realization smart card operation in order to offer the service of user's functions of card reader and all need to provide for the user in addition the device drives of a cover card reader, the function of this device drives.Be commonplace before this type order.
There is the following common problem that all manufacturers are all relatively had a headache before this type order:
1. driver is signed.Driver need be through the digital signature of Microsoft, and this is a no small expense, and each upgrading all needs to carry out again digital signature.
2. driver is installed.It is a cumbersome process that the driver of client is installed, especially for those domestic consumers, all the more so, often because the difference of user's environment for use cause occur when installing various unusual.
3. unit exception is handled.Need to solve the system's blue screen problem that causes when card reader removes in operating process.The power supply and the PNP information that need treatment facility.
4. the compatible property problem of the driver of different vendor.Exist the smart card reader of multiple brand in the market, these different smart card readers are all using the driving of each manufacturer oneself exploitation.Carry out the entity and individual of card granting and Collective qualification, as: hair fastener center, identification department, safety inspection department etc.Because based on some market, these departments of consideration of aspects such as safety and technology marquis sometimes can adopt different card reader, and so, these clients certainly will will install different drivings.The installation of these drivings itself is exactly a cumbersome process; because the environment difference that the different clients of getting use is very big; therefore usually can there be influencing each other in various degree in the driving of different manufacturers exploitation, and this has just brought great trouble to client's daily servicing.This is a problem that generally makes client and manufacturer relatively have a headache at present.
At above-mentioned these situations, smart card reader/(the USB KEY) of some " nothing is driven type " appearred on the market.The HID that these smart card readers have used the Windows system oneself to carry drives, and has so just removed client's installation and maintenance from and has driven the trouble that runs into, and has also avoided the conflicting problem of driver of different manufacturers.Greatly simplified user's maintenance load.But because this card reader has been used the HID device drives, therefore Standard PC/SC interface of providing of Windows operating system can't carry out alternately (the PC/SC interface of Windows only can drive with the reader device that exists in the system and carry out alternately, and the HID development interface that Windows operating system provides specially just can be handled HID equipment) with this equipment.That is to say that upper layer application can only operate this smart card reader/(USB KEY) by the HID interface, and this socket is not the operation-interface that is used for smart card with this, most smart card/(USB KEY) application developer is with originally being unfamiliar with this socket, and this has just brought some inconvenience to development and application.The manufacturer that this smart card reader/(USB KEY) is provided is in order to remedy this deficiency, have to provide corresponding middleware, these middlewares provide " imitative PC/SC " interface to the user: middleware utilizes the HID interface to handle real card reader downwards, upwards provides some to be similar to Standard PC/SC interface and gets privately owned interface.But this solution has been brought new problem simultaneously: compatibility and versatility.The method difference that the middleware that different manufacturers provides is realized is very big, and " imitative PC/SC interface " and the difference degree of real PC/SC interface that they provide are also different.So the same smart card reader of client development/(USB KEY) application program possibly can't be applied on smart card reader/(the USB KEY) of this " nothing is driven type " of different vendor fully.The degree of stability of these middlewares also affects the stability of application program greatly simultaneously.
Summary of the invention
Do not have the deficiency of the card reader of driving/USB KEY in order to overcome prior USB, the invention provides a kind of HID interface to the PC/SC interface convertor.The HID device drives that this HID interface can directly use Windows operating system to provide to the PC/SC interface convertor is handled USB card reader/(the USB KEY) of HID interface; It can carry out with the PC/SC interface manager of system alternately again simultaneously, thereby makes the terminal user can use the PC/SC development interface of standard to handle the USB card reader of HID interface/(USB KEY).With the development Experience that guarantees the terminal user, development module and built-in function can be fully used.
The technical solution adopted for the present invention to solve the technical problems is:
Register and enable a system core service to Windows operating system, this kernel service upwards is responsible for providing PC/SC interface to the user, is responsible for the USB card reader/USB KEY equipment of the real HID interface of manipulation downwards.Kernel service is to a HID device status monitoring of Windows system registry interface, this interface be responsible for monitoring and inquiry system in the state of HID equipment.If find the target HID equipment of an existence, so just activate the corresponding PC/SC interface supply routine access of registration; If find a target HID equipment of cutting off, the corresponding PC/SC interface of so just forbidding registering is with this card reader of notification application/KEY inaccessible. and kernel service is accepted the request of data of sending from the PC/SC interface and is given mutually deserved HID equipment data forwarding according to the HID interface specification, then the data that HID equipment returns is returned to application program according to 7816 agreements by the PC/SC interface.Thereby reach the purpose of the PC/SC visit HID interface USB card reader/USBKEY that utilizes standard.
The PC/SC interface that provides in this scheme is real PC/SC interface, and therefore the program of original PC/SC interface and built-in function can directly use this interface and not be used as any change.This scheme does not need any file or the interface of the system that changes simultaneously, thereby can guarantee compatibility and stability to greatest extent.
These characteristics are better than the product of existing any " imitative PC/SC interface " on the market.
Owing to adopted above technical scheme, the present invention had:
1: can allow the user use not have both can enjoy that no drive apparatus brings when driving USB card reader/USB KEY convenient, simple and be easy to maintenance, can use the PC/SC development interface of standard to control these equipment again, original development Experience and software resource can be made full use of completely and can additionally do not increased cost.
2: the standardization and the versatility that help development module.Utilized application program of intelligent card that Standard PC/the SC interface library is succeeded in developing directly to use in the past not have and drive USB card reader/USB KEY and need not to do any change, what application program newly developed was used is the PC/SC interface library of standard, also can be applied in easily on the equipment of other PC/SC interfaces.
3: great compatibility and versatility are provided, and the client has exempted the worry of drive installation and maintenance, can utilize the PC/SC interface of standard as handling this USB card reader/USB KEY in the past again simultaneously.The application program on upper strata need not to do the just compatible existing new equipment of energy of any change, has shortened client's R﹠D cycle greatly and has saved a large amount of research and development expenses.
4: help the client to adopt different hardware devices to increase the stable and robustness of system, do not have the USB card reader/USB KEY that drives and be easy to install, Maintenance free, the development interface of standard can make the user realize the unification of upper layer software (applications) again simultaneously.Therefore the user can adopt different equipment not worry system maintenance and stable problem according to actual conditions.
Description of drawings
The present invention is further described below in conjunction with drawings and embodiments.
Fig. 1 is software architecture figure of the present utility model.
Fig. 2 is the fundamental diagram of interface conversion kernel service.
Fig. 3 is the kernel services process flow diagram.
Fig. 4 is a HID monitoring of tools process flow diagram.
Fig. 5 is a PC/SC interface data processing flow chart.
1. application program of intelligent card among the figure, 2.Windows PC/SC interface API, 3.NTDLL.DLL, 4. interface conversion kernel service, the HID of 5.Windows system device drives, the card reader of 6.HID interface/USB KEY.7. Zhu Ce PC/SC interface.8. kernel service program.9.HID device status monitoring device.
Embodiment:
Among Fig. 1, application program of intelligent card 1 carries out data interaction by PC/SC interface API2, and NTDLL.DLL3 sends this interactive request to interface conversion kernel service 4, and interface conversion kernel service 4 is forwarded to HID equipment 6 to data by HID device drives 5.The data of returning from HID equipment 6 turn back to interface conversion kernel service 4 via HID device drives 5, and interface conversion kernel service 4 is given NTDLL.DLL3 data again, and final data turns back to application program through PC/SC interface API.
Among Fig. 2, register and enable a system core service 8 to Windows operating system, next this kernel service 8 is to a HID device status monitoring of Windows system registry device 9, and this watch-dog 9 is responsible for the state of the HID equipment 6 in monitoring and the inquiry system.If find the target HID equipment 6 of an existence, so just to PC/SC equipment interface 7 of the PC/SC of Windows system interface manager registration, the equipment interface 7 of this registration can carry out alternately for application access in PC/SC interface exploitation storehouse automatic and system; If find a target HID equipment 6 of cutting off, our the corresponding PC/SC equipment interface 7 of registration of so just cancellation (anti-registration) does not exist with this card reader/KEY of notification application.
In the PC/SC interface 7 of registration, the request of data of these interfaces is accepted in kernel service and the mutual operation by equipment room sends to purpose HID equipment 6 via the HID of Windows system device drives 5 with request of data, wait for the result of card reader, and send the data result that returns to corresponding PC/SC interface 7.
In the HID interfacing equipment condition monitoring interface 9 of registration, data layout that kernel service 8 responsible uses are special and specific instruction and the HID equipment 6 that monitors carry out the instruction interaction of certain order.If the result who returns is identical with expected result, this HID equipment 6 is exactly a target HID so.Register or instead register corresponding PC/SC interface 7 according to the state of this equipment.Application program 1 just can know according to the state of the corresponding interface whether equipment can visit.

Claims (7)

1. a kernel service program of carrying out the HID interface to the PC/SC interface conversion has been registered PC/SC interface and HID interface monitoring device in the kernel service program.It is characterized in that: a common system core service routine, when this kernel service program run, the target HID equipment in the middle of the system can be converted into USB card reader/USB KEY equipment.This service routine is fully transparent for application program, and application program is directly to visit these HID equipment by the PC/SC interface, not can be appreciated that the existence of service routine.Service routine do not change or the replacement system in existing any file.
2. kernel service program according to claim 1 is characterized in that: a service routine that operates in core layer, the card reader and the USB Key equipment that the card reader and the USB Key device translates of HID interface can be the PC/SC interface.
3. kernel service program according to claim 1 is characterized in that: original equipment framework in the not change system, all the HID equipment in the system be the HID device drives that carries of using system still.Any driver or file in the not replacement system, original HID interface still can be visited corresponding equipment.
4. kernel service program according to claim 1 is characterized in that: provide real Standard PC/SC interface.Application program can directly be used the HID equipment of PC/SC interface visit appointment in the system of this service of operation.Originally utilized the application program and the unordered any change of built-in function of Standard PC/SC interface exploitation just can directly in the system of this service of operation, visit HID equipment.
5. kernel service program according to claim 1 is characterized in that: extra any type of built-in function is not provided, and application program not can be appreciated that the existence of this service routine, the Standard PC/SC interface library function of the system that remains that application program is directly used.
6. kernel service program according to claim 1 is characterized in that: can load dynamically, operate in system core layer fully.All data-switching and processing all are to finish in core layer, do not need other support program.
7. kernel service program according to claim 1, it is characterized in that: when the card reader of the HID of appointment interface and USB Key are present in the system, just have the corresponding supply routine access of corresponding PC/SC equipment interface name and this equipment, when equipment did not exist, this PC/SC equipment interface name disappeared automatically.
CN200810134494A 2008-07-30 2008-07-30 Method for converting HID interface to PC/SC interface Pending CN101639771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810134494A CN101639771A (en) 2008-07-30 2008-07-30 Method for converting HID interface to PC/SC interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810134494A CN101639771A (en) 2008-07-30 2008-07-30 Method for converting HID interface to PC/SC interface

Publications (1)

Publication Number Publication Date
CN101639771A true CN101639771A (en) 2010-02-03

Family

ID=41614766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810134494A Pending CN101639771A (en) 2008-07-30 2008-07-30 Method for converting HID interface to PC/SC interface

Country Status (1)

Country Link
CN (1) CN101639771A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013013578A1 (en) * 2011-07-27 2013-01-31 华为终端有限公司 Method for updating data card, personal computer and data card
CN104484292A (en) * 2014-12-30 2015-04-01 飞天诚信科技股份有限公司 Driver suitable for serial equipment and working method of driver
CN108388788A (en) * 2018-03-12 2018-08-10 山东渔翁信息技术股份有限公司 A kind of method and device for calling USB KEY bottoms library

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013013578A1 (en) * 2011-07-27 2013-01-31 华为终端有限公司 Method for updating data card, personal computer and data card
US9170801B2 (en) 2011-07-27 2015-10-27 Huawei Device Co., Ltd. Data card updating method, personal computer, and data card
CN104484292A (en) * 2014-12-30 2015-04-01 飞天诚信科技股份有限公司 Driver suitable for serial equipment and working method of driver
CN104484292B (en) * 2014-12-30 2017-08-11 飞天诚信科技股份有限公司 A kind of drive device and its method of work suitable for serial equipment
CN108388788A (en) * 2018-03-12 2018-08-10 山东渔翁信息技术股份有限公司 A kind of method and device for calling USB KEY bottoms library
CN108388788B (en) * 2018-03-12 2019-11-26 山东渔翁信息技术股份有限公司 A kind of method and device for calling USB KEY bottom library

Similar Documents

Publication Publication Date Title
KR101227277B1 (en) Method and system for achieving a remote control help session on a computing device
US20070050751A1 (en) Automatic interoperation with legacy POS service and control objects
CN103294509A (en) Multi-serial equipment driving process for VxWorks operating system
US9860108B2 (en) Device and method for remote computer operation
CN102346669A (en) Mobile terminal safety middleware system and method based on metadata
CN106452835B (en) The method and device thereof that the terminal software of particular hardware configuration updates
EP2341692A1 (en) Communication between integrated device and mobile application client on mobile personal communication device
CN105144085A (en) Software framework for a storage device
CN101639771A (en) Method for converting HID interface to PC/SC interface
CN205103599U (en) Cross -border trade BPO uses cloud terminating set
CN202257359U (en) Independent diskless individual intelligent processing equipment and system thereof
Khner Expert. NET Micro Framework
CN105122209A (en) Web services provided from software framework
Culic et al. Commercial and Industrial Internet of Things Applications with the Raspberry Pi: Prototyping IoT Solutions
CN106934664B (en) Distributed tax-control billing server and system
CN114489865A (en) Method for realizing BIOS configuration modification at OS level
CN111090430B (en) Application software development system under embedded system
CN110262874B (en) Novel internet of things multitasking operating system and method based on java virtual machine
CN207688910U (en) A kind of encoder test system
KR101057784B1 (en) Embedded middleware platform for portable RFID reader, portable terminal equipped with it and interworking system using the same
CN101710295A (en) System and method for communication between intelligent memory card and external host equipment
CN108804236B (en) AIDL file sharing method and system
KR100959711B1 (en) Use Method Of Program Operating An Embeded Type Middleware Flatform For Handheld RFID Reader
CN109962788A (en) Multi-controller dispatching method, device and system and computer readable storage medium
Gong CORBA application in real-time distributed embedded systems

Legal Events

Date Code Title Description
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Xu Yan

Document name: Notification of Passing Preliminary Examination of the Application for Invention

C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100203