<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Dear Ludovic and Francois,</p>
<p>Changing dwMaxDataRate<span class="gmail-"> was solved my all <i>(</i><i>SCardConnect()
- SCardTransmit()</i><i>)</i> problems. </span>Thank you for
all helps and valuable information. <br>
</p>
<p><font size="-1">* My smart card is <b>test</b> Electronic
Identity card of <i>The Scientific and Technological Research
Council of Turkey</i>. </font><br>
</p>
<p>Regards.<br>
</p>
Gokcenur.<br>
<br>
<div class="moz-cite-prefix">On 18-05-2017 15:36, Ludovic Rousseau
wrote:<br>
</div>
<blockquote
cite="mid:CAGstE8Dknb_c01cQgn9ULnFJ-U1SVrNTddNFQvpad-yhTdRrTg@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://smartcard-atr.appspot.com/parse?ATR=3B9F968131FE458065544312210831C073F6218081059A">http://smartcard-atr.appspot.com/parse?ATR=3B9F968131FE458065544312210831C073F6218081059A</a><br>
[3] <a moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pcsclite-muscle mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pcsclite-muscle@lists.alioth.debian.org">Pcsclite-muscle@lists.alioth.debian.org</a>
<a class="moz-txt-link-freetext" href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b>Gökçenur CANLI</b><br>
<small><i>Ar-Ge Mühendisi<br>
<font color="#4C787E"><em><small>UDEA Elektronik A.Ş. ODTÜ
Teknokent
<br>
Gümüş Bloklar
K1-3 Ofis Alanı<br>
Çankaya/ANKARA<br>
Tel : + 90 (312) 210 19 82<br>
Fax: +90 (312) 210 19 97<br>
</small></em></font><em><small>
<br>
<a href="http://www.udea.com.tr"><img
moz-do-not-send="false"
src="file:///home/gokcecan/Documents/udea_logo.bmp"
alt="Signature"></a></small></em></i></small></div>
</body>
</html>