ubuntu/Mac系统智能卡操作全攻略1--访问PC/SC读卡器

本文介绍了如何在Ubuntu 12.0.4上配置PC/SC框架,包括安装pcscd守护进程、驱动和工具,并通过示例展示如何与智能卡交互。此外,还提到了在Mac系统中Lion已集成该服务,并提供了在Ubuntu上创建智能卡应用的初步步骤,包括安装开发库和Eclipse CDT。

因为PC/SC是Windows的体系,以系统API的层面服务应用。所以一直以来智能卡相关的读卡器和工具都集中在Windows上,而在unix体系下则一直水土不服。值得庆幸的是随着开源组织M.U.S.C.L.E (Movment for the Use of Smart in Linux Environment)的积极努力下,pcsclite作为Xnix下的PC/SC设备框架和应用接口已经成为了事实上的标准,Mac的Lion系统更是已经在发行版里面集成了此服务。下面以ubuntu 12.0.4 发行版为例子。

#首先安装pcsc的守护进程pcscd和工具

sudo apt-get -y install libusb-dev

sudo apt-get -y install pcscd


#然后安装支持pcsc的读卡器驱动(例子为内置的ACR ACS38U,其它读卡器也可以到网站下载安装)

sudo apt-get -y install libacr38u


#连接读卡器,插卡后运行扫描工具验证安装结果

pcsc_scan

结果如下:
PC/SC device scanner
V 1.4.18 (c) 2001-2011, Ludovic Rousseau <[email protected]>
Compiled with PC/SC lite version: 1.7.4
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR38U 00 00


Thu Sep 20 12:55:08 2012
Reader 0: ACS ACR38U 00 00
  Card state: C

