Page 1 of 1

SCardTransmit returns "invalid parameters ERROR 80100004"

Posted: Thu Apr 13, 2017 11:30 pm
by lutajc
Hello guys,

I have just finished an application for SmartCard. And this application performs well under T=0 protocol, but for T=1 SCardTransmit function returns "invalid parameters ERROR 80100004" . Does the vector have the same format for both protocols ?

My code:

Code: Select all

public void Trasmision()
{
    **Byte[] vectorSend = { 0x00, 0xa4, 0x04, 0x00, 0x00, 0x6f, 0x65 };**
    UInt32 inT2 = (UInt32)vectorSend.Length;
    vectorIn = new Byte[254];
    UInt32 inT = (UInt32)vectorIn.Length;
    IntPtr PT1 =GetPciT0() ;
    this.rTransmit = SCardTransmit(this.hContext, GetPciT1(), vectorSend, inT2, request, vectorIn, inT);
}


cheers,
lutajc

Re: SCardTransmit returns "invalid parameters ERROR 80100004"

Posted: Fri Apr 14, 2017 5:46 am
by BrooksIQ
Do you have SCARD_PROTOCOL_T1 in your SCardConnect call?

Re: SCardTransmit returns "invalid parameters ERROR 80100004"

Posted: Fri Apr 14, 2017 6:13 am
by BrooksIQ
Another thing is Byte[] vectorSend command maybe wrong. It seems that LC is wrong.

You can try to send
>> 0x00, 0xa4, 0x04, 0x00, 0x02, 0x6f, 0x65, 0x00