title: APDU Selecting specific file and reading binary data
body: <p>I'm trying to read a very specific binary information from a Smart Card using PC/SC API in c#.</p>
  
  <p>I Want to select a specific file </p>
  
  <pre><code>00 A4 02 0C 02 05 20
  </code></pre>
  
  <p>And read binary data</p>
  
  <pre><code>00 B0 00 00 8F
  </code></pre>
  
  <p>As far as I know the 5 bytes for reading binary data is in the following order:</p>
  
  <pre><code>Class, Instruction, Parameter 1, Parameter 2, Length
  </code></pre>
  
  <p><strong>My first question is in what order the select file array of 7 bytes is.</strong></p>
  
  <pre><code>Class,Instruction, Parameter 1, Parameter 2, ?,?,?
  </code></pre>
  
  <p><strong>My second question is what IsoCase and Protocol I should use for each command.</strong></p>
  
  <p>Following case and protocol seems to work for reading binary data but it confuses me since I'm not using a SmartCard and not RFID.</p>
  
  <pre><code>var apdu = new CommandApdu(IsoCase.Case2Short,rfidReader.ActiveProtocol)
  </code></pre>
  
  <hr>
  
  <p>Using PCSC-sharp.dll from <a href="https://code.google.com/p/pcsc-sharp/" rel="nofollow">https://code.google.com/p/pcsc-sharp/</a>:</p>
  
  <pre><code>using PCSC;
  using PCSC.Iso7816;
  </code></pre>