Advanced Card ACR20 Скачать руководство пользователя страница 6

 

Smart Card Reader Driver Program Reference Manual 

 

rev 1.1 Sept, 2003 

 Advanced Card Systems Ltd.

 

Page 6 of 34

2.3.1.1 AC_APDU 

typedef struct 

 BYTE 

 CLA; 

 BYTE 

 INS; 

 BYTE 

 P1; 

 BYTE 

 P2; 

 INT16 

 Lc; 

 INT16 

 Le; 

 BYTE 

 DataIn[256]; 

 BYTE 

 DataOut[256]; 

 WORD16 Status; 

} AC_APDU;

 

 

 

The AC_APDU data structure is used in the AC_ExchangeAPDU function for the passing of 

commands and data information into the smart card. For memory card operation, please refer 

to section 

0

 for the definition of fields’ value. For MCU card (T=0,T=1) operation, these value 

are specific to the smart card operating system. You must have the card reference manual 

before you can perform any valid operations on the card. Please notice that Lc representing 

the data length going into the card and Le representing the data length expecting from the 

card. 

 

Name 

Input/Output 

Description 

CLA I 

Instruction 

Class 

INS I 

Instruction 

Code 

P1 I 

Parameter 

P2 I 

Parameter 

Lc 

Length of command data (DataIn) 

Le 

I/O 

Length of response data (DataOut) 

DataIn 

Command data buffer 

DataOut 

Response data buffer 

Status 

Execution status of the command 

 

2.3.1.2 AC_SESSION 

typedef struct 

BYTE  CardType; 

// Card type selected 

 BYTE SCModule; 

// Selected security module.  

//Use only when card type = AC_SCModule 

BYTE  ATRLen; 

// Length of the ATR 

BYTE  ATR[128]; 

// ATR string 

BYTE  HistLen; 

// Length of the Historical data 

BYTE  HistOffset; // Offset of the Historical data  

// from the beginning of ATR 

INT16 APDULenMax; // Max. APDU supported 

} AC_SESSION;

 

 

The AC_SESSION data structure is used in the AC_StartSession function call for the retrieval 

of ATR information from the smart card. Before calling AC_StartSession, the program needs 

Содержание ACR20

Страница 1: ...ms Ltd Page 1 of 34 ACSR20 Application Programming Interface Advanced Card Systems Ltd Room 302 3 F Shun Fat Industrial building 17 Wang Hoi Road Kowloon Bay Kowloon Hong Kong Tel 852 2796 7873 Fax 85...

Страница 2: ...10 2 3 2 4 AC_EndSession 11 2 3 2 5 AC_ExchangeAPDU 12 2 3 2 6 AC_GetInfo 13 2 3 2 7 AC_SetOptions 14 2 3 3 ACI Commands 16 2 3 3 1 ACI_Read 16 2 3 3 2 ACI_Write 16 2 3 3 3 ACI_WriteCarry 17 2 3 3 4...

Страница 3: ...icor Card X76F041 28 2 4 2 The Xicor Card X24645 and the IIC card 29 2 4 3 The AM221 SLE4436 GAM226 type 30 2 4 4 Secret code verification 30 2 4 5 The Xicor Card X76F128 X76F640 31 2 4 6 The Xicor Ca...

Страница 4: ...erent model of readers are summarized as follow Model Numbers Connecting interface ACR20S ACR20S S ACR30S ACR30S S Serial RS 232 ACR20U ACR20U S ACR30U ACR20S S USB interface Even though the hardware...

Страница 5: ...eed of 115200bps can be achieved by using software command issuing from the host If you are not sure about the factory setting of your readers you can always use the ACR_AUTODETECT option in your AC_O...

Страница 6: ...going into the card and Le representing the data length expecting from the card Name Input Output Description CLA I Instruction Class INS I Instruction Code P1 I Parameter 1 P2 I Parameter 2 Lc I Len...

Страница 7: ...ested in a response INT16 CType The card types supported by the reader BYTE CStat The status of the card reader BYTE CSel The current selection of card type BYTE szRev 10 The 10 bytes firmware type an...

Страница 8: ...nding value Parameters Definition Values ReaderType 3 Reader type and communication speed ACR10 Target reader is ACR10 9600bps ACR20 Target reader is ACR20 57600bps ACR20_57600 Target reader is ACR20...

Страница 9: ...in the Windows 98 and Windows 2000 platform The option of AC_PCSC is available only in the platform with the Microsoft PCSC base components installed The driver will select the first available PCSC re...

Страница 10: ...function Parameters Definition Values hReader A valid reader handle returned by AC_Open Session CardType The selected card type for this session please refer to Appendix C for card type selection Sess...

Страница 11: ...1 card and synchronous memory card it cannot distinguish different types of memory card 2 When AM221 card type is selected i e Session CardType AC_AM221 the library will check the backup bits and try...

Страница 12: ...INS Instruction Code Please refer Section 2 3 3 ACI Commands for detail description Apdu P1 Parameter 1 Please refer Section 2 3 3 ACI Commands for detail description Apdu P2 Parameter 2 Please refer...