ACS Unified PC/SC Driver Installer (MSI) Advanced Card Systems Ltd. Contents ---------------- 1. Release Notes 2. Installation 3. History 4. File Contents 5. Limitations 6. Support 1. Release Notes ---------------- Version: 4.0.3.0 Release Date: 15/5/2014 Supported Readers ----------------- CCID Readers VID PID Reader Reader Name ---- ---- ----------------------- ----------------------------- 072F 0001 ACR30 ACS USB 072F 0100 AET65 w/o SAM ACS AET65 ICC Reader ICC 072F 0102 AET62 w/o SAM ACS AET62 PICC Reader PICC 072F 0103 AET62 w SAM ACS AET62 1SAM PICC Reader 072F 0901 ACR1281U-C4 ACS ACR1281 PICC Reader 072F 1204 ACR101 ACS ACR101 ICC Reader 072F 1205 ACR100I ACS ACR100 ICC Reader 072F 1206 ACR102 ACS ACR102 ICC Reader 072F 1280 ACR1222U-C3 ACS ACR1222 1 SAM Dual Reader 072F 2010 ACR88 CCID ACS ACR88 072F 2100 ACR128 ACS ACR128U 072F 2200 ACR122U/T ACS ACR122 072F 2206 ACR1222L ACS ACR1222 3S PICC Reader 072F 2207 ACR1222U-C6 ACS ACR1222 Dual Reader 072F 2208 qPBOC Dual ACS ACR1281 Dual Reader 072F 220A BSI Dual ACS ACR1281 Dual Reader 072F 220C ACR1283 Bootloader ACS ACR1283U FW Upgrade 072F 220F qPBOC PICC ACS ACR1281 CL Reader 072F 2211 ACR1261U-C1 ACS ACR1261 1S Dual Reader 072F 2213 ACR1283L 4SAM ACS ACR1283 4S CL Reader 072F 2214 ACR1222U-C1 ACS ACR1222 1 SAM PICC Reader 072F 2215 ACR1281 2SAM ACS ACR1281 2S CL Reader 072F 2218 ACR1251U-C PICC+SAM ACS ACR1251U-C Smart Card Reader 072F 2219 ACR123-Bootloader ACS ACR123US_BL 072F 221B ACR1251U-C PICC ACS ACR1251U Smart Card Reader 072F 221A ACR1251U-A1 ACS ACR1251 1S CL Reader 072F 2220 ACR1281U-C7 ACS ACR1281 1S PICC Reader 072F 2224 ACR1281U-C1 ACS ACR1281 1S Dual Reader 072F 2223 new qPBOC ACS ACR1281 PICC Reader 072F 2229 ACR1251U-A2 ACS ACR1251 CL Reader PICC 072F 222C ACR1283L PICC ACS ACR1283 CL Reader PICC 072F 222E ACR123-PICC+3SAM ACS ACR123 3S Reader 072F 2232 ACR1251U-K PICC+ICC ACS ACR1251K Dual Reader 072F 2233 ACR1281U-K PICC ACS ACR1281U-K PICC Reader 072F 2234 ACR1281U-K Dual ACS ACR1281U-K Dual Reader 072F 2235 ACR1281U-K 1S ACS ACR1281U-K 1S Dual Reader 072F 2236 ACR1281U-K 4S ACS ACR1281U-K 4S Dual Reader 072F 2237 ACR123-PICC ACS ACR123 3S Reader 072F 2239 ACR1256U ACS ACR1256U PICC Reader 072F 223B ACR1252U-A1 ACS ACR1252 1S CL Reader 072F 223E ACR1252U-A2 ACS ACR1252 CL Reader PICC 072F 223D ACR1252U Bootloader ACS ACR1252 USB FW_Upgrade v100 072F 8002 AET63 ACS BioTRUSTKey 072F 8201 APG8201 ACS APG8201 072F 8300 ACR33 - A1 ACS ACR33U-A1 3SAM ICC Reader 072F 8301 ACR33XX - 4SAM ACS ACR33U 4SAM ICC Reader 072F 8302 ACR33 - A2 ACS ACR33U-A2 3SAM ICC Reader 072F 8307 ACR33 - A3 ACS ACR33U-A3 3SAM ICC Reader 072F 8900 ACR89 Standard ACS ACR89 ICC Reader 072F 8901 ACR89 CL ACS ACR89 Dual Reader 072F 8902 ACR89 FPA ACS ACR89 FP Reader 072F 90CC ACSCCID ACS CCID USB Reader 072F 90D2 ACR83 ACS ACR83U 072F 90DB CTM64 Fw112 ACS CryptoMate64 072F 90D8 ACR3801 ACS ACR3801 072F B000 ACR3901 ACS ACR3901 ICC Reader 072F B100 ACR39U ACS ACR39 ICC Reader 072F B301 ACR32-A1 ACR32 ICC Reader non-CCID Readers VID PID Reader Reader Name ---- ---- ----------------------- ----------------------------- 072F 0101 AET65 w SAM ACS AET65 1SAM ICC Reader 072F 2011 ACR88 ACS ACR88 072F 9000 ACR38 FW110 ACS ACR38U 072F 9006 CTM Fw110 ACS CryptoMate 072F 90CF ACR38USAM ACS ACR38USB 1. Supported Operating Systems Windows 2000 Windows XP 32-bit Windows Server 2003 32-bit Windows Vista 32-bit Windows Server 2008 32-bit Windows 7 32-bit Windows 8 32-bit Windows 8.1 32-bit 2. Supported Languages Arabic Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Norwegian Polish Portuguese (Brazil) Portuguese (Portugal) Russian Spanish Swedish Turkish Ukrainian 3. Driver Versions v4.0.0.3 4. Command Options Setup [option] /q Quiet mode /x Uninstall driver /norestart Do not restart after driver installation/uninstallation Exit Codes: ERROR_SUCCESS 0x00000000 Success ERROR_FILE_NOT_FOUND 0x00000002 File not found ERROR_NOT_ENOUGH_MEMORY 0x00000008 Not enough memory SETUP_ERROR_OS_NOT_SUPPORTED 0x20000001 Operating system is not supported SETUP_ERROR_WINNT4_SP6_REQUIRED 0x20000002 Windows NT 4.0 Service Pack 6 is required SETUP_ERROR_UNEXPECTED 0x20000003 Unexpected error SETUP_ERROR_MSI2_REQUIRED 0x20000004 Windows Installer 2.0 is required SETUP_ERROR_MSI_LOCATION_NOT_FOUND 0x20000005 Cannot find the location of Windows Installer Note: Other error codes are defined in Windows API and MSI. 2. Installation --------------- 1. Before running the Setup program, please unplug the reader first. 2. Double click the "Setup.exe" program icon to launch the installer. If your system does not have installed Windows Installer 2.0 or above, you will receive a warning message and you need to go to Windows Update to update your system. 3. Follow the on-screen instructions to install the driver to the system. 4. After the installation is completed, please plug the reader to the system. 5. To remove the driver, please go to "Add or Remove Programs" in Control Panel. 3. History ---------- v4.0.0.0 (11/11/2013) 1. New release. v4.0.1.0 (12/2/2014) 1. Updated drivers to v4.0.0.1. v4.0.2.0 (26/3/2014) 1. Updated drivers to v4.0.0.2. v4.0.3.0 (15/5/2014) 1. Updated drivers to v4.0.0.3. 4. File Contents ---------------- | ReadMe.txt | Setup.exe | +---redist | InstMsiW.exe | \---x86 ACS_Unified_PCSC_Driver-4.0.0.3.msi Arabic.mst Chinese (Simplified).mst Chinese (Traditional).mst Czech.mst Danish.mst Dutch.mst Finnish.mst French.mst German.mst Greek.mst Hebrew.mst Hungarian.mst Italian.mst Japanese.mst Korean.mst Norwegian.mst Polish.mst Portuguese (Brazil).mst Portuguese (Portugal).mst Russian.mst Spanish.mst Swedish.mst Turkish.mst Ukrainian.mst 5. Limitations -------------- 6. Support ---------- In case of problem, please contact ACS through: Web Site: http://www.acs.com.hk/ E-mail: [email protected] Tel: +852 2796 7873 Fax: +852 2796 1286 ----------------------------------------------------------------- Copyright Copyright by Advanced Card Systems Ltd. (ACS) No part of this reference manual may be reproduced or transmitted in any from without the expressed, written permission of ACS. Notice Due to rapid change in technology, some of specifications mentioned in this publication are subject to change without notice. Information furnished is believed to be accurate and reliable. ACS assumes no responsibility for any errors or omissions, which may appear in this document.
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值