Section 4 contains the ACR89 DLL (dynamic link library) API, which is completely independent of the PC/SC sub-system of Windows. The library does not use any PC/SC to communicate between ACR89 built-in peripherals and the application program as well. Page 4 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
The ACR89U-A1 is connected to a computer through USB following the USB standards. 2.3. Communication Parameters The ACR89U-A1 is connected to a computer through USB as specified in the USB Specification 2.0., working in full speed mode, i.e. 12 Mbps.
Bulk IN – For commands to be sent from ACR89U-A1 to host (data packet size is 64 bytes) Interrupt IN – For card status message to be sent from ACR89U-A1 to host (data packet size is 8 bytes) 2.5. Contact Smart Card Interface...
CCID covers all the protocols required for operating smart cards and PIN. However, it does not define the protocol for operating other peripheral features that ACR89U-A1 also has. Communication protocol for ACR89U-A1 reader shall follow the CCID specifications and extend it to support the rest of the reader’s features.
This section lists the CCID Bulk-OUT Messages to be supported by ACR89. The extended commands will be introduced in Section 3.5. Page 8 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Identifies the slot number for this command bSeq Sequence number for command abRFU Reserved for future use The response to this message is the RDR_to_PC_SlotStatus message. Page 9 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 10
Size of extra bytes of this message bSlot Identifies the slot number for this command Sequence number for command bSeq abRFU Reserved for future use The response to this message is the RDR_to_PC_Parameters message. Page 10 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 11
Extra Guardtime between two characters. bGuardTimeT0 Add 0 to 254 etu to the normal guardtime of 12etu. FFh is the same as 00h. bWaitingIntegerT0 WI for T=0 used to define WWT Page 11 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 12
This command allows ACR89 to use the extended features as defined in Section 3.5. Offset Field Size Value Description bMessageType DwLength Size of abData field of this message Page 12 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 13
The CCID will timeout the block after “this number multiplied by the Block BBWI Waiting Time” has expired. This parameter is only used for character level exchanges. wLevelParameter 0000h RFU (short APDU level) Page 13 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
The Bulk-IN messages are used in response to the Bulk-OUT messages. ACR89 shall follow the CCID Bulk-IN Messages as specified in standard CCID Rev 1.1 session 6.2. This section lists the CCID Bulk-IN Messages to be supported by ACR89. Page 14 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Same value as in Bulk-OUT message Slot status and error register as defined in bStatus Section 3.7. Slot status and error register as defined in bError Section 3.7. Page 15 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 16
80h = Structure for 2-wire protocol 81h = Structure for 3-wire protocol 82h = Structure for I2C protocol Protocol Data Structure as Byte abProtocolDataStructure summarized in standard CCID Rev array 1.1 session 6.2.3. Page 16 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
This command accepts key(s) input from the user using keypad. This command context is slot independent. Offset Field Name Type Size Value Description BCmdCode Size of command data (in big wCmdLength 0002h endian) AbRfu 0000h Page 18 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 19
Reserved for future AbRfu bRowPosition 00h to 07h New cursor row position New cursor column bColumnPosition 00h to 7Fh position The response to this command is the ACR89_to_PC_DisplayStatus message. Page 19 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 20
Size of command data (in big endian) wCmdLength abRfu 0000h Start position row index. One row is bRowPosition with height of 8 pixels. bColumnPosition Start position column index Page 20 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Size of command data (in big wCmdLength 0001h endian) 0000 Reserved for future abRfu bContrastLevel 00h to 0x63h New LCD contrast level The response to this command is the ACR89_to_PC_DisplayStatus message. Page 21 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 22
This command sets the real time clock value of the build-in real time clock to a specified value. This command context is slot independent. Offset Field Name Type Size Value Description BCmdCode wCmdLength 0006h Size of command data (in big endian) 0000h AbRFU Page 22 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 23
00 – Slave EEPROM BDeviceNumber 01- Chinese Font EEPROM (Rfu) AbAddress Address of EEPROM (in big endian) Length of Data ( Write/Read ) (in big wDataLength Var… endian) Page 23 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 24
Any number not zero, e.g. 01h bStartBlockNum bEndBlockNum Not less than bStartBlockNum The response to this command is the ACR89_to_PC_ExMemStatus message. Note: The current size of one flash block is 64k bytes. Page 24 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
The response to this command is the ACR89_to_PC_AuthInfo message. 3.5.3. Extended Command Pipe Bulk-IN Message This section defines response messages to the extended commands returned by ACR89 for operating Page 25 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Command response code (in big wReturnCode endian) 0002h Size of response data (in big endian) wRespLength bRowPosition 00h to 07h Current cursor row position bColumnPosition 00h to 83h Current cursor column position Page 26 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 27
This message is sent by ACR89 in response to PC_to_ACR89_GetSPIFlashPage commands. Offset Field Name Size Value Description bRespType Command return state (please refer to later bReturnState section) Error code (please refer to later section) bErrorCode AbRFU 0000h Page 27 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
The table summarizes the response code and the return states for the CCID extended commands used by ACR89. Response Code Value Description CMD_OKAY 9000h Command executes successfully Wrong parameters in the extended INVALID_PARAMETERS FFFFh command. Page 28 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
3.6.1. Message Summary 3.6.1.1. RDR_to_PC_NotifySlotChange This message is sent whenever ACR89 detects a change in the insertion status of an ICC slot. Offset Field Size Value Description bMessageType Page 29 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Parity error while talking to the ICC XFR_OVERRUN Overrun error while talking to the ICC HW_ERROR An all-inclusive hardware error occurred BAD_ATR_TS BAD_ATR_TCK ICC_PROTOCOL_NOT_SUPPORTED ICC_CLASS_NOT_SUPPORTED PROCEDURE_BYTE_CONFLICT DEACTIVATED_PROTOCOL BUSY_WITH_AUTO_SEQUENCE Automatic Sequence Ongoing Page 30 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Tried running a command that the current INVALID_MODE operation mode does not allow. Reserved for future use (All the rest unmentioned values) Table 2: CCID Error and Status Code Page 31 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Used by AS_SetLED to set the color of one of the three LED’s on the ACR89. Data Member Value Description LED_UNCHANGED 0x00h Do not change the color of the LED. Page 32 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Erase one block of Serial flash 4.1.2. Reader Command Data Structures 4.1.2.1. KEYPADCONFIG typedef struct _KEYPAD_CONFIG { BYTE cbMaxKeyString; BYTE KeyDisplayRow; } KEYPADCONFIG, *PKEYPADCONFIG; AS_ConfigureKeyPad Used by Data Member Value Description Page 33 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 34
1 – encrypted key transfer (RFU) Enable of disable Control Keys (F1~F4 & directional keys) BEnableControlKeys 0 or 1 0 – disable control keys 1 – enable control keys bReserved2 Page 34 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 35
128 pixels wide by 64 pixels high szBitmapFile and the color depth can be 1-bit, 8-bit or 24-bit. Note: the LCD screen of the ACR89 only displays monochrome graphics. Page 35 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 36
LCD_CLR_COLS = Clear columns LCD_CLR_ROWS = Number of rows to be cleared * cbNumber LCD_CLR_ROWS LCD_CLR_COLS = Number of columns to be cleared * *Ignored in LCD_CLR_FULL mode. Page 36 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 37
0 = Buzzer off cbBuzzerState 0 or 1 1 = Buzzer on Duration of buzzer on counted in 100ms (e.g. cbBuzzerOnDuration 0 - 255 100 stands for 10 seconds). Page 37 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Maximum number of keys allowed for a key string in key cbMaxKeyString 0 – 255 string input mode (see AS_InputKey command). Starting row number on the LCD for displaying the keys cbKeyDisplayMode 0 – 7 input. Page 38 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 40
Serial Flash data. Pointer to buffer of pData Write Serial Flash: pointer to buffer wDataLength containing data to write to Serial Flash Erase Serial flash: Ignore Page 40 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
AS_STATUS This functions returns different values depending on whether it succeeds or fails. AS_STATUS.DllError contains status returned DLL. AS_STATUS.W32Error contains the Win32 error code associated with the DLL Page 41 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 42
//open a connection to the ACR89 status = AS_Open(ACR89, AS_USB1, &nDid); if(status.DllError == CMD_SUCCESS) { //connection success, do something //done, close connection status = AS_Close(nDid); else { //error occurred return status; Page 42 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
//connection success, get the reader information. status = AS_GetInfo(nDid,&Info); if (status.DLLError == CMD_SUCCESS) { //do something with the retrieved information //close the connection status = AS_Close(nDid); else { return status; Page 43 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 44
This function allows user to write or read data to/from the serial flash. Maximum allowed data length is 256 bytes. AS_STATUS AS_DECL AS_AccessSerialFlash ( IN INT nDevId, IN PACCESSSERIALFLASH pSerialFlash); Page 44 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
[in] Handle returned by a previous call to AS_Open. pLcdCursor [in] Pointer to a LCDCURSOR structure that includes the cursor position to be set. See also Section 4.1.2.3 for more information about the LCDCURSOR structure. Page 45 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 46
This functions returns different values depending on whether it succeeds or fails. AS_STATUS.DllError contains status returned DLL. AS_STATUS.W32Error contains the Win32 error code associated with the DLL error, if any. See also Appendix A for the possible return codes. Page 46 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
This functions returns different values depending on whether it succeeds or fails. contains status returned DLL. AS_STATUS.DllError AS_STATUS.W32Error contains the Win32 error code associated with the DLL error, if any. See also Appendix A for the possible return codes. Page 47 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 48
//display the above text //assumed is that a connection has already been established lcdMsg.cbCharCoding = 0x00; lcdMsg.pMessage = szText; lcdMsg.wMessageLen = strlen(szText); status = AS_SetLcdDisplayMessage(nDid, &lcdMsg, &lcdStatus); Page 48 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 49
Section 4.1.2.8 for more information about the LCDCLEAR structure. pDisplayStatus [out] Pointer to a DISPLAYSTATUS structure containing the cursor position after displaying the graphics. See also Section 4.1.3.4 for more information about the Page 49 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
This functions returns different values depending on whether it succeeds or fails. AS_STATUS.DllError contains status returned DLL. AS_STATUS.W32Error contains the Win32 error code associated with the DLL error, if any. See also Appendix A for the possible return codes. Page 50 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 51
This functions returns different values depending on whether it succeeds or fails. AS_STATUS.DllError contains status returned DLL. AS_STATUS.W32Error contains the Win32 error code associated with the DLL error, if any. See also Appendix A for the possible return codes. Page 51 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
The direction keys will never be returned, but are only used for navigation of the cursor on the ACR89 LCD screen. AS_STATUS AS_DECL AS_GetKeyInput ( IN INT nDevId, IN PKEYPADINPUT pKeypadInput, PDATABLOCK pDataBlock); Page 52 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
[out] Pointer to TIMESTAMP structure that contains current time returned by the built-in real time clock of the ACR89. See also Section 4.1.4.1 for more information about the TIMESTAMP structure. Page 53 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 54
This functions returns different values depending on whether it succeeds or fails. AS_STATUS.DllError contains status returned DLL. AS_STATUS.W32Error contains the Win32 error code associated with the DLL error, if any. See also Appendix A for the possible return codes. Page 54 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
//turn the buzzer of the ACR89 on for 1 second //assumed is that a connection has already been established buzStat.cbBuzzerState = 1; buzStat.cbBuzzerOnDuration = 10; // 1 second status = AS_SetBuzzer(nDevId, &buzStat); return status; Page 55 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Page 56
// Set the Power LED to red ledStat.cbLedSlot1 = LED_GREEN; // Set the Slot1 LED to green ledStat.cbLedSlot2 = LED_YELLOW; // Set the Slot1 LED to yellow status = AS_SetLED(nDevId, &ledStat); return status; Page 56 of 57 ACR89U-A1 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.04...
Need help?
Do you have a question about the ACR89U-A1 and is the answer not in the manual?
Questions and answers