ACS ACR1281U-C8 Programming Manual

ACS ACR1281U-C8 Programming Manual

Contactless reader/writer
Table of Contents

Advertisement

ACR1281U-C8
Contactless
Reader/Writer
Application Programming Interface V1.00
Subject to change without prior notice
info@acs.com.hk
www.acs.com.hk

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ACR1281U-C8 and is the answer not in the manual?

Questions and answers

Summary of Contents for ACS ACR1281U-C8

  • Page 1 ACR1281U-C8 Contactless Reader/Writer Application Programming Interface V1.00 Subject to change without prior notice info@acs.com.hk www.acs.com.hk...
  • Page 2: Table Of Contents

    Appendix A. Error Codes returned by High Level APIs ..........47 Appendix B. Possible TAG Types ................. 49 Appendix C. USB ID and Drivers for ACR1281U-C8 ............. 50 Appendix D. Standard Program Flow ................51 Appendix E. Physical and Logical Block/Sector Calculation ........52 Page 2 of 52 ACR1281U-C8 –...
  • Page 3 Table 30 : PICC_RATS Command Description ..................43 Table 31 : FSDI to (Frame Size for Proximity Coupling Device) FSD Conversion ....... 43 Table 32 : Possible TAG Types ......................49 Page 3 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 4: Introduction

    1.0. Introduction The ACR1281U-C8 is the new version of ACS’s ACR120U Contactless Smart Card Reader. The ACR1281U-C8 USB Protocol defines the interface between the PC and the reader, as well as the ® communication channel between the PC and the supported contactless cards, including Mifare , ISO 14443 Type A and B compatible cards.
  • Page 5: Usb Interface

    2.0. USB Interface The ACR1281U-C8 is connected to a computer through USB as specified in the USB Specification 2.0. The ACR1281U-C8 is working in full speed mode, i.e.12 Mbps. The USB interface is used for firmware upgrade purpose. Signal Function...
  • Page 6: Reader Commands

    Response: From Reader to PC (5 bytes) << Success or Fail >> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 bytes) INT16 0000h Page 6 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 7: Acr120_Close

    Command: From PC to Reader (0 Bytes) <<No Frame will be sent to Reader>> Response: From Reader to PC (0 Bytes) <<No Frame will be sent to PC>> Page 7 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 8: Acr120_Reset

    Response: From Reader to PC (5 Bytes) << Success or Fail >> Response Code Response Status Response Data Length (1 Byte) (2 bytes) (2 bytes) INT16 0000h Page 8 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 9: Acr120_Status

    // 0xFF = No TAG is being processed. UINT8 FWI; // the current FWI value (time out value) UINT8 RFU; // to be defined UINT16 RFU; // to be defined } ReaderStatus; Page 9 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 10 Remark: 1. For UINT32 CardSupported, the LSB is transmitted first. e.g. Byte 0(LSB), Byte 1, Byte 2 & Byte 3(MSB) Page 10 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 11: Acr120_Readrc531Reg

    Response: From Reader to PC (6 bytes) << Success or Fail >> Response Code Response Status Response Data Length Response Data (1 byte) (2 bytes) (2 bytes) (1 byte) INT16 0001h pValue Page 11 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 12: Acr120_Writerc531Reg

    Response Status Response Data length Response Data (1 byte) (2 bytes) (2 bytes) (1 byte) INT16 0001h ValueStored Note: The Response Data (ValueStored) is used for comparison only. Page 12 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 13: Acr120_Directsend

    Response Data Length Response Data (1 byte) (2 bytes) (2 bytes) (K bytes) INT16 pResponseDataLength (K) pResponseData Note: ACR120_DirectSend() & ACR120_DirectReceive() must be used in a pair. Page 13 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 14: Acr120_Directreceive

    Response Data Length Response Data (1 byte) (2 bytes) (2 bytes) (K bytes) INT16 PReceivedDataLength (K) pReceivedData Note: ACR120_DirectSend() & ACR120_DirectReceive() must be used in a pair. Page 14 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 15: Acr120_Requestdllversion

    Command: From PC to Reader (0 Bytes) <<No Frame will be sent to Reader>> Response: From Reader to PC (0 Bytes) <<No Frame will be sent to PC>> Page 15 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 16: Acr120_Readeeprom

    Response: From Reader to PC (6 bytes) <<Success or Fail>> Response Code Response Status Response Data Length Response Data (1 byte) (2 bytes) (2 bytes) (1 byte) INT16 0001h pEEPROMData Page 16 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 17: Acr120_Writeeeprom

    Note: The Response Data (EEPROMDataStored) is used for comparison only. Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 17 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 18: Acr120_Readuserport

    Bit 0-1: Not Used Bit 2: Buzzer (0 = OFF; 1 = ON) Bit 3-5: Not Used Bit 6: LED (0 = OFF; 1 = ON) Bit 7: Not Used Page 18 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 19: Acr120_Writeuserport

    Bit 0-1: Not Used Bit 2: Buzzer (0 = OFF; 1 = ON) Bit 3-5: Not Used Bit 6: LED (0 = OFF; 1 = ON) Bit 7: Not Used Page 19 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 20: Acr120_Power

    Response Status Response Data Length Response Data (1 byte) (2 bytes) (2 bytes) (1 byte) INT16 0001h StateStored Note: The Response Data (StateStored) is used for comparison only. Page 20 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 21: General Card Commands

    Response Data Data Code Status Length (1 byte) (2 bytes) (1 byte) (1 byte) (1 byte) (10 bytes) (2 bytes) pResultSN INT16 (>=0) 000Dh pResultTagType pResultTagLength (Serial Number) Page 21 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 22 Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 22 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 23: Acr120_Listtags

    INT16 (>=0) N x 0Ch pResultTagFound (N) + Response Data Block 0 Mifare Response Data Block [0] (1 byte) (1 byte) (10 bytes) pTagType[0] pTagLength[0] pResultSN[0] (Serial Number) Page 23 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 24 (Serial Number) Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 24 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 25: Acr120_Multitagselect

    Data Code Status Length (1 byte) (2 bytes) (1 byte) (1 byte) (1 byte) (10 bytes) (2 bytes) pResultSN INT16 (>=0) 000Dh pResultTagType PResultTagLength (K) (Serial Number) Page 25 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 26 Response: From Reader to PC (5 bytes) << Fail>> Respons Response Status Response Data Length e Code (2 bytes) (2 byes) (1 byte) INT16 (<0) 0000h Page 26 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 27: Acr120_Txdatatelegram

    Response: From Reader to PC (K+5 bytes) <<Success >> Response Response Code Response Status Response Data Data Length (1 byte) (2 bytes) (K bytes) (2 bytes) INT16 (>=0) pReceivedData Page 27 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 28 Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 28 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 29: Card Commands For MifareĀ® 1K/4K Cards

    The login key if keyType = pKey AC_MIFARE_LOGIN_KEYTYPE_A or AC_MIFARE_LOGIN_KEYTYPE_B. It’s AC_MIFARE_KEY_LEN(6) bytes long. Return Value INT16 Result code. 0 means success. Table 20: ACR120_Login Command Description Page 29 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 30 0xAA (KeyType2 = 0xAA) AC_MIFARE_LOGIN_KEYTYPE_B 0xBB (KeyType2 = 0xBB) AC_MIFARE_LOGIN_KEYTYPE_DEFAULT_A 0xAD (KeyType2 = 0xAA) AC_MIFARE_LOGIN_KEYTYPE_DEFAULT_B 0xBD (KeyType2 = 0xBB) AC_MIFARE_LOGIN_KEYTYPE_DEFAULT_F 0xFD (KeyType2 = 0xFF) AC_MIFARE_LOGIN_KEYTYPE_STORED_A 0xAF (KeyType2 = 0xAA) Page 30 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 31 AC_MIFARE_LOGIN_KEYTYPE_STORED_B 0xBF (KeyType2 = 0xBB) AC_MIFARE_LOGIN_KEYTYPE_DEFAULT_F 0xFF Page 31 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 32: Acr120_Read

    0010h pBlockData Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 32 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 33: Acr120_Readvalue

    0004h pValueData Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000 Page 33 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 34: Acr120_Write

    Note: The Response Data (BlockDataStored) is used for comparison only. Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 34 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 35: Acr120_Writevalue

    Note: The Response Data (ValueDataStored) is used for comparison only. Response: From Reader to PC (5 bytes) << Fail>> Respons Response Data Response Status e Code length (2 bytes) (1 byte) (2 byes) INT16 (<0) 0000h Page 35 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 36: Acr120_Writemasterkey

    Note: The Response Data (KeyStored) is used for comparison only. Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 36 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 37: Acr120_Inc

    0004h pNewValue Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 37 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 38: Acr120_Dec

    0004h pNewValue Response: From Reader to PC (5 bytes) << Fail>> Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 38 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 39: Acr120_Copy

    Response: From Reader to PC (5 bytes) << Fail>> Respons Response Data Response Status e Code length (2 bytes) (1 byte) (2 byes) INT16 (<0) 0000h Page 39 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 40: Card Commands For Iso14443-4 Interface

    2. In many cases, the status code SW1 and SW2 are the last 2 bytes of the received data. Example: INT16 rHandle; UINT8 SID; BOOT typeA; INT16 xLen, rLen; UINT rData[100]; Page 40 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 41 PICC_InitBlockNumber(0); retcode PICC_Xch_APDU(rHandle, SID, typeA, &xLen, Cmd, &rLen, rData); //check if retcode is error if(retcode < 0){ // Exchange APDU failed } else{ // Exchange APDU successful Page 41 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 42: Exchange Adpu Command

    (K byte) INT16 ADPU Response Response: From Reader to PC (5 bytes) Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 bytes) INT16 (<0) 0000h Page 42 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 43: Picc_Rats

    Result code. 0 means success. Table 30: PICC_RATS Command Description FSDI FSD (in bytes) Otherwise Table 31: FSDI to (Frame Size for Proximity Coupling Device) FSD Conversion Page 43 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 44 For the detailed meaning of the error code, please refer to Appendix A.. For detailed meaning of the ATS, please refer to corresponding documents. Note: There is no need for calling this function in Type B cards. Page 44 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 45: Auto-Rats

    0x01h – Enable RATS During Power On Command Response: From Reader to PC (5 bytes) Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0) 0000h Page 45 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 46: Firmware Upgrade Mode

    (1 byte) (1 byte) Response: From Reader to PC (5 bytes) Response Code Response Status Response Data Length (1 byte) (2 bytes) (2 byes) INT16 (<0)h 0000h Page 46 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 47: Appendix A. Error Codes Returned By High Level Apis

    Operation failed. #Corresponding to the << Response Status ‘F’ >>. ERR_READER_UNKNOWN(-3040, or 0xF420) Reader unknown error. #Corresponding to the << Response Status ‘C’, ‘O’, ‘X’ & ‘?’ >>. Page 47 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 48 ERR_READER_VALUE_INVALID_BLOCK(-4033, 0xF03F) Block doesn’t contain value. #Corresponding to the << Response Status ‘F’ >>. ERR_READER_VALUE_ACCESS_FAILURE (-4034, 0xF03E) Value Access failure. #Corresponding to the << Response Status ‘U’ >>. Page 48 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 49: Appendix B. Possible Tag Types

    0x03h Mifare 4K 0x04h Mifare DESFire 0x05h Mifare Ultralight 0x06h JCOP30 0x07h Shanghai Transport 0x08h MPCOS Combi 0x80h ISO Type B, Calypso Table 32: Possible TAG Types Page 49 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 50: Appendix C. Usb Id And Drivers For Acr1281U-C8

    Appendix C. USB ID and Drivers for ACR1281U-C8 • VID_0x072F & PID_0x8003 as the USB ID of ACR1281U-C8 • ACR120US.SYS will be used as the driver name for ACR1281U-C8 • ACR120UT.SYS will be used as the driver name for ACR1281U-C8 Page 50 of 52 ACR1281U-C8 –...
  • Page 51: Appendix D. Standard Program Flow

    // Assume the Sector is authorized, then “Read data from Block 0x02 of Sector 0x00” ACR120_Read(hReader, 0x02, Data); Some operations. ACR120_Close(hReader); // Close the port and quit the program return; Page 51 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...
  • Page 52: Appendix E. Physical And Logical Block/Sector Calculation

    Physical Sector = Logical Sector + ((Logical Sector - 32) * 3) Logical block of each sector is from 0 to 15 Physical blocks = ((Logical Sector - 32) * 16) + 128 + Logical block Page 52 of 52 ACR1281U-C8 – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.00...

Table of Contents

Save PDF