Dear All, This is a request from our side to please look into the problem and try to solve it. For our application ,we need to write certain data on to a smart card and read it after successful verification of PIN. We are using microprocessor based cards for thi purpose. The card is AC0S2 which is a microprocessor card from ACS Card Systems. We are also using ACR 38U card reader from ACS and the PC/SC API's .The Linux version is 2.4.20-8 Red Hat. Now after we create our data files into the Smart card using a card personalization tool provided by ACS on Windows platform, when we try to read the data on the card using PC/SC API's we get the following output:- Successfully established connection ####Card is connected successfully The protocol used is 0 Successfully received reader status Reader Length: 17 Reader State: 34 Reader Protocol: 0 Reader ATR Length: 19 Transaction begun successfully The return value of SCardTransmit is 8010000f Error in transmitting APDU :Card protocol mismatch. The value of the protocol is 1 Response: The response of the pcscd daemon after starting the execution of the program is as follows:- pcscd -f stdout pcscdaemon.c:238:main pcscd set to foreground with debug send to stderr pcscdaemon.c:440:main pcsc-lite 1.2.9-beta6 daemon ready. hotplug_libusb.c:371:HPAddHotPluggable Adding USB device: 002:002 readerfactory.c:1055:RFInitializeReader Attempting startup of ACS ACR38U 00 00. readerfactory.c:897:RFBindFunctions Loading IFD Handler 2.0 Card ATR: 3B BE 11 00 00 41 01 38 04 00 02 80 00 00 00 00 00 90 00 winscard_msg.c:191:SHMProcessEventsServer Common channel packet arrival winscard_msg.c:198:SHMProcessEventsServer SHMProcessCommonChannelRequest detects: 5 pcscdaemon.c:136:SVCServiceRunLoop A new context thread creation is requested: 5 winscard_svc.c:102:ContextThread Thread is started: 5 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard_svc.c:142:ContextThread Client is protocol version 2:0 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard.c:68:SCardEstablishContext Establishing Context: 17026117 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard.c:121:SCardConnect Attempting Connect to ACS ACR38U 00 00 winscard.c:221:SCardConnect Active Protocol: unknown 0 winscard.c:231:SCardConnect hCard Identity: 1e243 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard.c:778:SCardBeginTransaction Status: 0. winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard_msg.c:252:SHMProcessEventsContext correctly processed client: 5 winscard.c:79:SCardReleaseContext Releasing Context: 17026117 winscard.c:607:SCardDisconnect Active Contexts: 1 winscard.c:666:SCardDisconnect Reset complete. winscard_msg.c:241:SHMProcessEventsContext Client has disappeared: 5 winscard_svc.c:114:ContextThread Client die: 5 from the output of our test program we can see that the main problem is that the protocol has not been set. 1)The protocol used is : 0 (from the pcslite.h header file we see that a value of 0x0000 means protocol not set) 2)Reader protocol : 0(which again means the same thing) That is why the Scard Transmit function is giving an output that APDU trasaction failed. Hence our question is what are we doing wrong and is there method of setting the protocol to be used during the personalization stage by using PC/SC in Linux,so that the APDU's can be correctly transmitted and we can read the value of the data in the card. Also can we use PC/SC with memory cards like SLE 4428/4422 if all that we need to do is to write some data to the card and access it.If yes then in the ScardTransmit what should be the value of the card Protocol. We shall eagerly await a response from the Linux smart card users community. Thanks in advance. Regards Devesh Saboo ________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
