27
3.18
F_SEL_ID
This function allows you to select the Master File, a Dedicated File, or an Elementary File using its
Identifier. The Get Response command is chained to retrieve the file descriptor. This function will
set access condition register 1,2 and 3 to zero.
Compatible with ISO7816 or Gemplus command set
ISO 7816
Function call
void F_SEL_ID( S_SEL_ID* );
Data Structure of S_SEL_ID
typedef struct
{
int Type;
unsigned char IdRef[2];
int IdOk;
unsigned char Sw12[2];
unsigned char Response[40];
// 85,10,DESCRIPTOR,84,L,NAME < 36
int RespLen;
} S_SEL_ID;
Input parameter :
Type :0:MF/EF 1:DF(if MF is selected) 2:EF(under current DF)
IdRef[] :file identifier
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
Response[] :File Descriptor,auto retrieve response if select command OK
RespLen :holds the length of response.