Unitech mr350 mkii Software Guide

Page of 33
 
30
3.21 
F_UPD_BIN 
This function updates data in a transparent EF. When secure messaging is used the    function 
dose not accept this command of length greater than the communication    buffer size(64 bytes). 
 
 
Compatible with ISO7816 or Gemplus command set 
 
 
IS7816    if class = normal 
 
 
Genplus  if class = secure 
 
Function call 
Void F_UPD_BIN( S_UPD_BIN* ); 
 
Data structure of S_UPD_BIN 
typedef struct 
{    
int Class; 
int Mode; 
unsigned char ShortId; 
int Offset; 
int UpdateLen; 
unsigned char UpdData[MaxDATA]; 
int IdOk; 
unsigned char Sw12[2]; 
unsigned char CRYin[3]; 
unsigned char CRYout[3]; 
} S_UPD_BIN; 
 
    Input parameter :   
Class   
 
:0:NORMAL     
 
1:SECURE 
Mode     
:0:direct select       
1:implicit select 
ShortId     
:short EF identifier,This is needed if Mode=1. 
Offset     
:0000-7FFF if Mode=0, 00-FF if Mode=1. 
UpdateLen    :00-7F,data length to be read. 
UpdData[] 
:holds data to replace exist file contents. 
 
   Output parameter : This function updates the following parameters. 
IdOk       : 0 = OK   
 
1 = Timeout   
2 = No card 
; 3 = EDC error 
5 = Parity error 
7 = see SW1-SW2 
Sw12[]     :SW1-SW2 
CRYin[]    :CRYcks 2,1,0 only for secure message 
CRYout[]   :CRYcks 7,6,5 only for secure message