Hi Oliver,
I'm checking the GemCard project for card reader OMNIKEY 3121.
After successful connecting the first APDU command (SELECT APPLICATION) returned with 0x6700 status.
I attempted to test it in two environments, with the same result.
I could not find the explanation of this error (invalid length?), probably can you help me?..
1. environment:
Windows XP, VS2003, .NET 1.1, 32 bit
2. environment:
Windows 7, VS2010, .NET 2.0 32 bit
Test code:
static APDUCommand apduSelectApp = new APDUCommand(0x00, 0xA4, 0x04, 0, null, 0);
...
try
{
APDUResponse apduResp;
CardNative iCard = new CardNative();
string[] readers = iCard.ListReaders();
if (readers == null || readers.Length == 0)
throw new Exception("No smart card reader found!");
iCard.Connect(readers[0], SHARE.Shared, PROTOCOL.T0orT1);
Console.WriteLine("Connects card on reader: " + readers[0]);
byte[] ba = Utils.HexStringToByteArray("A0000000043060");
APDUParam apduParam = new APDUParam();
apduParam.Data = ba;
apduParam.Le = 0x00;
apduSelectApp.Update(apduParam);
apduResp = iCard.Transmit(apduSelectApp);
The console output (debug):
Connects card on reader: OMNIKEY CardMan 3x21 0
APDU Buffer : 00A4040007A0000000043060
APDU Response: 6700
Maestro (Debit) read, SW=6700
Note, that this card was successfully processed (select application, read record, etc.) by Smart Card Console (Java application).
Thank you in advance,
Serge
[DELETED]@hotmail.com
[edit]Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know - OriginalGriff[/edit]