Thanks for the help.  I don't have a SheevaPlug (Europe version) I can send 
you, and I can't create the problem on a PC, so I guess I'm going to have to 
look into this myself.  


----- Original Message ----
From: Ludovic Rousseau <[email protected]>
To: MUSCLE <[email protected]>
Sent: Friday, August 28, 2009 1:34:16 AM
Subject: Re: [Muscle] pcsc-lite "MSGCheckHandleAssociation() Client failed to 
authenticate" on sheva plug (arm) with acr122u

2009/8/25 john bougs <[email protected]>:
> I'm back.

Hello,

> I've updated to  pcsc-lite 1.5.5 and ccid 1.3.11 and still have the problem.  
> I had to set DRIVER_OPTION_USE_BOGUS_FIRMWARE to work with my readers. I have 
> a version 2.03 and 2.05.  Speaking with the vendor there is no version 2.06 
> of the ACR122 yet.

I have an ACR122 with firmware 2.06.
See http://pcsclite.alioth.debian.org/unsupported.html#0x072F0x2200
and http://pcsclite.alioth.debian.org/readers/ACR122U_PICC.txt

> anyhow, here are the log files.
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# uname -m
> armv5tel
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# cat /proc/cpuinfo
> Processor       : Feroceon 88FR131 rev 1 (v5l)
> BogoMIPS        : 1192.75
> Features        : swp half thumb fastmult edsp
> CPU implementer : 0x56
> CPU architecture: 5TE
> CPU variant     : 0x2
> CPU part        : 0x131
> CPU revision    : 1
> Hardware        : Marvell SheevaPlug Reference Board
> Revision        : 0000
> Serial          : 0000000000000000
>
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# cat /etc/issue
> Ubuntu 9.04 \n \l
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# LIBCCID_ifdLogLevel=0x0007
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# export LIBCCID_ifdLogLevel
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/src# ./pcscd --foreground --debug 
> --apdu
> 00000000 debuglog.c:230:DebugLogSetLevel() debug level=debug
> 00000713 debuglog.c:259:DebugLogSetCategory() Debug options: APDU
> 00001941 pcscdaemon.c:512:main() pcsc-lite 1.5.5 daemon ready.
> 00985707 hotplug_libhal.c:318:get_driver() Looking a driver for VID: 0x072F, 
> PID: 0x2200
> 00000665 hotplug_libhal.c:366:HPAddDevice() Adding USB device: 
> usb_device_72f_2200_noserial_if0
> 01002938 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
> 00001634 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
> 00000916 ifdhandler.c:1532:init_driver() Driver version: 1.3.11
> 00002081 ifdhandler.c:1545:init_driver() LogLevel: 0x0003
> 00000600 ifdhandler.c:1555:init_driver() LogLevel from LIBCCID_ifdLogLevel: 
> 0x0007
> 00001889 ifdhandler.c:1565:init_driver() DriverOptions: 0x0004
> 00000541 ifdhandler.c:82:IFDHCreateChannelByName() lun: 0, device: 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
> 00000655 ccid_usb.c:162:OpenUSBByName() Reader index: 0, Device: 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
> 00002808 ccid_usb.c:285:OpenUSBByName() Manufacturer: Ludovic Rousseau 
> ([email protected])
> 00001938 ccid_usb.c:295:OpenUSBByName() ProductString: Generic CCID driver
> 00001870 ccid_usb.c:301: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.
> 00219177 ccid_usb.c:383:OpenUSBByName() Checking device: 001/019
> 00000592 ccid_usb.c:437:OpenUSBByName() Trying to open USB bus/device: 001/019
> 00000664 ccid_usb.c:501:OpenUSBByName() Found Vendor/Product: 072F/2200 (ACS 
> ACR122U PICC Interface)
> 00000570 ccid_usb.c:503:OpenUSBByName() Using USB bus/device: 001/019
> 00000642 ccid_usb.c:852:ccid_check_firmware() Firmware (2.05) is bogus! but 
> you choosed to use it
> 00000553 ccid_usb.c:949:ControlUSB() request: 0x03
> 00013584 receive:
> 00000586 ccid_usb.c:893:get_data_rates() IFD does not support GET_DATA_RATES 
> request: Success
> 00003462 NotifySlotChange: 50 03
> 00001974 ifdhandler.c:364:IFDHGetCapabilities() tag: 0xFB0, 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
>  (lun: 0)
> 00000548 readerfactory.c:249:RFAddReader() Using the pcscd polling thread
> 00006449 ifdhandler.c:1043:IFDHPowerICC() action: PowerUp, 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
>  (lun: 0)
> 00000609 -> 000000 62 00 00 00 00 00 04 01 00 00
> 00002434 <- 000000 80 14 00 00 00 00 04 00 81 00 3B 8F 80 01 80 4F 0C A0 00 
> 00 03 06 03 00 01 00 00 00 00 6A
> 00000575 Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
> 00002381 ifdhandler.c:364:IFDHGetCapabilities() tag: 0xFAE, 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
>  (lun: 0)
> 00000560 ifdhandler.c:418:IFDHGetCapabilities() Reader supports 1 slot(s)
> 00018089 hotplug_libhal.c:318:get_driver() Looking a driver for VID: 0x1D6B, 
> PID: 0x0002
> 26935694 winscard_msg_srv.c:239:SHMProcessEventsServer() Common channel 
> packet arrival
> 00000093 winscard_msg_srv.c:248:SHMProcessEventsServer() 
> SHMProcessCommonChannelRequest detects: 7
> 00000032 pcscdaemon.c:147:SVCServiceRunLoop() A new context thread creation 
> is requested: 7
> 00000133 winscard_svc.c:133:ContextThread() Thread is started: 7
> 00000567 winscard_msg_srv.c:317:SHMProcessEventsContext() command CMD_VERSION 
> received by client 7
> 00000055 winscard_svc.c:189:ContextThread() Client is protocol version 3:0
> 00000493 winscard_msg_srv.c:317:SHMProcessEventsContext() command 
> ESTABLISH_CONTEXT received by client 7
> 00000114 winscard.c:242:SCardEstablishContext() Establishing Context: 16993075
> 00009766 winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT 
> received by client 7
> 00000081 winscard.c:303:SCardConnect() Attempting Connect to ACS ACR122U PICC 
> Interface 00 00 using protocol: 3
> 00000043 prothandler.c:128:PHSetProtocol() Attempting PTS to T=1
> 00000036 ifdhandler.c:581:IFDHSetProtocolParameters() protocol T=1, 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
>  (lun: 0)
> 00000054 winscard.c:451:SCardConnect() Active Protocol: T=1
> 00000036 winscard.c:461:SCardConnect() hCard Identity: 1e2a0

