ChinaReader CR500 User manual

RFID READER
13.56MHz Reader/Writer
CR500
User Manual
Version 2.1
Dec 2006

CONTENT
1. GENERAL INFORMATION ...................................................................................... 5
2. TYPES AND EXPLANATION.................................................................................... 6
3. CONNECTION TO PC................................................................................................ 6
3.1 CR500-RS232.......................................................................................................................... 6
3.2 CR500-USB............................................................................................................................. 7
4. SDK SOFTWARE ........................................................................................................ 8
5. DEMO............................................................................................................................ 8
5.1 Online ..................................................................................................................................... 8
5.2 SHC1102................................................................................................................................. 9
5.3 UltraLight............................................................................................................................... 9
5.4 Mifare_Std S50 .................................................................................................................... 10
5.5 Mifare_Std S70 .................................................................................................................... 10
5.6 Mifare_ProX .........................................................................................................................11
5.7 TRH1064 ...............................................................................................................................11
5.9 SRIX4K ................................................................................................................................12
5.10 AT88RF020 .......................................................................................................................... 13
5.11 ISO14443B-4 Protocol Smart Card ................................................................................... 13
5.12 Test_TypeB .......................................................................................................................... 14
5.13 I.CODE SLI ......................................................................................................................... 14
5.14 Tag_IT .................................................................................................................................. 15
5.15 SRF55V02P .......................................................................................................................... 15
5.16 SRF55V10P .......................................................................................................................... 16
6. DLL INFORMATION................................................................................................ 17
6.1 SYSTEM FUNCTION ........................................................................................................ 17
6.1.1 INTWINAPI LIB_VER..................................................................................................... 17
6.1.2 INTWINAPI RF_INIT_COM........................................................................................... 17
6.1.3 INTWINAPI RF_CLOSEPORT........................................................................................ 17
6.1.4 INTWINAPI RF_GET_MODEL ...................................................................................... 17
6.1.5 INTWINAPI RF_INIT_DEVICE_NUMBER................................................................... 17
6.1.6 INTWINAPI RF_GET_DEVICE_NUMBER................................................................... 18
6.1.7 INTWINAPI RF_INIT_TYPE .......................................................................................... 18
6.1.8 INTWINAPI RF_ANTENNA_STA.................................................................................. 18
6.1.9 INTWINAPI RF_LIGHT .................................................................................................. 18
6.1.10 INTWINAPI RF_BEEP .................................................................................................... 18
6.2 DES FUNCTION................................................................................................................. 19
6.2.1 INTWINAPI DES_ENCRYPT.......................................................................................... 19
2

