<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I've been testing the NFC sim with oscilloscope with this results:<br><br></div><div style="margin-left:40px">- I use the new Omnikey 3121 reader, it was able to read the sim card. Vcc = 5V, Vpp = 3V, CLK = 5 Mhz.<br><br>- I try again to read same sim card with SCR 3310, but no way to do it; no green LED, Vcc = 0. I check with an old GRcard SIM, Vcc = 5V, Vpp = 0V, CLK = 5Mhz. <br></div></div><br>As SCR 3310 reader is unable to read this NFC sim cards, could be because are not 
implementing OpenCard Framework API (implemented only by Omnikey reader) ?<br><br></div><div>After test with both readers, I get back to iPhone:<br><br></div>- Using the sim card without simtrace: Vcc = 1.8V, Vpp = 0V and 5Mhz CLK.<br><br></div>- simtrace w/ iPhone SE:<br>        * only 2 times wasn't unable to recognize the sim card ("NO SIM card" message), that I guess could be mechanical problems due to wires, cables and so on. <br>       * when was able to read the sim, Vcc is always 3V (as in specs), Vpp = 0V and CLK 5 Mhz, but never was able to trace; or just nothing after "ATR APDU:" or gets stuck after a few very strange lines in which bytes CLA doesn't make sense:<br><br><div style="margin-left:40px">APDU: 00 00 04 b0 00 ff ff <br>APDU: 02 90 00 <b>00 a4 00 04</b> <br>APDU: <b>02 a4 6f 07</b> 61 22 00 <br>APDU: c0 00 00 22 c0 62 20<br></div><div><div><div><br></div><div>Looks like order or synchronization is lost, as you can see a regular APDU highlighted between two lines. Could be this issue related with the T=0 implementation?: "<i>Unfortunately, the Rx Timeout feature of the USART is not working in T=0 mode, so I had to re-implement Rx timeout (waiting time) handling by means of the TC (timer/counter) block 0. Due to technical limitations, we will wait up to one byte (12 etu) more than we should</i>."<br><br></div><div>Regards,<br></div><div>Pedro<br></div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-02 21:30 GMT+01:00 Pedro Cabrera <span dir="ltr"><<a href="mailto:pedrocab@gmail.com" target="_blank">pedrocab@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div></div>Before proceed with oscilloscope, I do a last test using simtrace and a Samsung Galaxy S3 with this UICC and surprisingly it works, so I have the ATR APDU:  3b 9f 96 c0 0a 3f c7 a0 80 31 e0 73 fe 21 1b 65 d0 01 74 0e a1 81 0f 9c <br><br>From there; <span class="m_-306603246346453167gmail-format">Fi=<span class="m_-306603246346453167gmail-data">512</span>, Di=<span class="m_-306603246346453167gmail-data">32</span>, </span><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-format">Protocol T=<span class="m_-306603246346453167gmail-data">0, </span></span>class accepted by the card: <span class="m_-306603246346453167gmail-data">A, B and C (<a href="https://smartcard-atr.appspot.com/parse?ATR=3b9f96c00a3fc7a08031e073fe211b65d001740ea1810f9c" target="_blank">https://smartcard-atr.<wbr>appspot.com/parse?ATR=<wbr>3b9f96c00a3fc7a08031e073fe211b<wbr>65d001740ea1810f9c</a>)<br><br></span></span></div><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-data">After this, I test over and over again with the same UICC card and an iPhone6 but never got ATR response, just got "ATR APDU: " and iPhone don't recognize SIM card. SCR3310 reader never recognizes the card, always "Card state: Card inserted, Unresponsive card" response. <br><br>I test simtrace/iPhone6 and SCR reader using same UICC type from other operator with same results (but working with simtrace/S.Galaxy S3)<br></span></span></div><div><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-data"><br></span></span></div><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-data">Regards,<br></span></span></div><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-data">Pedro<br></span></span><div><div><div><span class="m_-306603246346453167gmail-format"><span class="m_-306603246346453167gmail-data"><br> </span></span></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-03-01 13:16 GMT+01:00 Harald Welte <span dir="ltr"><<a href="mailto:laforge@gnumonks.org" target="_blank">laforge@gnumonks.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the best way to analyze this is to understand the exact voltage,<br>
clock rate and Fi/Di values your card is operating on on the working<br>
reader(s).  Most likely at least one of the parameters is different on<br>
the non-working readers.<br>
<br>
You should be able to figure all the related values out if you talk<br>
CCID directly to the USB device, or extend / "hack up" the ccid driver<br>
you're using.  Alternatively, an oscilloscopse should also be able to<br>
tell you related information.<br>
<br>
Regards,<br>
        Harald<br>
<span class="m_-306603246346453167HOEnZb"><font color="#888888"><br>
--<br>
- Harald Welte <<a href="mailto:laforge@gnumonks.org" target="_blank">laforge@gnumonks.org</a>>           <a href="http://laforge.gnumonks.org/" rel="noreferrer" target="_blank">http://laforge.gnumonks.org/</a><br>
==============================<wbr>==============================<wbr>================<br>
"Privacy in residential applications is a desirable marketing option."<br>
                                                  (ETSI EN 300 175-7 Ch. A6)<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>