title: ACR122U Sending Direct commands returning -2 and Segmentation fault
body: <p>I am trying to send a direct command to the ACR122U reader.
  The simplest one I have is: FF 00 48 00 00</p>
  
  <p>This command is suppose to return the Firmware version. Using the ACR122U tool I can see that it works fine.
  I am trying to use nfc_initiator_transceive_bytes to send this and get the firmware version.
  This is how I am doing:</p>
  
  <pre><code>uint8_t abtCmd[] = {0xFF,0x00,0x48,0x00,0x00};
  int res = nfc_initiator_transceive_bytes(
              pnd,           
              abtCmd,
              5,
              pbtRx,
              400,           
              2000
              );
  </code></pre>
  
  <p>This is always returning -2. Is nfc_initiator_transceive_bytes not the correct function? What am I doing wrong?
  Thanks!</p>
  
  <p>PS: I have \xFF\x00\x00\x00\x05 on there because that's what the manual says to do (API_ACR122U_v1.4.pdf section 6.1 direct commands)</p>
  
  <p>I have turned on debuging on libnfc and I am seeing this:</p>
  
  <blockquote>
    <p>debug   libnfc.driver.acr122_usb        TX: 6f 0d 00 00 00 00 00 00 00
    00 ff 00 00 00 08 d4 40 01 ff 00 48 00 00 debug<br>
    libnfc.driver.acr122_usb        RX: 80 05 00 00 00 00 00 00 81 00 d5
    41 27 90 00</p>
  </blockquote>
  
  <p>I can see the ff 00 00 00  
  so I guess I don't have to specify that when I send a direct command, but this is still returning this:</p>
  
  <blockquote>
    <p>debug   libnfc.chip.pn53x       Chip error: "Command Not Acceptable"
    (27), returned error: "Invalid argument(s)" (-2))</p>
  </blockquote>
  
  <p>Is it the hex that libnfc is adding that is messing this up? Please anyone???</p>
  
  <p>I have also changed the initial code.</p>
  
  <p>I have also tried with nfc_target_send_bytes by doing:</p>
  
  <blockquote>
    <p>nfc_target_send_bytes(pnd, abtCmd, 5,0);</p>
  </blockquote>
  
  <p>This gives me a segmentation fault.</p>