smartcard - how to Read Binary Data from EF in Scosta smart Card? -


i working scosta smart card, have created mf,df,ef file structure,i have created ef file formate in smart card , following code.

sendbuff[0] = 0x00;     //cla sendbuff[1] = 0xe0;     //ins sendbuff[2] = 0x00;     //p1 sendbuff[3] = 0x00;     //p2 sendbuff[4] = 0x1a;     //len sendbuff[5] = 0x62;     //t sendbuff[6] = 0x18;     //l  sendbuff[7] = 0x80;     //t sendbuff[8] = 0x02;     //len sendbuff[9] = 0x02;     //value,file size sendbuff[10] = 0x08;    //value,file size  sendbuff[11] = 0x82;    //t sendbuff[12] = 0x01;    //len sendbuff[13] = 0x01;    //fdb (transparent working ef)  sendbuff[14] = 0x83;     //t sendbuff[15] = 0x02;     //len sendbuff[16] = 0xe0;     //ef indentifier sendbuff[17] = 0x07;  sendbuff[18] = 0x88;      //t sendbuff[19] = 0x01;      //len sendbuff[20] = 0x09;      //value  sendbuff[21] = 0x8a;      //t sendbuff[22] = 0x01; sendbuff[23] = 0x01;      //lcsi. when file created first, in 01  sendbuff[24] = 0x8c;      //t sendbuff[25] = 0x05;      //len sendbuff[26] = 0x6a;      //security attributes sendbuff[27] = 0xff;        //delete file: never sendbuff[28] = 0xff;        //terminate ef: never sendbuff[29] = 0xff;        //deactivate ef: never sendbuff[30] = 0x23;        //update binary: se#3` 

i have write binary command in smart card using apdu 00 d0 00 04 10+data.so of this, have written data in smart card, before reading binary command ,i have selected written file on smart card, after have used read binary apdu command 00 b0 00 00 00.the response status is:

6986 command not allowed (no current ef).

read binary code:

modwinscard.scard_io_request sendrequest; sendrequest.dwprotocol = 1; sendrequest.cbpcilength = 8;  modwinscard.scard_io_request recvrequest; recvrequest.dwprotocol = 1; recvrequest.cbpcilength = 8;   byte[] sendbuff = new byte[255]; byte[] recvbuff = new byte[255];  int sendbufflen = 0x5; int recvbufflen = 0x12;  //byte currentblock = (byte)(int.parse(strblock)); //byte currentblock = convert.tobyte(strblock, 16); //byte len = convert.tobyte(len);  sendbuff[0] = 0x00; sendbuff[1] = 0xb0;        sendbuff[2] = 0x00; sendbuff[3] = 0x00; sendbuff[4] = 0x00;  status = modwinscard.scardtransmit(hcard, ref sendrequest, ref sendbuff[0], sendbufflen, ref recvrequest, ref recvbuff[0], ref recvbufflen); 

i have 2 following external tools reference:

  1. smart card toolset pro v3.4
  2. cryptware smart card console

by making use of these tools can write binary, update binary, read binary, data, have executed these operation of above tools , response "9000" in own coded smart card application not working properly, i.e. write binary, update binary, read binary command. sequence of performing operation on smart card start end steps?

8c tag compact security. hope error because of security enabled during creation of file.

could share apdu commands in readable form? identify problem.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -