pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

View: New views
4 Messages — Rating Filter:   Alert me  

pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

by john bougs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have been trying to get pcsc-lite running on a sheeva plug (arm) computer with an acr122u reader without much success.  I have tried pcsc-lite 1.5.4 and 1.5.3 without much success.  I always get a "pcscd: winscard_svc.c:816:MSGCheckHandleAssociation() Client failed to authenticate" when I try accessing the card.  I have tried the same configuration on my desktop (1.5.3) and had no problems.  Any suggestions?



root@ubuntu:~/pcsc-lite-1.5.4/src# pcscd -d
root@ubuntu:~/pcsc-lite-1.5.4/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        : Command successful.
Testing SCardListReaders        : Command successful.
Reader 01: ACS ACR122U PICC Interface 00 00
Waiting for card insertion      : Command successful.
Testing SCardConnect            : Command successful.
Select file: 00 A4 00 00 02 3F 00
Testing SCardTransmit           : Command successful.
 card response: 63 00
Testing SCardControl            : RPC transport error. (don't panic)
root@ubuntu:~/pcsc-lite-1.5.4/src#


syslog:
Jul 10 14:43:43 ubuntu pcscd: debuglog.c:230:DebugLogSetLevel() debug level=debug
Jul 10 14:43:43 ubuntu pcscd: pcscdaemon.c:512:main() pcsc-lite 1.5.4 daemon ready.
Jul 10 14:43:44 ubuntu pcscd: tokenparser.l:175:LTPBundleFindValueWithKey() Value/Key not defined for: ifdVendorID in /usr/local/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
Jul 10 14:43:44 ubuntu pcscd: hotplug_libhal.c:316:get_driver() Looking a driver for VID: 0x072F, PID: 0x2200
Jul 10 14:43:44 ubuntu pcscd: hotplug_libhal.c:362:HPAddDevice() Adding USB device: usb_device_72f_2200_noserial_if0
Jul 10 14:43:45 ubuntu pcscd: readerfactory.c:1024:RFInitializeReader() Attempting startup of ACS ACR122U PICC Interface 00 00 using /usr/local/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
Jul 10 14:43:45 ubuntu pcscd: readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:1417:init_driver() Driver version: 1.3.10
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:1430:init_driver() LogLevel: 0x0003
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:1450:init_driver() DriverOptions: 0x0000
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:81:IFDHCreateChannelByName() lun: 0, device: usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:238:OpenUSBByName() Manufacturer: Ludovic Rousseau (ludovic.rousseau@...)
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:248:OpenUSBByName() ProductString: Generic CCID driver
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:254: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.
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:410:OpenUSBByName() Found Vendor/Product: 072F/2200 (ACS ACR122U PICC Interface)
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:412:OpenUSBByName() Using USB bus/device: 001/002
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:784:get_data_rates() IFD does not support GET_DATA_RATES request: Success
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFB0, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 10 14:43:45 ubuntu pcscd: readerfactory.c:249:RFAddReader() Using the pcscd polling thread
Jul 10 14:43:45 ubuntu pcscd: ccid_usb.c:552:ReadUSB() Duplicate frame detected
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:1002:IFDHPowerICC() action: PowerUp, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 10 14:43:45 ubuntu pcscd: Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFAE, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 10 14:43:45 ubuntu pcscd: ifdhandler.c:377:IFDHGetCapabilities() Reader supports 1 slot(s)
Jul 10 14:43:45 ubuntu pcscd: hotplug_libhal.c:316:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0002
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:239:SHMProcessEventsServer() Common channel packet arrival
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:248:SHMProcessEventsServer() SHMProcessCommonChannelRequest detects: 8
Jul 10 14:43:57 ubuntu pcscd: pcscdaemon.c:147:SVCServiceRunLoop() A new context thread creation is requested: 8
Jul 10 14:43:57 ubuntu pcscd: winscard_svc.c:133:ContextThread() Thread is started: 8
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CMD_VERSION received by client 8
Jul 10 14:43:57 ubuntu pcscd: winscard_svc.c:189:ContextThread() Client is protocol version 3:0
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command ESTABLISH_CONTEXT received by client 8
Jul 10 14:43:57 ubuntu pcscd: winscard.c:242:SCardEstablishContext() Establishing Context: 16979192
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT received by client 8
Jul 10 14:43:57 ubuntu pcscd: winscard.c:303:SCardConnect() Attempting Connect to ACS ACR122U PICC Interface 00 00 using protocol: 3
Jul 10 14:43:57 ubuntu pcscd: prothandler.c:128:PHSetProtocol() Attempting PTS to T=1
Jul 10 14:43:57 ubuntu pcscd: ifdhandler.c:540:IFDHSetProtocolParameters() protocol T=1, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 10 14:43:57 ubuntu pcscd: winscard.c:449:SCardConnect() Active Protocol: T=1
Jul 10 14:43:57 ubuntu pcscd: winscard.c:459:SCardConnect() hCard Identity: 1ad16
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
Jul 10 14:43:57 ubuntu pcscd: winscard.c:1647:SCardTransmit() Send Protocol: T=1
Jul 10 14:43:57 ubuntu pcscd: ifdhandler.c:1129:IFDHTransmitToICC() usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 10 14:43:57 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CONTROL_EXTENDED received by client 8
Jul 10 14:43:57 ubuntu pcscd: winscard_svc.c:816:MSGCheckHandleAssociation() Client failed to authenticate
Jul 10 14:43:59 ubuntu pcscd: winscard_svc.c:162:ContextThread() MSGFunctionDemarshall failed: -1
Jul 10 14:43:59 ubuntu pcscd: winscard.c:253:SCardReleaseContext() Releasing Context: 16979192
Jul 10 14:43:59 ubuntu pcscd: winscard.c:880:SCardDisconnect() Active Contexts: 1



     

_______________________________________________
Muscle mailing list
Muscle@...
http://lists.drizzle.com/mailman/listinfo/muscle

Re: pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

by Ludovic Rousseau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/10 john bougs <bogusemail98230@...>:
> I have been trying to get pcsc-lite running on a sheeva plug (arm) computer with an acr122u reader without much success.  I have tried pcsc-lite 1.5.4 and 1.5.3 without much success.  I always get a "pcscd: winscard_svc.c:816:MSGCheckHandleAssociation() Client failed to authenticate" when I try accessing the card.  I have tried the same configuration on my desktop (1.5.3) and had no problems.  Any suggestions?

> Testing SCardControl            : RPC transport error. (don't panic)

The problem only occurs with SCardControl(). That is strange and I
will need your help/time to debug the problem.

Can you apply the attached patch and try again.
I will need the output of pcscd and testpcsc as you did in the first mail.

Bye

--
 Dr. Ludovic Rousseau

Index: src/winscard_svc.c
===================================================================
--- src/winscard_svc.c (révision 4314)
+++ src/winscard_svc.c (copie de travail)
@@ -595,6 +595,7 @@ static LONG MSGFunctionDemarshall(pshare
  unsigned char pbRecvBuffer[MAX_BUFFER_SIZE_EXTENDED];
 
  cteStr = ((control_struct_extended *) msgStruct->data);
+ printf("hCard: %X\n", cteStr->hCard);
  rv = MSGCheckHandleAssociation(cteStr->hCard, dwContextIndex);
  if (rv != 0) return rv;
 
Index: src/winscard_clnt.c
===================================================================
--- src/winscard_clnt.c (révision 4314)
+++ src/winscard_clnt.c (copie de travail)
@@ -2427,6 +2427,7 @@ LONG SCardControl(SCARDHANDLE hCard, DWO
  control_struct_extended *scControlStructExtended = (control_struct_extended *)buffer;
  sharedSegmentMsg *pmsgStruct = (psharedSegmentMsg)buffer;
 
+ printf("hCard: %lX\n", hCard);
  scControlStructExtended->hCard = hCard;
  scControlStructExtended->dwControlCode = dwControlCode;
  scControlStructExtended->cbSendLength = cbSendLength;

_______________________________________________
Muscle mailing list
Muscle@...
http://lists.drizzle.com/mailman/listinfo/muscle

Re: pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

by john bougs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your response.  I will do what I can to help, but am leaving for a month starting friday night.


root@ubuntu:~/pcsc-lite-1.5.4/src# pcscd -d
root@ubuntu:~/pcsc-lite-1.5.4/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        : Command successful.
Testing SCardListReaders        : Command successful.
Reader 01: ACS ACR122U PICC Interface 00 00
Waiting for card insertion      : Command successful.
Testing SCardConnect            : Command successful.
Select file: 00 A4 00 00 02 3F 00
Testing SCardTransmit           : Command successful.
 card response: 63 00
Testing SCardControl            : hCard: 10326
RPC transport error. (don't panic)


Jul 16 16:17:08 ubuntu pcscd: debuglog.c:230:DebugLogSetLevel() debug level=debug
Jul 16 16:17:08 ubuntu pcscd: pcscdaemon.c:512:main() pcsc-lite 1.5.4 daemon ready.
Jul 16 16:17:09 ubuntu pcscd: tokenparser.l:175:LTPBundleFindValueWithKey() Value/Key not defined for: ifdVendorID in /usr/local/pcsc/drivers/ifd-ccid.bundle/Contents/It
Jul 16 16:17:09 ubuntu pcscd: hotplug_libhal.c:316:get_driver() Looking a driver for VID: 0x072F, PID: 0x2200
Jul 16 16:17:09 ubuntu pcscd: hotplug_libhal.c:362:HPAddDevice() Adding USB device: usb_device_72f_2200_noserial_if0
Jul 16 16:17:10 ubuntu pcscd: readerfactory.c:1024:RFInitializeReader() Attempting startup of ACS ACR122U PICC Interface 00 00 using /usr/local/pcsc/drivers/ifd-ccid.buo
Jul 16 16:17:10 ubuntu pcscd: readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:1417:init_driver() Driver version: 1.3.10
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:1430:init_driver() LogLevel: 0x0003
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:1450:init_driver() DriverOptions: 0x0000
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:81:IFDHCreateChannelByName() lun: 0, device: usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_i0
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:238:OpenUSBByName() Manufacturer: Ludovic Rousseau (ludovic.rousseau@...)
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:248:OpenUSBByName() ProductString: Generic CCID driver
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:254:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at y.
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:410:OpenUSBByName() Found Vendor/Product: 072F/2200 (ACS ACR122U PICC Interface)
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:412:OpenUSBByName() Using USB bus/device: 001/002
Jul 16 16:17:10 ubuntu pcscd: ccid_usb.c:784:get_data_rates() IFD does not support GET_DATA_RATES request: Success
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFB0, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun)
Jul 16 16:17:10 ubuntu pcscd: readerfactory.c:249:RFAddReader() Using the pcscd polling thread
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:1002:IFDHPowerICC() action: PowerUp, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun:)
Jul 16 16:17:10 ubuntu pcscd: Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFAE, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun)
Jul 16 16:17:10 ubuntu pcscd: ifdhandler.c:377:IFDHGetCapabilities() Reader supports 1 slot(s)
Jul 16 16:17:10 ubuntu pcscd: hotplug_libhal.c:316:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0002
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:239:SHMProcessEventsServer() Common channel packet arrival
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:248:SHMProcessEventsServer() SHMProcessCommonChannelRequest detects: 8
Jul 16 16:17:16 ubuntu pcscd: pcscdaemon.c:147:SVCServiceRunLoop() A new context thread creation is requested: 8
Jul 16 16:17:16 ubuntu pcscd: winscard_svc.c:133:ContextThread() Thread is started: 8
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CMD_VERSION received by client 8
Jul 16 16:17:16 ubuntu pcscd: winscard_svc.c:189:ContextThread() Client is protocol version 3:0
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command ESTABLISH_CONTEXT received by client 8
Jul 16 16:17:16 ubuntu pcscd: winscard.c:242:SCardEstablishContext() Establishing Context: 17033932
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT received by client 8
Jul 16 16:17:16 ubuntu pcscd: winscard.c:303:SCardConnect() Attempting Connect to ACS ACR122U PICC Interface 00 00 using protocol: 3
Jul 16 16:17:16 ubuntu pcscd: prothandler.c:128:PHSetProtocol() Attempting PTS to T=1
Jul 16 16:17:16 ubuntu pcscd: ifdhandler.c:540:IFDHSetProtocolParameters() protocol T=1, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_)
Jul 16 16:17:16 ubuntu pcscd: winscard.c:449:SCardConnect() Active Protocol: T=1
Jul 16 16:17:16 ubuntu pcscd: winscard.c:459:SCardConnect() hCard Identity: 10326
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
Jul 16 16:17:16 ubuntu pcscd: winscard.c:1647:SCardTransmit() Send Protocol: T=1
Jul 16 16:17:16 ubuntu pcscd: ifdhandler.c:1129:IFDHTransmitToICC() usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CONTROL_EXTENDED received by client 8
Jul 16 16:17:16 ubuntu pcscd: winscard_svc.c:817:MSGCheckHandleAssociation() Client failed to authenticate
Jul 16 16:17:18 ubuntu pcscd: winscard_svc.c:162:ContextThread() MSGFunctionDemarshall failed: -1
Jul 16 16:17:18 ubuntu pcscd: winscard.c:253:SCardReleaseContext() Releasing Context: 17033932
Jul 16 16:17:18 ubuntu pcscd: winscard.c:880:SCardDisconnect() Active Contexts: 1




----- Original Message ----
From: Ludovic Rousseau <ludovic.rousseau@...>
To: MUSCLE <muscle@...>
Sent: Thursday, July 16, 2009 5:26:09 AM
Subject: Re: [Muscle] pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

2009/7/10 john bougs <bogusemail98230@...>:
> I have been trying to get pcsc-lite running on a sheeva plug (arm) computer with an acr122u reader without much success.  I have tried pcsc-lite 1.5.4 and 1.5.3 without much success.  I always get a "pcscd: winscard_svc.c:816:MSGCheckHandleAssociation() Client failed to authenticate" when I try accessing the card.  I have tried the same configuration on my desktop (1.5.3) and had no problems.  Any suggestions?

> Testing SCardControl            : RPC transport error. (don't panic)

The problem only occurs with SCardControl(). That is strange and I
will need your help/time to debug the problem.

Can you apply the attached patch and try again.
I will need the output of pcscd and testpcsc as you did in the first mail.

Bye

--
Dr. Ludovic Rousseau



     

_______________________________________________
Muscle mailing list
Muscle@...
http://lists.drizzle.com/mailman/listinfo/muscle

Re: pcsc-lite "MSGCheckHandleAssociation() Client failed to authenticate" on sheva plug (arm) with acr122u

by Ludovic Rousseau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/16 john bougs <bogusemail98230@...>:
> Thank you for your response.  I will do what I can to help, but am leaving for a month starting friday night.

> Testing SCardControl            : hCard: 10326

> Jul 16 16:17:16 ubuntu pcscd: winscard.c:459:SCardConnect() hCard Identity: 10326

The card handle is the same on both side.

> Jul 16 16:17:16 ubuntu pcscd: winscard_msg_srv.c:317:SHMProcessEventsContext() command CONTROL_EXTENDED received by client 8

I was expecting a hCard log line here.
Are you running the _locally_ compiled pcscd? Using ./pcscd

> Jul 16 16:17:16 ubuntu pcscd: winscard_svc.c:817:MSGCheckHandleAssociation() Client failed to authenticate
> Jul 16 16:17:18 ubuntu pcscd: winscard_svc.c:162:ContextThread() MSGFunctionDemarshall failed: -1

I have no idea of the problem. To be continued...

Thanks

--
 Dr. Ludovic Rousseau

_______________________________________________
Muscle mailing list
Muscle@...
http://lists.drizzle.com/mailman/listinfo/muscle