<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-05-18 13:29 GMT+02:00 Gökçenur CANLI <span dir="ltr"><<a href="mailto:gokcenur.canli@udea.com.tr" target="_blank">gokcenur.canli@udea.com.tr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>Sorry for wrong one, generated updated log is attached.<br></p></div></blockquote><div><br>00000002 ifdhandler.c:1081:<wbr>IFDHSetProtocolParameters() Negotiate IFSD at 254<br>00000003 sending: 00 C1 01 FE 3E <br>00000003 -> 000000 6F 05 00 00 00 00 0D 00 00 00 00 C1 01 FE 3E <br>00000966 <- 000000 80 04 00 00 00 00 0D 00 00 00 92 82 00 10 <br>00000005 received: 92 82 00 10 <br>00000002 sending: 00 C1 01 FE 3E <br>00000003 -> 000000 6F 05 00 00 00 00 0E 00 00 00 00 C1 01 FE 3E <br>00000769 <- 000000 80 04 00 00 00 00 0E 00 00 00 92 82 00 10 <br>00000005 received: 92 82 00 10 <br>00000002 sending: 00 C1 01 FE 3E <br>00000003 -> 000000 6F 05 00 00 00 00 0F 00 00 00 00 C1 01 FE 3E <br>00000767 <- 000000 80 04 00 00 00 00 0F 00 00 00 92 82 00 10 <br>00000005 received: 92 82 00 10 <br>00000002 prothandler.c:124:<wbr>PHSetProtocol() PTS failed (612), using T=1<br><br clear="all"></div></div>The reader fails to negociate the IFSD (Information Field Size for CCID for protocol T = 1)<br><br></div><div class="gmail_extra">The value returned by the reader "92 82 00 10" is very strange (bogus?).<br></div><div class="gmail_extra">The CCID driver tries 3 times the same command and then gives up.<br><br></div><div class="gmail_extra">As Francois Grieu wrote in another email (thanks for that) this card can use a very fast communication.<br></div><div class="gmail_extra">Your reader [1] defines:<br>dwDefaultClock: 4.800 MHz [3]<br>and<br>dwMaxDataRate: 826000 bps [4]<br><br>So the card could communicate at 300 kbits/s.<br></div><div class="gmail_extra"><br>Your card is not yet in my list. Could you add it using [2]? Or tell us what this smart card is?<br><br><br></div><div class="gmail_extra">Francois proposed different solutions to solve the problem.<br></div><div class="gmail_extra">There is no easy way to force a TA1 in the driver. Maybe the simplest fix would be to change the value of dwMaxDataRate<span class="gmail-"> </span>for this reader and use a (much) lower value instead.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Proposed patch:<br><span style="font-family:monospace,monospace">--- /var/folders/5h/3d1x67_x5g30t36wypgxpmpc0000gn/T//sbZS7a_ccid.c 2017-05-18 14:33:20.000000000 +0200<br>+++ src/ccid.c  2017-05-18 14:33:18.000000000 +0200<br>@@ -87,6 +87,10 @@ int ccid_open_hack_pre(unsigned int read<br>            ccid_descriptor->dwMaxDataRate = 9600;<br>            break;<br> <br>+       case MICROCHIP_SEC1100:<br>+           ccid_descriptor->dwMaxDataRate = 12903;<br>+           break;<br>+<br>        case ElatecTWN4:<br>            /* use a timeout of 400 ms instead of 100 ms in CmdGetSlotStatus()<br>             * used by CreateChannelByNameOrChannel()<br></span><br><br>12903 is a very low value. This is the lowest/default data rate of the reader (dwDataRate [5])<br>You can increase it up to 826000 and see when the reader fails.<br><br></div><div class="gmail_extra">Bye<br></div><div class="gmail_extra"><br>[1] <a href="http://pcsclite.alioth.debian.org/ccid/readers/Microchip_SEC1110.txt">http://pcsclite.alioth.debian.org/ccid/readers/Microchip_SEC1110.txt</a><br></div><div class="gmail_extra">[2] <a href="http://smartcard-atr.appspot.com/parse?ATR=3B9F968131FE458065544312210831C073F6218081059A">http://smartcard-atr.appspot.com/parse?ATR=3B9F968131FE458065544312210831C073F6218081059A</a><br>[3] <a href="https://ludovicrousseau.blogspot.fr/2014/07/ccid-descriptor-statistics.html">https://ludovicrousseau.blogspot.fr/2014/07/ccid-descriptor-statistics.html</a><br>[4] <a href="https://ludovicrousseau.blogspot.fr/2014/07/ccid-descriptor-statistics-dwmaxdatarate.html">https://ludovicrousseau.blogspot.fr/2014/07/ccid-descriptor-statistics-dwmaxdatarate.html</a><br>[5] <a href="https://ludovicrousseau.blogspot.fr/2014/02/ccid-descriptor-statistics-dwdatarate.html">https://ludovicrousseau.blogspot.fr/2014/02/ccid-descriptor-statistics-dwdatarate.html</a><br><br>-- <br><div class="gmail-m_-1930177603088813674gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>