6.2.2 INTWINAPI DES_DECRYPT.......................................................................................... 19
6.3 ISO14443A FUNCTION ......................................................................................................... 19
6.3.1 UltraLight ......................................................................................................................... 19
6.3.1.1 INT WINAPI RF_REQUEST......................................................................................... 19
6.3.1.2 INT WINAPI INT RF_UL_SELECT............................................................................. 20
6.3.1.3 INT WINAPI RF_M1_READ ........................................................................................ 20
6.3.1.4 INT WINAPI INT RF_UL_WRITE............................................................................... 20
6.3.1.5 INT WINAPI RF_HALT ................................................................................................ 20
6.3.2 Mifare_Std ........................................................................................................................ 21
6.3.2.1 INT WINAPI RF_REQUEST......................................................................................... 21
6.3.2.2 INT WINAPI RF_ANTICOLL....................................................................................... 21
6.3.2.3 INT WINAPI RF_SELECT............................................................................................ 21
6.3.2.4 INT WINAPI RF_M1_AUTHENTICATION2 .............................................................. 21
6.3.2.5 INT WINAPI RF_M1_READ ........................................................................................ 22
6.3.2.6 INT WINAPI RF_M1_WRITE ...................................................................................... 22
6.3.2.7 INT WINAPI RF_M1_INITVAL ................................................................................... 22
6.3.2.8 INT WINAPI RF_M1_READVAL................................................................................. 23
6.3.2.9 INT WINAPI RF_M1_INCREMENT............................................................................ 23
6.3.2.10 INT WINAPI RF_M1_DECREMENT........................................................................... 23
6.3.2.11 INT WINAPI RF_M1_RESTORE ................................................................................. 23
6.3.2.12 INT WINAPI RF_M1_TRANSFER............................................................................... 23
6.3.2.13 INT WINAPI RF_HALT ................................................................................................ 24
6.3.3 Mifare_DESFire ............................................................................................................... 24
6.3.3.1 INT WINAPI RF_DESFIRE_RST................................................................................. 24
6.3.3.2 INT WINAPI RF_COS_COMMAND............................................................................ 24
6.3.4 Mifare_ProX ..................................................................................................................... 25
6.3.4.1 INT WINAPI RF_TYPE_RST ....................................................................................... 25
6.3.4.2 INT WINAPI RF_ COS_COMMAND........................................................................... 25
6.3.4.3 INT WINAPI RF_CL_DESELECT................................................................................ 25
6.3.5 SHC1102............................................................................................................................ 25
6.3.5.1 INT WINAPI RF_REQUEST......................................................................................... 25
6.3.5.2 INT WINAPI RF_ SHC1102_AUTH............................................................................. 26
6.3.5.3 INT WINAPI RF_ SHC1102_READ............................................................................. 26
6.3.5.4 INT WINAPI RF_ SHC1102_WRITE ........................................................................... 26
6.4 ISO14443B FUNCTION ...................................................................................................... 27
6.4.1 ISO14443B TRANSCEIVE................................................................................................ 27
6.4.2 THR1064 ........................................................................................................................... 27
6.4.2.1 INT WINAPI RF_TYPEB_RST..................................................................................... 27
6.4.2.2 INT WINAPI RF_ THR1064_READ............................................................................. 27
6.4.2.3 INT WINAPI RF_ THR1064_WRITE........................................................................... 28
6.4.2.4 INT WINAPI RF_ THR1064_CHECK .......................................................................... 28
6.4.3 AT88RF020 ....................................................................................................................... 28
6.4.3.1 INT WINAPI RF_ TYPEB_RST.................................................................................... 28
6.4.3.2 INT WINAPI RF_ AT020_CHECK................................................................................ 28
3

6.4.3.3 INT WINAPI RF_ AT020_COUNT ............................................................................... 28
6.4.3.4 INT WINAPI RF_ AT020_READ.................................................................................. 29
6.4.3.5 INT WINAPI RF_ AT020_WRITE ................................................................................ 29
6.4.3.6 INT WINAPI RF_ AT020_LOCK.................................................................................. 29
6.4.3.7 INT WINAPI RF_ AT020_DESELECT......................................................................... 29
6.4.4 SR176SRIX4K .................................................................................................................. 29
6.4.4.1 INT WINAPI RF_ST_SELECT ..................................................................................... 29
6.4.4.2 INT WINAPI INT_RF_SR176_READBLOCK............................................................. 30
6.4.4.3 INT WINAPI INT_RF_SR176_WRITEBLOCK........................................................... 30
6.4.4.4 INT WINAPI INT_RF_SR176_PROTECTBLOCK...................................................... 30
6.4.4.5 INT WINAPI INT_RF_SRIX4K_ GETUID .................................................................. 30
6.4.4.6 INT WINAPI INT_RF_SRIX4K_ READBLOCK......................................................... 31
6.4.4.7 INT WINAPI INT_RF_SRIX4K_ WRITEBLOCK....................................................... 31
6.4.4.8 INT WINAPI INT_RF_SRIX4K_ PROTECTBLOCK.................................................. 31
6.4.4.9 INT WINAPI RF_ST_COMPLETION .......................................................................... 32
6.4.5 TYPE_B SmartCard........................................................................................................ 32
6.4.5.1 INT WINAPI RF_ TYPEB_RST.................................................................................... 32
6.4.5.2 INT WINAPI RF_ COS_COMMAND........................................................................... 32
6.4.5.3 INT WINAPI RF_ CL_DESELECT............................................................................... 32
6.5 ISO15693 FUNCTION......................................................................................................... 33
6.5.1 INTWINAPI ISO15693_INVENTORY......................................................................... 33
6.5.2 INTWINAPI ISO15693_INVENTORYS ...................................................................... 33
6.5.3 INTWINAPI ISO15693_GET_SYSTEM_INFORMATION......................................... 33
6.5.4 INTWINAPI ISO15693_SELECT................................................................................. 34
6.5.5 INTWINAPI ISO15693_RESET_TO_READY ............................................................ 34
6.5.6 INTWINAPI ISO15693_STAY_QUIET........................................................................ 34
6.5.7 INTWINAPI ISO15693_GET_BLOCK_SECURITY................................................... 34
6.5.8 INTWINAPI ISO15693_READ..................................................................................... 35
6.5.9 INTWINAPI ISO15693_WRITE................................................................................... 35
6.5.10 INTWINAPI ISO15693_LOCK_BLOCK..................................................................... 36
6.5.11 INT WINAPI ISO15693_WRITE_AFI .......................................................................... 36
6.5.12 INTWINAPI ISO15693_LOCK_AFI ............................................................................ 36
6.5.13 INTWINAPI ISO15693_WRITE_DSFID ..................................................................... 37
6.5.14 INTWINAPI ISO15693_LOCK_DSFID....................................................................... 37
6.6 FUNCTION OF INFINEON ELECTRIC TAG ............................................................... 38
6.6.1 INTWINAPI SRF55VP_READ..................................................................................... 38
6.6.2 INTWINAPI SRF55VP_WRITEBYTE......................................................................... 38
6.6.3 INTWINAPI SRF55VP_WRITE................................................................................... 38
6.6.4 INTWINAPI SRF55VP_WRITE_REREAD ................................................................. 39
4