hCard = 1e2a0 here

> 00002353 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT 
> received by client 7
> 00000093 winscard.c:1651:SCardTransmit() Send Protocol: T=1
> 00000042 APDU: 00 A4 00 00 02 3F 00
> 00000026 ifdhandler.c:1170:IFDHTransmitToICC() 
> usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
>  (lun: 0)
> 00000041 commands.c:1527:CmdXfrBlockTPDU_T0() T=0: 7 bytes
> 00000069 -> 000000 6F 07 00 00 00 00 48 00 00 00 00 A4 00 00 02 3F 00
> 00034526 <- 000000 80 02 00 00 00 00 48 00 81 00 63 00
> 00000529 SW: 63 00
> 00003407 winscard_msg_srv.c:317:SHMProcessEventsContext() command 
> CONTROL_EXTENDED received by client 7
> hCard: 10001

hCard = 10001 now. This is the cause of the error.

But I have no idea where this value of hCard comes from.

> 00001174 winscard_svc.c:817:MSGCheckHandleAssociation() Client failed to 
> authenticate


> 02000655 winscard_svc.c:162:ContextThread() MSGFunctionDemarshall failed: -1
> 00000563 winscard.c:253:SCardReleaseContext() Releasing Context: 16993075
> 00000529 winscard.c:884:SCardDisconnect() Active Contexts: 1

The SCardDisconnec() succeeds so the hCard sent this time is correct.

> and from test window
>
> r...@ubuntu:/mnt/nfs/sheeva/pcsc-lite-1.5.5/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: 1E2A0
> RPC transport error. (don't panic)

The hCard sent by the client is correct.


I have no idea where the bug comes from. Can you reproduce it in a
normal PC instead of a SheevaPlug?

If I can't reproduce the bug myself you have two options:
- track the bug yourself
- send me a SheevaPlug (Europe version) so I can debug it here

Regards,

-- 
Dr. Ludovic Rousseau

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle



      

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to