apdu - ScardTransmit always returning error 16 -


I have been trying to create an application in the window using the Winscard Library to communicate with a contactless Smart Card Reader I am I am able to connect to the device, but when I try to send some data using scardtransmit, I receive an error 16. I have attached the piece of code I am using below

  SCARD_IO_REQUEST pioSendPci = * SCARD_PCI_T1; // SCARD_IO_REQUEST pioSendPci = * SCARD_PCI_RAW; DWORD dwRecvLength; Bytes PBRK Bubfer [258]; Byte CMD 1 [260]; CMD 1 [0] = 0xA0; CMD 1 [1] = 0x0d; CMD 1 [2] = 0x01; CMD 1 [3] = 0x00; CMD 1 [4] = 0x01; Eulong Sendbuffen = 0x05; DwRecvLength = sizeof (pbRecvBuffer); RV2 = Skarttranimit (HCard, and POSendPC, CMD1, SSBflan, Faucet, PBRKB Buffer, and Dwreckil Langh);    

The command you are trying to send does not look like a valid APIU is.

This form is in a valid ADU (see ISO / IEC 7816-4) (except extended length epidu):

  + -------- + - ------ + -------- + -------- + -------- + ---------- + --- - --- + | CLA | INS | P1 | P2. [LC] | [Data] | [LE] | + -------- + -------- + -------- + -------- + -------- + ---- ------ + -------- + | 1 byte 1 byte 1 byte 1 byte 1 byte LC Bytes | 1 byte + -------- + -------- + -------- + -------- + -------- + ---- ------ + -------- +   

Where LC is the number of commands transmitted data Bytes or empty (i.e. no carry ) if there is no data byte LE the number of bytes expected response data with special code = 256 (or maximum) of expected REPAX data bytes indicating the expected response data bytes and LE =



  • Comments

    Popular posts from this blog

    c - Mpirun hangs when mpi send and recieve is put in a loop -

    python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

    java - Unable to get JDBC connection in Spring application to MySQL -