1. GENERAL INFORMATION
◇ RS232 or USB Interface
◇ DC4.5V – DC5.5V VDD Operating
◇ Windows 32 Operating Systems Compatibility
◇ 13.56MHz RF Operating Frequency
◇ ISO14443A ISO1443B ISO15693 Protocol
◇ 150MA Work Current
◇ Operating temperature range: -20°C to +50°C
◇ Storage temperature range: -25°C to +60°C
◇ Dimension:110 x 81 x 26 mm
◇ Weight: 100g
5

2. TYPES AND EXPLANATION
CR500 series readers are accord with ISO14443A, ISO14443B and ISO15693
Protocols, and classified as follows sheet
CR500L CR500A CR500D CR500E CR500F
ISO14443A √√√√
ISO14443B √√
ISO15693 √√
NOTICE:The difference between CR500L and CR500A
CR500L supported cards:Mifare_1K, Mifare_4K, Mifare_UltraLight
CR500A supported cards:Mifare_1K, Mifare_4K, Mifare_UltraLight, Mifare_ProX
3. CONNECTION TO PC
3.1 CR500-RS232
The PS/2 port power to Reader
6

3.2 CR500-USB
CR500-USB Reader is USB bridge to COM way. Connect CR500 to the USB port of
PC,after installing the drive will come out a virtual COM,the operations hereafter are as
same as CR500-RS232.
You can see the virtual COM No. on the “device manager ” as follows:
7

4. SDK SOFTWARE
Responding InstDemo.exe to install the DEMO software and the DLL of the reader
to PC,and create corresponding logo on the desk.
The default installation directory is C:\RFREADER,including the following content:
C:\RFREADER\Examples Sample source code
C:\RFREADER\UsbDriver USB interface drive
C:\RFREADER\ICTransfer.exe DEMO software
C:\RFREADER\MasterRD.dll Reader interface library with application
C:\RFREADER\MasterCOM.dll Connect and transfer data with COM device.
C:\RFREADER\SL_Paper.dll DEMO software background library
C:\RFREADER\RFHELP.chm DLL explanations at chm format
C:\RFREADER\AppConfig.ini DEMO software configuration files
5. DEMO
This software run on Win32 system, and need 1024 x 768 dpi at least
5.1 Online
Choose the correct COM No.,click【Connect】button to connect the Reader to PC.
Click【Read】the product information button,you can check the specific type of the
Reader and the supported cards.
8

5.2 SHC1102
Click【Request】button to obtain the card serial number.
Input the correct key to read/write the card
.
5.3 UltraLight
Click the【Request】button to obtain the card Serial Number.
Choose the corresponding address to read or write the card.
9

5.4 Mifare_Std S50
Click the【Request】button to obtain the card serial number.
Input the correct key to read, write, increase or decrease the card.
5.5 Mifare_Std S70
Click the【Request】button to obtain the card serial number.
Input the correct key to read, write, increase or decrease the card.
10

