ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 21 of 52
4.0. General Card Commands
Note:
All Card APIs involving SECTOR and BLOCK parameters please refer to
further explanation.
4.1. ACR120_Select
Selects a single card and returns the card ID (serial number).
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_Select( UINT16 hReader,
UINT8* pResultTagType,
UINT8* pResultTagLength,
UINT8 pResultSN[10]);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
pResultTagType
Contains the selected TAG type
pResultTagLength
Contains the length of the selected TAG
pResultSN
If the
pResultTagLength
= 4 or 7 or 10, the
pSN
contains the selected card ID (Serial Number). The ID
may be 4 or 7 or 10 bytes long.
Return Value
INT16
Result code. 0 means success.
Table 16
: ACR120_Select Command Description
Low Level Frame Structure:
Command: From PC to Reader (5 Bytes)
Command Code
(1 byte)
Command Data Length
(1 byte)
Instruction Code
(1 byte)
Data Length
(1 byte)
E0h
02h
00h
00h
Response: From Reader to PC (18 Bytes) << Success>>
Response
Code
(1 byte)
Response
Status
(2 bytes)
Response
Data
Length
(2 bytes)
Response Data
(1 byte)
(1 byte)
(1 byte)
(10 bytes)
E1h
INT16 (>=0)
000Dh
01h
pResultTagType pResultTagLength
pResultSN
(Serial Number)