# ifdwrapper.c: IFDControl() Card not transacted: 612 [solved]

## samo

Hello,

after updating pcsc-lite and cyberjack I have problems with Moneyplex12 (64 bit).

I've started the pcsc manually for debugging:

```
pcscd -a -d -f
```

When trying to enter the pin via Moneyplex I get the following error:

```
35835482 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_msg_srv.c:253:ProcessEventsServer() Common channel packet arrival

00000022 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_msg_srv.c:265:ProcessEventsServer() ProcessCommonChannelRequest detects: 15

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/pcscdaemon.c:134:SVCServiceRunLoop() A new context thread creation is requested: 15

00009032 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:331:ContextThread() Authorized PC/SC client

00000014 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:335:ContextThread() Thread is started: dwClientID=15, threadContext @0x8385d0

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CMD_VERSION from client 15

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:365:ContextThread() Client is protocol version 4:3

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:385:ContextThread() CMD_VERSION rv=0x0 for client 15

00000200 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: ESTABLISH_CONTEXT from client 15

00000016 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:215:SCardEstablishContext() Establishing Context: 0x42028908

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:446:ContextThread() ESTABLISH_CONTEXT rv=0x0 for client 15

00000124 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CMD_GET_READERS_STATE from client 15

00000079 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CMD_GET_READERS_STATE from client 15

00000091 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CONNECT from client 15

00002917 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:484:ContextThread() Authorized client for 'REINER SCT cyberJack ecom_a (3680486100) 00 00'

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:257:SCardConnect() Attempting Connect to REINER SCT cyberJack ecom_a (3680486100) 00 00 using protocol: 3

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:768:RFReaderInfo() RefReader() count was: 1

00044799 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:332:SCardConnect() power up complete.

00000017 Card ATR: 3B FF 28 00 FF 81 31 FE 55 66 63 11 08 43 02 50 00 10 10 10 03 22 05 30 19 

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:352:SCardConnect() powerState: POWER_STATE_INUSE

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/prothandler.c:110:PHSetProtocol() Attempting PTS to T=1

00014054 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:431:SCardConnect() Active Protocol: T=1

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:451:SCardConnect() hCard Identity: 39357fe5

00000006 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:512:SCardConnect() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:498:ContextThread() CONNECT rv=0x0 for client 15

00000044 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CMD_GET_READERS_STATE from client 15

00000027 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: STATUS from client 15

00000006 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1313:SCardStatus() UnrefReader() count was: 2

00000003 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:606:ContextThread() STATUS rv=0x0 for client 15

00000033 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000007 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000005 APDU: 00 A4 04 0C 09 D2 76 00 00 25 48 42 01 00 

00082862 SW: 6A 82 

00000013 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000006 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00000196 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000013 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000005 APDU: 00 A4 04 0C 09 D2 76 00 00 25 48 42 02 00 

00018126 SW: 90 00 

00000013 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000006 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00000054 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000010 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000003 APDU: 00 A4 00 00 00 

00014044 SW: 6F 08 84 04 52 4F 4F 54 A5 00 90 00 

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00000057 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000009 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000004 APDU: 00 A4 02 0C 02 00 03 

00021489 SW: 90 00 

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00000050 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000011 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000007 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000004 APDU: 00 B2 01 04 00 

00021074 SW: 67 26 10 11 41 20 00 58 57 4D 12 12 08 08 07 02 80 45 55 52 01 3F 00 01 90 00 

00000012 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00000055 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: TRANSMIT from client 15

00000008 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000004 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1608:SCardTransmit() Send Protocol: T=1

00000005 APDU: 00 A4 04 0C 09 D2 76 00 00 25 48 42 02 00 

00018656 SW: 90 00 

00000011 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1653:SCardTransmit() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:659:ContextThread() TRANSMIT rv=0x0 for client 15

00002690 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CONTROL from client 15

00000019 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000132 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1372:SCardControl() UnrefReader() count was: 2

00000005 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:703:ContextThread() CONTROL rv=0x0 for client 15

00000050 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:353:ContextThread() Received command: CONTROL from client 15

00000008 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/readerfactory.c:795:RFReaderInfoById() RefReader() count was: 1

00000044 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/ifdwrapper.c:484:IFDControl() Card not transacted: 612

00000003 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/ifdwrapper.c:486:IFDControl() ControlCode: 0x42000DB2 BytesReturned: 0

00000008 TxBuffer 00 A5 89 47 04 0C 05 02 FF 04 09 00 00 00 00 0D 00 00 00 00 20 00 81 08 25 FF FF FF FF FF FF FF 

00000001 RxBuffer 

00000002 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard.c:1372:SCardControl() UnrefReader() count was: 2

00000003 /var/tmp/portage/sys-apps/pcsc-lite-1.8.14/work/pcsc-lite-1.8.14/src/winscard_svc.c:703:ContextThread() CONTROL rv=0x80100016 for client 15
```

The following line is red coloured (near the end):

```
ifdwrapper.c:484:IFDControl() Card not transacted: 612
```

I've installed following versions:

```
sys-apps/pcsc-lite-1.8.14::gentoo  USE="(policykit) udev -libusb (-selinux)" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7" 0 KiB

dev-libs/cyberjack-3.99.5_p05::gentoo  USE="threads udev usb -fox -static-libs" 0 KiB
```

Does someone have an idea what is wrong?Last edited by samo on Sat Oct 24, 2015 9:30 pm; edited 4 times in total

----------

## samo

Downgrading to sys-apps/pcsc-lite-1.8.8-r1 and dev-libs/cyberjack-3.99.5_p03-r1 solved the problem.

----------

