Apdu for SmartCard T1 protocol

0

I am developing an application for SmartCard and when I work with the T0 protocol the application runs perfect but for T1 the function SCardTransmit returns me:

  

ERROR INVALID PARAMETERS

My question is: does the vector have the same format for both protocols or does it change the format of the vector?

   public void Trasmision()
    {
        Byte[] vectorSend = { 0x00, 0xa4, 0x04, 0x00, 0x00 };
        UInt32 inT2 = (UInt32)vectorSend.Length; 
        vectorIn = new Byte[254];
        UInt32 inT = (UInt32)vectorIn.Length;
        IntPtr PT1 =GetPciT0() ;
        this.rTransmit = SCardTransmit(this.hContext, GetPciT0(), vectorSend, inT2, request, vectorIn, inT); 
    }
    
asked by Efrain Mejias C 14.05.2016 в 04:16
source

1 answer

1

I'm analyzing this implementation

Problems using SCardTransmit from winScard.dll reading a tag 4B

and I can see that it changes as it defines the second parameter

There I see that you use GetProcAddress() with g_rgSCardT1Pci , while in your code you still use GetPciT0() when this should change

scardtransmit (winscard)

Here

Smartcard communication with protocol t1

the same problem of invalid parameters arises, although I'm not sure I understand the answer

Also analyze

A Smart Card Framework for .NET

    
answered by 14.05.2016 в 06:23