On Tue, Jan 16, 2001 at 10:10:13AM -0000, Guillaume LAISNEY wrote:
> You can access any memory card thru PCSC-lite sending APDU-like commands with 
>SCardTransmit and ISO commands (look at ISO 7816-4).
> Check that your reader's driver is compliant with the card you want to access to. If 
>so, you can read/write bytes by sending these commands:
Well, I think I'm sending Data correctly, but I always get the response
"6e 00". :-( Nothing happens.

A short example:
BYTE s[7], r[10];
s[0] = 0x00;s[1] = 0xA4;
s[2] = 0x00;s[3] = 0x00;
s[4] = 0x02;s[5] = 0x3f;
s[6] = 0x00;

rv=SCardBeginTransaction(hCard);
rv=SCardTransmit(hCard,SCARD_PCI_RAW, s, dwSendLength,&sSendPci,r,&pcbRecvLength);
for (int i=0; i<pcbRecvLength;i++)
  printf("%02X ",r[i]);
  
Having a look at the "Towitoko CT-API tester utility", I would expect "90
00" instead. BTW, SCARD_PCI_T0 and SCARD_PCI_T1 fail.

Any ideas?

-- 
CU,
   Patrick.
"Never run on auto-pilot" - The Pragmatic Programmer

PGP signature

Reply via email to