ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 32 of 52
5.2. ACR120_Read
Reads a block.
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_Read( INT16 hReader,
UINT8 Block,
UINT8 pBlockData[16]);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
Block
Block number
pblockData
Contains the data read. It is
AC_MIFARE_DATA_LEN(16) bytes long.
Return Value
INT16
Result code. 0 means success.
Table 21
: ACR120_Read Command Description
Low Level Frame Structure:
Command: From PC to Reader (6 bytes)
Command Code
(1 byte)
Command Data Length
(1 bytes)
Instruction Code
(1 byte)
Data Length
(1 byte)
Data
(1 byte)
E0h
03h
06h
01h
Block
Response: From Reader to PC (21 bytes) <<Success>>
Response Code
(1 byte)
Response Status
(2 bytes)
Response Data Length
(2 bytes)
Response Data
(16 bytes)
E1h
INT16 (>=0)
0010h
pBlockData
Or
Response: From Reader to PC (5 bytes) << Fail>>
Response Code
(1 byte)
Response Status
(2 bytes)
Response Data Length
(2 byes)
E1h
INT16 (<0)
0000h