5.6 Mifare_ProX
Click【Reset】button to obtain the serial number and the reset information of the
card according to ISO14443-4 protocol.
Input the COS command,click【Send】button to commute data to card.
5.7 TRH1064
Click【Request】button to obtain the card serial number.
Hereafter can read, write and validate.
11

5.8 SR176
Click【Req】button to obtain the ID number of the card.
Then you can read, write and lock blocks of the card.
5.9 SRIX4K
Click【Req】button to obtain the ID number of the card and click【Read UID】
to obtain the UID of the card.
Then you can read, write and lock blocks of the card.
12

5.10 AT88RF020
Click【ReqB】button to obtain the serial number of the card.
After check password, you can read, write, signature and lock blocks of the
card.
5.11 ISO14443B-4 Protocol Smart Card
Click【Reset】button to obtain the serial number and the reset information of the
card according to ISO14443-4 protocol.
Input the COS command,click【Send】button to commute data to card.
13

5.12 Test_TypeB
On this window, CR500 will commute data with card base on function “int
WINAPI rf_transceive”, that means CR500 will not auto manage ISO14443-4
Protocol Control Byte
5.13 I.CODE SLI
Click【INVENTORY】button to obtain the serial number of the card. You can
operate 4 cards at most.
Choose certain card according to the UID to read or write.
14

5.14 Tag_IT
Click【INVENTORY】button to obtain the serial number of the card. You can
operate 4 cards at most.
Choose certain card according to the UID to read or write.
5.15 SRF55V02P
Click【INVENTORY】button to obtain the serial number of the card. You can
operate 4 cards at most.
Choose certain card according to the UID to read or write.
15

5.16 SRF55V10P
Click【INVENTORY】button to obtain the serial number of the card. You can
operate 4 cards at most.
Choose certain card according to the UID to read or write.
16

6. DLL INFORMATION
All types of readers have System function and encrypt function.
Whether readers support other functions depends on their specific types.
6.1 SYSTEM FUNCTION
6.1.1 INT WINAPI LIB_VER
Function:Get DLL Version
Prototype:int WINAPI lib_ver (unsigned int *pVer)
Parameter:pVer:[OUT] DLL version
Return:return 0 if successful
6.1.2 INT WINAPI RF_INIT_COM
Function:Connect
Prototype:int WINAPI rf_init_com (int port, long baud)
Parameter:port:[IN] serial port number
baud:[IN] communication baud rate, 4800~115200 bps
Return:return 0 if successful
6.1.3 INT WINAPI RF_CLOSEPORT
Function:Disconnect
Prototyp:int WINAPI rf_ClosePort()
Return:return 0 if successful
6.1.4 INT WINAPI RF_GET_MODEL
Function:Get Device Type
Prototype:int WINAPI rf_get_model (unsigned short icdev,
unsignedchar *pVersion,
unsignedchar *pLen)
Parameter:icdev:[IN] Device ID
pVersion:[OUT] return information
pLen: [OUT] the length of the return information
Return:return 0 if successful
6.1.5 INT WINAPI RF_INIT_DEVICE_NUMBER
Function:Designate Device ID
Prototype:int WINAPI rf_init_device_number (unsigned short icdev)
Parameter:icdev:[IN] Device ID
Return:return 0 if successful
17

6.1.6 INT WINAPI RF_GET_DEVICE_NUMBER
Function:Read Device ID
Prototype:int WINAPI rf_get_device_number (unsigned short *pIcdev)
Parameter:pIcdev:[OUT] return to Device ID
Return:return 0 if successful
6.1.7 INT WINAPI RF_INIT_TYPE
Function:Set Reader contactless working mode
Prototype:int WINAPI rf_init_type(unsigned short icdev, unsigned char type)
Parameter:icdev:[IN] Device ID
type:[IN] reader working mode
Return:return 0 if successful
Explanation: this function is not effective to the readers only support single protocol.
type='A':set CR500 into ISO14443A mode
type='B':set TYPE_B mode
type='r':set AT88RF020 card mode
type='1':set ISO15693 mode
6.1.8 INT WINAPI RF_ANTENNA_STA
Function:Manage RF Transmittal
Prototype:int WINAPI rf_antenna_sta (unsigned short icdev, unsigned char model)
Parameter:icdev:[IN] Device ID
model:[IN] transmittal state
Return:return 0 if successful
Explanation:model = 0:turn off RF transmittal
model=1:turn on RF transmittal
6.1.9 INT WINAPI RF_LIGHT
Function:Manage LED
Prototype:int WINAPI rf_light (unsigned short icdev, unsigned char color)
Parameter:icdev:[IN] Device ID
color:[IN] 0 =off
1 =red
2 =green
3 =yellow
Return:return 0 if successful
6.1.10 INT WINAPI RF_BEEP
Function:beep
Prototype:int WINAPI rf_beep (unsigned short icdev, unsigned char msec)
Parameter:icdev:[IN] Device ID
msec:[IN] beep time,unit 10 MSEL
Return:return 0 if successful
18

