ACR1252U has two reader interfaces, namely the PICC and SAM interface. Both interfaces follow the PC/SC specifications. This API document will discuss in detail how the PC/SC APDU commands were implemented for the contactless interface and device peripherals of ACR1252U. Page 4 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
ISO 7816 Class A (for SAM slot) NFC Forum FeliCa Performance Certification PC/SC CCID RoHS 2 REACH J-LIS (Japan) VCCI (Japan) MIC (Japan) KC (Korea) Microsoft® WHQL Page 5 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Protocol Parameters Optional information field for Initiator Control information for transaction maximum value for the Frame Length LLCP Logical Link Control Protocol Table 1: Acronyms and Abbreviations Page 6 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Contactless Interface) are using this API for sending. 5.1.6. ScardDisconnect The SCardDisconnect function terminates a connection previously opened between the calling application and a smart card in the target reader. Refer to: http://msdn.microsoft.com/en-us/library/windows/desktop/aa379475%28v=vs.85%29.aspx Page 8 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Standard (SS) (ISO 14443A, Part 3) Card Name (C0 .. C1) = {00 01h} (MIFARE Classic 1K) Standard (SS) = 03h: ISO 14443A, Part 3 = 11h: FeliCa Page 11 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 12
3 + N Application Protocol Info Higher Data from Byte from nibble=MBLI ATQB ATQB from ATTRIB command Lower nibble (RFU)=0 Exclusive-oring of all the bytes T0 to Tk Page 12 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 13
1C 2D 94 11 F7 71 85 00 BEh} Application Data of ATQB = 1C 2D 94 11h Protocol Information of ATQB = F7 71 85h MBLI of ATTRIB = Page 13 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
UINT8 GET_UID[5] = {FF, CA, 00, 00, 00}; To get the ATS of the “connected ISO 14443 A PICC”: UINT8 GET_ATS[5] = {FF, CA, 01, 00, 00}; Page 14 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
XX 63 01h Execution stopped due to failure in other data object XX 6A 81h Data object XX not supported XX 67 00h Data object XX with unexpected length Page 15 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 16
If there are more than one data object in the C-APDU field and one data object failed, IFD can process the following data objects if they do not depend on the failed data objects. Page 16 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
This command is used to start a transparent session. Once the session has started, auto-polling will be disabled until the session is ended. Start Session Data Object Length (1 byte) Value Page 17 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 18
On Data Object, the reader will turn off the RF field for about 5000µs before it is turned on. Timer Data Object Length (1 byte) Value 5F 46h Timer (4 bytes) Page 18 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 19
Frame size for IFD integer (FSDI) Frame size for ICC integer (FSCI) Frame waiting time integer (FWTI) Max. Communication Speed supported by the IFD Communication Speed of the ICC Modulation Index Page 19 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 20
Parameters Requested Length PCB for ISO/IEC14443 CID for ISO/IEC14443 NAD for ISO/IEC14443 Param 1 – 4 for for ISO/IEC14443 type B Page 20 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
1 – do not append CRC in the transmit data 0 – discard CRC from the received data 1 – do not discard CRC from the received data (i.e. no CRC checking) Page 21 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 22
Number of valid bits of the last byte (0 means all bits are valid) If this data object does not exist, it means all bits are valid. Page 22 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 23
0 – no collision will tell the collision 1 – collision detected position. Otherwise, “00h” will be shown. 0 – no parity error 1 – parity error detected Page 23 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 24
Response Data Object Inside the response, this command is used to notify the received data status. Response Data Object Length (1 byte) Value DataLen ReplyData (N Byte) Page 24 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
01h – ISO/IEC14443 Type B 03h – Switch or activate to layer 3 03h – FeliCa 04h – Activate to layer 4 Other – RFU Other - RFU Page 25 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Two volatile keys are provided. The volatile key can be used as a session key for different sessions. Load Authentication Keys Response Format (2 bytes) Response Data Out Result Page 30 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
APDU = {FF 86 00 00 05 01 00 60 00h} Note: MIFARE Ultralight does not need to do any authentication. The memory is free to access. Page 32 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Value Block Operation Response Format (2 bytes) Response Data Out Result Value Block Operation Response Codes Results Meaning Success The operation is completed successfully. Error The operation is failed. Page 35 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Example 2: Decimal 1 = {00h, 00h, 00h, 01h} Value Read Value Block Response Codes Results Meaning Success The operation is completed successfully. Error The operation is failed. Page 36 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
// Copy the value from value block to value block APDU = {FF D7 06h} // Increment the value block by “5” APDU = {FF D7 00 00 00 05h} Page 37 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
>> 1A F7 F3 1B CD 2B A9 58h [90 00h] Note: For ISO 14443-4 Type A tags, the ATS can be obtained by using the APDU “FF CA 01 00 00h.” Page 38 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 39
INS = B2h P1 = 80h P2 = 00h Lc = None Data In = None Le = 08h Answer: 00 01 02 03 04 05 06 07h [$9000h] Page 39 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
LED Status Description Description Bit 0 RED LED 1 = ON; 0 = OFF Bit 1 GREEN LED 1 = ON; 0 = OFF Bit 2 - 7 Page 42 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
LED Status Description Description Bit 0 RED LED 1 = ON; 0 = OFF Bit 1 GREEN LED 1 = ON; 0 = OFF Bit 2 - 7 Page 43 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Buzzer On Duration 1 byte. 00h = Turn OFF 01 to FFh = Duration (unit: 10 ms) Buzzer Control Response Format (6 bytes) Response Class Data Out Result Page 44 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
This command checks the existing buzzer status. Buzzer Status Format (5 bytes) Command Class Buzzer Status Buzzer Status Response Format (6 bytes) Response Class Data Out Result Page 45 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Note: Default value of Behavior = 7Fh Set LED and Buzzer Status Indicator Behaviors for PICC Interface Response Format (6 bytes) Response Class Data Out Result Default Behaviors Page 46 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
1 = Enable; 0 = Disable RED LED for status change Bit 7 Color Select (RED) 1 = Enable; 0 = Disable Note: Default value of Behavior = 7Fh Page 47 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
<1 – 1> = 2500 ms Bit 6 Bit 7 Enforce ISO 14443-A Part 4 1= Enable; 0= Disable. Note: Default value of Polling Setting = 8Bh. Page 48 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 49
4. The JCOP30 card comes with two modes: ISO 14443A-3 (MIFARE Classic 1K) and ISO 14443A-4 modes. The application has to decide which mode should be selected once the PICC is activated. Page 49 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
<1 – 1> = 2500 ms Bit 6 Bit 7 Enforce ISO 14443-A Part 4 1= Enable; 0= Disable. Note: Default value of Polling Setting = 8Bh. Page 50 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
PICC. The PICC will become inaccessible is the PICC or environment does not meet the requirement of the proposed communication speed. 2. The reader supports different speed between sending and receiving. Page 53 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
(N bytes) / (2 bytes) Return Code Results SW1 SW2 Meaning Lock 90 00h The serial number is already locked. Error 63 00h The serial number is too long. Page 55 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
(N bytes) / (2 bytes) Return Code Results SW1 SW2 Meaning Lock 90 00h The serial number is already locked. Error 63 00h The serial number is too long. Page 56 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Read the Serial Number Format (5 bytes) Command Class Read the Serial Number Read the Serial Number Response Format Response Class Data Out Serial Number Result (N bytes) Page 57 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Note: For the “unlock serial command”, please contact us at info@acs.com.hk or contact an Advanced Card Systems Ltd. Sales Representative for the details.
Note: Unit = 10 ms, default value of Initiator Mode Timeout = 00 64h (100 * 10 ms = 1000 ms). Set Initiator Mode Timeout Response Format (7 bytes) Response Class Data Out Timeout Timeout Result (MSB) (LSB) Page 59 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 60
This command sends an ATR_REQ to peer-to-peer Target Mode device within the field. ATR Request Command Format Command Class Data In Mode Speed NFCID Request (1 byte) (1 byte) (10 bytes) (1 byte) Page 60 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 61
Dep Response (Len bytes) Where: 1 byte. Control the data transmission and error recovery. DepLen 1 byte. DEP message length. N bytes. DEP message for peer-to-peer communication. Page 61 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 62
Data Out Result Return Code (2 bytes) Return Code Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully. Error 63 00h The operation is failed. Page 62 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
This section provides the commands that can be used when in Target Mode. The figure below shows the peer-to-peer flow of commands for Target Mode. Figure 5: Peer-to-Peer Flow for Target Mode Page 63 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 64
Enter Target Mode Response Format Response Class Data Out Result Speed OpMode Where: Speed 1 byte. Communication Speed. 01h = 106 Kbps 02h = 212 Kbps 03h = 424 Kbps Page 64 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 65
DEP Response Command Format Command Class Data In Message Response (1 byte) (N bytes) Where: 1 byte. Control the data transmission and error recovery. DEP Message N bytes. DEP response. Page 65 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 66
63 00h The operation is failed. 5.9.2.6. Send RLS Response This command sends RLS response for the Initiator’s RLS request. RLS Response Command Format Command Class RLS Response Page 66 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 67
63 00h The operation is failed. 5.9.2.8. Send WUP Response This command sends WUP response for the Initiator’s WUP request. WUP Response Command Format Command Class Response Page 67 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 68
Data Out Result SNEP Message Len SNEP Message Where: SNEP Message Len 1 byte. Length of the received SNEP Message. SNEP Message Received SNEP message from Initiator devices. Page 68 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Set Card Emulation 7 bytes UID Set Card Emulation MIFARE Ultralight UID Response Format (7 bytes) Response Class Data Out Result Where: 7 bytes. 7 bytes MIFARE UID. Page 72 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Data cannot be modified via NFC. 1: Lock enable The data can still be modified by 0: Lock disable MIFARE Ultralight using the USB escape command. Lock Enable 1: Lock enable Page 73 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
01h = The buzzer will turn on during the T1 Duration. 02h = The buzzer will turn on during the T2 Duration. 03h = The buzzer will turn on during the T1 and T2 Duration. Page 74 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Page 75
6. To make the buzzer operate, the “number of repetition” must greater than zero. 7. To control the LED only, just set the parameter “Link to Buzzer” to zero. Page 75 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
ISO14443 Type B 0 = Skip ISO14443 Type A Note: To detect the 1 = Detect MIFARE Tags, the Auto 0 = Skip ATS Generation must be disabled first. Page 77 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
ISO14443 Type B 0 = Skip ISO14443 Type A Note: To detect the 1 = Detect MIFARE tags, the Auto 0 = Skip ATS Generation must be disabled first. Page 78 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
The length of the URI payload (11 bytes) 55 (“U”) Record type: “U” Abbreviation: “http://www.” 61 63 73 2E 63 6F The URL itself. “acs.com.hk” 6D 2E 68 6B Page 79 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk...
Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries. MIFARE, MIFARE Classic, MIFARE DESFire and MIFARE Ultralight are registered trademarks of NXP B.V. Page 80 of 80 ACR1252U – Application Programming Interface info@acs.com.hk www.acs.com.hk Version 1.09...
Need help?
Do you have a question about the TS760A and is the answer not in the manual?
Questions and answers