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:


first, select the "master file" (this is a dummy for most of  memory cards)
 
s[0] = 0x00;   
s[1] = 0xA4;
s[2] = 0x00;   
s[3] = 0x00;
s[4] = 0x02;   
s[5] = 0x3f;
s[6] = 0x00;   

then you can send "write binary" commands like that: 

s[0] = 0x00;
s[1] = 0xD6;
s[2] = (address>>8);   
s[3] = (address & 0x00FF);
s[4] = size;  
s[5] ... s[5+size] = data
 



To read data from the card, select the master file and then:
s[0] = 0x00;   
s[1] = 0xB0;
s[2] = (address>>8);   
s[3] =(address & 0x00FF);
s[4] = size;  


Regards,

Guillaume



_________________________________

Guillaume LAISNEY
REALTRONIC  - service R&D logiciel

email: [EMAIL PROTECTED]

tel:    +33 (0) 2 33 50 98 00
fax:    +33 (0) 2 33 50 98 49

REALTRONIC
Z.I. Conillot
50400 Granville
FRANCE






***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************

Reply via email to