Страница 13: ...etrieve information related to the currently selected reader Format INT16 AC_DECL AC_GetInfo INT16 hReader AC_INFO FAR Info Input Parameters The table below lists the parameters for this function Para...

Страница 14: ...on set various options for the reader Format INT16 AC_DECL AC_SetOptions INT16 hReader WORD16 Type WORD16 Value Input Parameters The table below lists the parameters for this function Parameters Defin...

Страница 15: ..._RESPONSE command this is the default option of the reader ACO_DISABLE_ GET_RESPONSE 0 Eject card from the card reader if applicable ACO_EJECT_CARD 0 Check the reader is supporting the eject card opti...

Страница 16: ...d command is available for all types of memory card The parameter structure is defined as follows Field Value Description CLA 0x00 Instruction class INS ACI_Read Instruction code for the read command...

Страница 17: ...le for some memory cards with protected memory logic The parameter structure is defined as follows Name Value Description CLA 0x00 Instruction class INS ACI_WritePr Instruction code for the write prot...

Страница 18: ...PIN command can be executed If the read password is verified only the read password can be changed If the write password is verified only the write password can be changed However when the configurati...

Страница 19: ...Security code 0x01 4 Zone 1 erase key AC_AT102 0x00 2 Security code 0x01 6 Zone 1 erase key 0x02 4 Zone 2 erase key AC_AT1604 0x00 2 Security code 0x01 2 Zone 1 erase key 0x02 2 Zone 2 erase key 0x03...

Страница 20: ...each bit of the authentication certificate Case ST1333 ST1335 0x00 always Lc variable Case SLE4436 Lc 0x06 Case ST1333 ST1335 Lc 0x04 DataIn variable Challenge data to be presented to the card Le var...

Страница 21: ...put data Le 0x00 No output data expected from this command 2 3 3 11 ACI_ReadProtect The ACI_ReadProtect command is available for the XIIC card the AM256 card the AM2KS the AM4KP card and the X76F041 c...

Страница 22: ...C presentation 2 4 SC Three bytes security code Visible only after successful security code verification For AM8KS card this command response with three bytes messages containing security memory of th...

Страница 23: ...041 it can be used to set the configuration register value as described in the ACI_ChangePIN paragraph The parameter structure is defined as follow Field Value Description CLA 0x00 Instruction class I...

Страница 24: ...command DataIn No input data Le 0x00 No output data expected from this command 2 3 3 14 ACI_LockProtect The ACI_LockProtect command is available for the AM256 card and the AM4KP card only It can be u...

Страница 25: ...Description CLA 0x00 Instruction class INS ACI_WriteAll Instruction code P1 0x00 must be zero P2 0x00 must be zero Lc variable Case when AM256 AM4KP Lc 2 X76FXXX Lc 8 DataIn variable Case when AM256...

Страница 26: ...LSB of the starting address of the fuse Lc 0x00 No input data for this command DataIn No input data Le 0x00 No output data expected from this command 2 3 3 18 ACI_EraseAll The ACI_EraseAll command is...

Страница 27: ...only It can be used to erase the retry counter and reactivate the card This command is valid only after the Reset Password is verified OK The parameter structure is defined as follow Field Value Descr...

Страница 28: ...djacent blocks have different protection attributes e g one block is password protected and the other one is not The X76F041 has totally three passwords namely the configuration password the read pass...

Страница 29: ...at the address starting from 0xC000 and ending at 0xDFFF Programmer must bare in mind this special address range for the X24645 smart card If you have selected the AC_X24645 card type during the AC_S...

Страница 30: ...Counter stage 3 byte A Bit address 107 4 th bit from the right Counter stage 4 byte B 2 4 4 Secret code verification For the secret code verification of memory card it is done by the ACI_Verify comman...

Страница 31: ...assword once it is verified OK the command ACI_WriteAll can be used to write the complete card content with zero and the command ACI_CardReset can be used to reset the retry counter and reactive the c...

Страница 32: ...patible command 1010 Error in address 1011 Data length error 1012 Error in response length 1013 Secret code locked 1014 Invalid SC module number 1015 Incorrect password 1050 Error in CLA 1051 Error in...

Страница 33: ...ACI_WriteAll ACI_EraseAll ACI_Reactivate ACI_CardOptions ACI_BlowFuse AC_AM 104 X X X X AC_AM 221 X X X X X AC_SLE4404 X X X X X AC_GPM 896 X X X X X AC_AT101 X X X X X X AC_AT102 X X X X X X AC_AT8KP...

Страница 34: ...AC_IIC AM1KF AM2KF AM4KF AT24C01 AT24C02 AT24C04 AT24C08 AT24C16 GFM1K GFM2K GFM4K GFM8K ST14C02C ST14C04C X24026 X24165 X24645 AC_XIIC AM64KP AC_AT1604 AT88SC1604 AC_AM256 AM256 AC_AM4KP AM4KP AC_X7...

Отзывы: