Search code examples
javasmartcardsmartcard-readerglobalplatform

Not able to connect some smart card using gp and java


Card 1: Able to connect smart card. Following is gp.exe debug log

>gp -d
# Detected readers from SunPCSC
[*] Gemplus USB SmartCard Reader 0
[ ] JAVACOS Virtual Contact Reader 0
[ ] JAVACOS Virtual Contactless Reader 1
SCardConnect("Gemplus USB SmartCard Reader 0", T=*) -> T=1, 3BDB960080B1FE451F8
0031C0640830220301900046
SCardBeginTransaction("Gemplus USB SmartCard Reader 0")
A>> T=1 (4+0000) 00A40400 00
A<< (0111+2) (31ms) 6F6D8407A0000001510000A562732F06072A864886FC6B01600C060A2A8
4886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B0402159F6E2A483077338
315055008452540000001428001912525419135254191452540000000000000000000000009F650
FF 9000
SCardEndTransaction()
SCardDisconnect("Gemplus USB SmartCard Reader 0", false)

Windows 7 popups installing device driver

Card 2: Unable to detect. Following is gp.exe debug log

>gp -d
# Detected readers from SunPCSC
[*] Gemplus USB SmartCard Reader 0
[ ] JAVACOS Virtual Contact Reader 0
[ ] JAVACOS Virtual Contactless Reader 1
SCardConnect("Gemplus USB SmartCard Reader 0", T=*)

Stucks at smart card connect function.

Windows 7 does not popups installing device driver

Also tried using Java Code to connect smart card. Same with Java card. It stucks at connect() function.

My question is why Card 2 is not detected? What can be possible cause? Is related to 32 bit or 64 bit machine or OS?


Solution

  • Got the solution. Actually, Sophos SafeGuard 5.60 is installed on my machine which is blocking reader to read the smart card. I have checked the same card on the machine which does not have Sophos SafeGuard 5.60, it is working fine.