6.2 DES FUNCTION
6.2.1 INT WINAPI DES_ENCRYPT
Function:DES_Encrypt
Prototype:int WINAPI des_encrypt ( unsigned char *pSzOut,
unsignedchar *pSzIn,
unsignedint inlen,
unsignedchar *pKey,
unsignedint keylen)
Parameter:pSzOut:[OUT] deciphering, bytes length equal to data
pSzIn:[IN] data
inlen:[IN] length of data, integer times of 8 bytes
pKey:[IN] encrypt key
keylen:[IN] length of key, 8 bytes for single DES, 16 bytes for triple DES
Return:return 0 if successful
6.2.2 INT WINAPI DES_DECRYPT
Function:DES_Decrypt
Prototype:int WINAPI des_decrypt ( unsigned char *pSzOut,
unsignedchar *pSzIn,
unsignedint inlen,
unsignedchar *pKey,
unsignedint keylen)
Parameter:pSzOut:[OUT] data, bytes length equal to deciphering
pSzIn:[IN] deciphering
inlen:[IN] length of deciphering, integer times of 8 bytes
pKey:[IN] encrypt key
keylen:[IN] length of key, 8 bytes for single DES, 16 bytes for triple DES
Return:return 0 if successful
6.3 ISO14443A FUNCTION
6.3.1 UltraLight
6.3.1.1 INT WINAPI RF_REQUEST
Function:ReqA
Prototype:int WINAPI rf_request ( unsigned short icdev,
unsignedchar model,
unsignedshort *pTagType)
Parameter:icdev:[IN] Device ID
model:[IN] REQ MODE
pTagType:[OUT] return card style number
Return:return 0 if successful
Explanation:mode = 0x26:REQ_STD
mode = 0x52:REQ_ALL
19

6.3.1.2 INT WINAPI INT RF_UL_SELECT
Function:Select UltraLight
Prototype:int WINAPI int rf_ul_select (unsigned short icdev,
unsignedchar*pSnr,
unsignedchar*pLen)
Parameter:icdev:[IN] Device ID
pSnr:[OUT] return card unique serial number
pLen:[OUT] length of Snr
Return:return 0 if successful
6.3.1.3 INT WINAPI RF_M1_READ
Function:MifareOne read
Prototype:int WINAPI rf_M1_read ( unsigned short icdev,
unsignedchar block,
unsignedchar *pData,
unsignedchar *pLen)
Parameter:icdev:[IN] Device ID
block:[IN] block absolute address
pData:[OUT] return date
pLen: [OUT] length of return data
Return:return 0 if successful
Explanation: this function is applicable for Ultra_Light card. Every page of Ultra_Light card has
4bytes. Transfering this function every time, return 4 pages of date consectively.
6.3.1.4 INT WINAPI INT RF_UL_WRITE
Function:UltraLight Write
Prototype:int WINAPI int rf_ul_write ( unsigned short icdev,
unsignedchar page,
unsignedchar *pData)
Parameter:icdev: [IN] DeviceID
page:[IN] UltraLight card page address(0~0x0F)
pData:[IN] written date,4 bytes
Return:return 0 if successful
6.3.1.5 INT WINAPI RF_HALT
Function:TYPE_A card HALT
Prototype:int WINAPI rf_halt (unsigned short icdev)
Parameter:icdev:[IN] Device ID
Return:return 0 if successful
20
Table of contents