On Mon, 30 Aug 2004, Ludovic Rousseau wrote:
> Where did you get this driver? The one referenced on [1] is binary only
> and much older.
sry: http://www.omnikey.com/en/downloads.php
> I think you forgot to copy some debug lines. In particular one line
> about PTS negociation. Daniel Breest also has problems with his cardman
> 4000 and pcsc-lite 1.2.9-beta6 (a few posts ago).
>
> I suspect a bug in the cardman 4000 driver. If the driver is free
> software I can have a look at it. Otherwise I can only find a work
> around in pcsc-lite or drop support of this driver.
At first I'm intrested if anybody got the driver to work.
>
> Try to apply the attached patch to pcsc-lite 1.2.9-beta6 and send me
> the (complete) pcscd logs.
>
well here it is with the patch applyed and with a different card, just to
be sure the card is ok!
phil:/misc/src/pcsc-lite-1.2.9-beta6# /usr/local/sbin/pcscd -a -f -d
stderr
pcscdaemon.c:238:main pcscd set to foreground with debug send to stderr
pcscdaemon.c:249:main debug messages send to stderr
readerfactory.c:1055:RFInitializeReader Attempting startup of OMNIKEY
Cardman 4000 Socket 0 00 00.
readerfactory.c:897:RFBindFunctions Loading IFD Handler 2.0
pcscdaemon.c:440:main pcsc-lite 1.2.9-beta6 daemon ready.
hotplug_linux.c:171:HPReadBundleValues No bundle files in pcsc drivers
directory: /usr/local/pcsc/drivers
hotplug_linux.c:172:HPReadBundleValues Disabling USB support for pcscd
ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
atrhandler.c:87:ATRDecodeAtr Conv: 01, Y1: 09, K: 0F
atrhandler.c:105:ATRDecodeAtr TA1: 94, TB1: FFFFFFFF, TC1: FFFFFFFF, TD1:
40
atrhandler.c:138:ATRDecodeAtr T=0 Protocol Found
atrhandler.c:105:ATRDecodeAtr TA2: FFFFFFFF, TB2: FFFFFFFF, TC2: 1E, TD2:
FFFFFFFF
atrhandler.c:244:ATRDecodeAtr CurrentProtocol: 1, AvailableProtocols: 1
eventhandler.c:407:EHStatusHandlerThread Card inserted into OMNIKEY
Cardman 4000 Socket 0 00 00
Card ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
eventhandler.c:337:EHStatusHandlerThread Card Removed From OMNIKEY Cardman
4000 Socket 0 00 00
ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
atrhandler.c:87:ATRDecodeAtr Conv: 01, Y1: 09, K: 0F
atrhandler.c:105:ATRDecodeAtr TA1: 94, TB1: FFFFFFFF, TC1: FFFFFFFF, TD1:
40
atrhandler.c:138:ATRDecodeAtr T=0 Protocol Found
atrhandler.c:105:ATRDecodeAtr TA2: FFFFFFFF, TB2: FFFFFFFF, TC2: 1E, TD2:
FFFFFFFF
atrhandler.c:244:ATRDecodeAtr CurrentProtocol: 1, AvailableProtocols: 1
eventhandler.c:407:EHStatusHandlerThread Card inserted into OMNIKEY
Cardman 4000 Socket 0 00 00
Card ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
<here I run: pkcs15-tool -c>
winscard_msg.c:191:SHMProcessEventsServer Common channel packet arrival
winscard_msg.c:198:SHMProcessEventsServer SHMProcessCommonChannelRequest
detects: 7
pcscdaemon.c:136:SVCServiceRunLoop A new context thread creation is
requested: 7
winscard_svc.c:102:ContextThread Thread is started: 7
winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 7
winscard_svc.c:142:ContextThread Client is protocol version 2:0
winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 7
winscard.c:68:SCardEstablishContext Establishing Context: 17015412
winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 7
winscard.c:121:SCardConnect Attempting Connect to OMNIKEY Cardman 4000
Socket 0 00 00
ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
atrhandler.c:87:ATRDecodeAtr Conv: 01, Y1: 09, K: 0F
atrhandler.c:105:ATRDecodeAtr TA1: 94, TB1: FFFFFFFF, TC1: FFFFFFFF, TD1:
40
atrhandler.c:138:ATRDecodeAtr T=0 Protocol Found
atrhandler.c:105:ATRDecodeAtr TA2: FFFFFFFF, TB2: FFFFFFFF, TC2: 1E, TD2:
FFFFFFFF
atrhandler.c:244:ATRDecodeAtr CurrentProtocol: 1, AvailableProtocols: 1
ATR: 3B 9F 94 40 1E 00 67 11 43 46 49 53 45 10 52 66 FF 81 90 00
atrhandler.c:87:ATRDecodeAtr Conv: 01, Y1: 09, K: 0F
atrhandler.c:105:ATRDecodeAtr TA1: 94, TB1: FFFFFFFF, TC1: FFFFFFFF, TD1:
40
atrhandler.c:138:ATRDecodeAtr T=0 Protocol Found
atrhandler.c:105:ATRDecodeAtr TA2: FFFFFFFF, TB2: FFFFFFFF, TC2: 1E, TD2:
FFFFFFFF
atrhandler.c:244:ATRDecodeAtr CurrentProtocol: 1, AvailableProtocols: 1
prothandler.c:126:PHSetProtocol Attempting PTS to T=0
prothandler.c:138:PHSetProtocol PTS failed 264, using T=0
winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 7
winscard.c:79:SCardReleaseContext Releasing Context: 17015412
winscard_msg.c:241:SHMProcessEventsContext Client has disappeared: 7
winscard_svc.c:114:ContextThread Client die: 7
eventhandler.c:337:EHStatusHandlerThread Card Removed From OMNIKEY Cardman
4000 Socket 0 00 00
*************
output from pkcs15-tool -c:
Connecting to card in reader OMNIKEY Cardman 4000 Socket 0 00 00...
reader-pcsc.c:418:pcsc_connect: SCardConnect failed: Card is unresponsive.
card.c:386:sc_connect_card: returning with: Unresponsive card (correctly
inserted?)
Failed to connect to card: Unresponsive card (correctly inserted?)
//regards Henrik Andreasson
Index: src/prothandler.c
==================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/prothandler.c,v
retrieving revision 1.15
diff -u -r1.15 prothandler.c
--- src/prothandler.c 6 Aug 2004 12:12:20 -0000 1.15
+++ src/prothandler.c 29 Aug 2004 19:21:22 -0000
@@ -134,7 +134,7 @@
(SCARD_PROTOCOL_T0 == protocol) ? 0 : 1);
else
{
- DebugLogB("PTS failed, using T=%d",
+ DebugLogC("PTS failed %X, using T=%d", rv,
(SCARD_PROTOCOL_T0 == protocol) ? 0 : 1);
/* ISO 7816-3:1997 ch. 7.2 PPS protocol page 14
Index: src/winscard.c
==================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard.c,v
retrieving revision 1.44
diff -u -r1.44 winscard.c
--- src/winscard.c 18 Aug 2004 22:13:50 -0000 1.44
+++ src/winscard.c 29 Aug 2004 19:21:24 -0000
@@ -185,6 +185,7 @@
if (SCARD_PROTOCOL_UNSET ==
rContext->readerState->cardProtocol)
{
UCHAR ucAvailable, ucDefault;
+ int ret;
ucDefault =
PHGetDefaultProtocol(rContext->readerState->cardAtr,
rContext->readerState->cardAtrLength);
@@ -198,15 +199,18 @@
if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD)
dwPreferredProtocols = SCARD_PROTOCOL_T0 |
SCARD_PROTOCOL_T1;
- rContext->readerState->cardProtocol
- PHSetProtocol(rContext, dwPreferredProtocols,
+ ret = PHSetProtocol(rContext, dwPreferredProtocols,
ucAvailable, ucDefault);
- if (SET_PROTOCOL_PPS_FAILED ==
rContext->readerState->cardProtocol)
+ /* keep cardProtocol = SCARD_PROTOCOL_UNSET in case of
error */
+ if (SET_PROTOCOL_PPS_FAILED == ret)
return SCARD_W_UNRESPONSIVE_CARD;
- if (SET_PROTOCOL_WRONG_ARGUMENT ==
rContext->readerState->cardProtocol)
+ if (SET_PROTOCOL_WRONG_ARGUMENT == ret)
return SCARD_E_PROTO_MISMATCH;
+
+ /* use negociated protocol */
+ rContext->readerState->cardProtocol = ret;
}
else
{
@@ -484,6 +488,7 @@
if (SCARD_PROTOCOL_UNSET ==
rContext->readerState->cardProtocol)
{
UCHAR ucAvailable, ucDefault;
+ int ret;
ucDefault =
PHGetDefaultProtocol(rContext->readerState->cardAtr,
rContext->readerState->cardAtrLength);
@@ -495,15 +500,18 @@
if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD)
dwPreferredProtocols = SCARD_PROTOCOL_T0 |
SCARD_PROTOCOL_T1;
- rContext->readerState->cardProtocol
- PHSetProtocol(rContext, dwPreferredProtocols,
+ ret = PHSetProtocol(rContext, dwPreferredProtocols,
ucAvailable, ucDefault);
- if (SET_PROTOCOL_PPS_FAILED ==
rContext->readerState->cardProtocol)
+ /* keep cardProtocol = SCARD_PROTOCOL_UNSET in case of
error */
+ if (SET_PROTOCOL_PPS_FAILED == ret)
return SCARD_W_UNRESPONSIVE_CARD;
- if (SET_PROTOCOL_WRONG_ARGUMENT ==
rContext->readerState->cardProtocol)
+ if (SET_PROTOCOL_WRONG_ARGUMENT == ret)
return SCARD_E_PROTO_MISMATCH;
+
+ /* use negociated protocol */
+ rContext->readerState->cardProtocol = ret;
}
else
{
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle