Re: GemPC Express Reader (Was: Support for Lenovo Integrated Smart Card Reader)

Joachim Breitner <[email protected]> Thu, 12 Feb 2009 21:41:28 +0000
Newsgroups gmane.comp.lib.libchipcard.devel
Message-ID <1234474888.3803.66.camel@localhost>
Hi,

Am Donnerstag, den 12.02.2009, 22:15 +0100 schrieb Martin Preuss:
> On Donnerstag, 12. Februar 2009, Joachim Breitner wrote:
> [...]
> > Ludovic: Is it a bug in libccid that IFDHPowerICC does not return
> > IFD_ERROR_POWER_ACTION even though the protocol bits have not set up, or
> > libchipcard wrong in only trying to set the protocol when there is an
> > error? What would be the correct way of setting the protocol? (Sorry if
> > these questions are too obvious, but I’m new to the code base...)
> [...]
> 
> The driver actually returns "0" upon IFDHPowerICC which means "ok". That's why 
> IFDHSetProtcol() isn't called (because all readers I worked with so far 
> returned an error if the card couldn't be connected at this point, due to a 
> false protocol etc, see my explanation for the Kobil reader).
> 
> @Ludovic: If I understand you correctly IFDHSetProtocol must be set anyway? So 
> maybe its just as easy as calling this function (we already try to extract 
> the protocol from the ATR but so far the result isn't used).

I played around a bit. Adding this
      retval=dct->setProtoFn(LCD_Slot_GetSlotNum(sl),
			     0, 0, 0, 0, 0);
leads to an non-zero retval (608, IIRC), but 
      retval=dct->setProtoFn(LCD_Slot_GetSlotNum(sl),
			     1, 0, 0, 0, 0);
seems to work in this regard, and retval is zero.

Unfortunately, that alone did not help:
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  615: Beginning of DriverIFD_ConnectSlot
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  529: Connecting slot 0
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  571: Card present.
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  621: CCID: Result is not CCID_ERROR_POWER_ACTION (0)
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  624: CCID: Setting Protocol 1
5:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_work.c:  142: Status changed on slot 0 (00000000->00030000) (cardnum 0)
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_work.c:  144: Card is now connected
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_work.c:  153: Card number is 1
7:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_cardcommand.c:  146: Executing command
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  427: Sending command to card (bufferlen=299):
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):String size is 4
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):0000: 00 a4 00 0c                                     ....
3:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  451: CCID error on "CCIDTransmit/Control": 612
3:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_cardcommand.c:  153: Error executing APDU (00000064)
5:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_resetcard.c:   81: Resetting card
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):driverifd.c:  724: Resetting slot 0
6:2009/02/12 22-36-43:auto1-ccid_gempc_express(29323):d_resetcard.c:   97: Reset succeeded

and

6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:924:IFDHPowerICC() lun: 0, action: PowerUp
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:488:IFDHSetProtocolParameters() lun: 0, protocol T=0
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:1436:extra_egt() Extra EGT patch applied
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:924:IFDHPowerICC() lun: 0, action: PowerUp
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:488:IFDHSetProtocolParameters() lun: 0, protocol T=0
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:1436:extra_egt() Extra EGT patch applied
7:2009/02/12 22-36-43:driver(29323):d_ipc.c:  302: Command sent
6:2009/02/12 22-36-43:driver(29323):d_work.c:  160: Server informed about status change
5:2009/02/12 22-36-43:driver(29323):d_handle.c:   26: Incoming request "Driver_CardCommand"
7:2009/02/12 22-36-43:driver(29323):String size is 4
7:2009/02/12 22-36-43:driver(29323):0000: 00 a4 00 0c                                     ....
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:1035:IFDHTransmitToICC() lun: 0
3:2009/02/12 22-36-43:driver(29323):driverifd.c: 1048: PCSC: commands.c:1236:CCID_Receive Procedure byte conflict
3:2009/02/12 22-36-43:driver(29323):driverifd.c: 1048: PCSC: openct/proto-t1.c:221:t1_transceive() fatal: transmit/receive failed
7:2009/02/12 22-36-43:driver(29323):d_cardcommand.c:  200: Response send
5:2009/02/12 22-36-43:driver(29323):d_handle.c:   26: Incoming request "Driver_ResetCard"
6:2009/02/12 22-36-43:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:924:IFDHPowerICC() lun: 0, action: Reset
7:2009/02/12 22-36-43:driver(29323):driverifd.c:  731: Received ATR:
7:2009/02/12 22-36-43:driver(29323):String size is 25
7:2009/02/12 22-36-43:driver(29323):0000: 3b ff 18 00 ff 81 31 3c 45 65 63 0d 02 31 02 50 ;.....1<Eec..1.P
7:2009/02/12 22-36-43:driver(29323):0010: 00 10 90 14 05 00 04 10 3e                      ........>
5:2009/02/12 22-37-33:driver(29323):d_handle.c:   26: Incoming request "Driver_StopReader"
6:2009/02/12 22-37-33:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:924:IFDHPowerICC() lun: 0, action: PowerDown
5:2009/02/12 22-37-33:driver(29323):driverifd.c: 1007: Closing channel 0
6:2009/02/12 22-37-33:driver(29323):driverifd.c: 1044: PCSC: ifdhandler.c:226:IFDHCloseChannel() lun: 0
5:2009/02/12 22-37-33:driver(29323):d_stopreader.c:   79: Reader down
5:2009/02/12 22-38-13:driver(29323):d_handle.c:   26: Incoming request "Driver_StopDriver"
5:2009/02/12 22-38-13:driver(29323):d_stopdriver.c:   50: Driver down

Thanks so far,
Joachim

-- 
Joachim "nomeata" Breitner
  mail: [email protected] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [email protected] | http://www.joachim-breitner.de/
  Debian Developer: [email protected]

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

_______________________________________________
Libchipcard-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libchipcard-devel
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkmUl4cACgkQ9ijrk0dDIGzHHQCeK33AEX8233xfY7IWMYelCygi
eusAmwbTe3pU3uvyZQuMU+QT4pTeJbhk
=YpPm
-----END PGP SIGNATURE-----