linux pcsc ccid libusb

dabaichix 2013-09-13 09:40:25
我在PC CentOS 6.4 32-bit 系统上 集成了PCSC CCID LIBUSB。

[root@localhost tools]# ./ccid-1.4.12/src/parse
Parsing USB bus/device: 1D6B:0002 (bus 1, device 1)
idVendor: 0x1D6B iManufacturer: Linux 2.6.32-358.el6.i686 ehci_hcd
idProduct: 0x0002 iProduct: EHCI Host Controller
NOT a CCID/ICCD device
Parsing USB bus/device: 1982:0003 (bus 2, device 10)
idVendor: 0x1982 iManufacturer: WallGreat
idProduct: 0x0003 iProduct: CCIDUKey
Found a CCID/ICCD device at interface 0


以上运行已经提示找到了 ccid设备了。

但是运行 pcscd 会有出错提示,
[root@localhost tools]# pcscd -adf
00000000 pcscdaemon.c:233:main() pcscd set to foreground with debug send to stdout
00000231 configfile.l:298:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d
00000043 pcscdaemon.c:525:main() pcsc-lite 1.8.8 daemon ready.
00006993 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000308 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000191 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002
00000175 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002
00000174 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000179 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003
00000178 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1982, PID: 0x0003, path: /dev/bus/usb/002/010
00000022 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1982, PID: 0x0003, path: /dev/bus/usb/002/010
00000006 hotplug_libudev.c:312:HPAddDevice() Adding USB device: WallGreat CCIDUKey
00000060 readerfactory.c:978:RFInitializeReader() Attempting startup of WallGreat CCIDUKey (0248998834550749) 00 00 using /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00008093 readerfactory.c:868:RFBindFunctions() Loading IFD Handler 3.0
00000101 ifdhandler.c:1840:init_driver() Driver version: 1.4.12
00000552 ifdhandler.c:1857:init_driver() LogLevel: 0x0003
00000007 ifdhandler.c:1868:init_driver() DriverOptions: 0x0000
00000083 ifdhandler.c:83:CreateChannelByNameOrChannel() Lun: 0, device: usb:1982/0003:libudev:0:/dev/bus/usb/002/010
00000043 ccid_usb.c:281:OpenUSBByName() Using: /usr/local/lib/pcsc/drivers//ifd-ccid.bundle/Contents/Info.plist
00000449 ccid_usb.c:299:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr)
00000006 ccid_usb.c:300:OpenUSBByName() ifdProductString: Generic CCID driver
00000005 ccid_usb.c:301:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00009951 ccid_usb.c:576:OpenUSBByName() Found Vendor/Product: 1982/0003 (WallGreat CCIDUKey)
00000015 ccid_usb.c:578:OpenUSBByName() Using USB bus/device: 2/10
00925178 ccid_usb.c:1106:get_data_rates() declared: 9600 bps
00049671 commands.c:1119:CmdGetSlotStatus Command not supported or not allowed
00006849 commands.c:1119:CmdGetSlotStatus Command not supported or not allowed
00007970 commands.c:1119:CmdGetSlotStatus Command not supported or not allowed
00000026 ifdhandler.c:158:CreateChannelByNameOrChannel() failed
00000017 readerfactory.c:1009:RFInitializeReader() Open Port 0x200000 Failed (usb:1982/0003:libudev:0:/dev/bus/usb/002/010)

00000005 readerfactory.c:312:RFAddReader() WallGreat CCIDUKey (0248998834550749) init failed.
00000022 readerfactory.c:529:RFRemoveReader() UnrefReader() count was: 1
00000006 readerfactory.c:1029:RFUnInitializeReader() Attempting shutdown of WallGreat CCIDUKey (0248998834550749) 00 00.
00000004 readerfactory.c:905:RFUnloadReader() Unloading reader driver.
00000109 hotplug_libudev.c:384:HPAddDevice() Failed adding USB device: WallGreat CCIDUKey
00000333 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003
00000292 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001


再运行pcsc/src/目录下的 测试程序提示找不到设备。
[root@localhost pcsc-lite-1.8.8]# ./src/testpcsc

MUSCLE PC/SC Lite unitary test Program

THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.

Testing SCardEstablishContext : Command successful.
Testing SCardIsValidContext : Command successful.
Testing SCardIsValidContext : Invalid handle. (don't panic)
Testing SCardListReaderGroups : Command successful.
Group 01: SCard$DefaultReaders
Testing SCardFreeMemory : Command successful.
Testing SCardListReaders : Cannot find a smart card reader. (don't panic)
Testing SCardGetStatusChange
Please insert a working reader :


求大哥大姐们帮助急急急急
...全文
590 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
MJL007 2015-03-25
  • 打赏
  • 举报
回复
请问如何在Android系统集成 PCSC、 CCID、 LIBUSB这三个库,能否详细说下操作步骤?
sun_2009 2013-12-24
  • 打赏
  • 举报
回复
你好~楼主问题解决了吗? 我们在执行./src/testpcsc 时和你出现的现象完全一致~

1,317

社区成员

发帖
与我相关
我的任务
社区描述
主要是开发驱动技术
社区管理员
  • 驱动程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