EHUOYAN YHY638F User manual

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 1 of 28 Apr 2010
Ordering Information:
Item No. Description
YHY638FU 13.56MHz Multi Protocol Reader/Writer USB Interface
YHY638FR 13.56MHz Multi Protocol Reader/Writer RS232 Interface
1 Supported cards
ISO 14443 TypeA: Mifare_One(S50&S70)/UltraLight/Mifare_ProX
ISO 14443 TypeB: AT88RF020/SR176/SRIX4K
ISO 15693: Tag_it(2k), HF-1/I.CODE SLI and more
2 Special Features
z
Read and write contactless smart cards
z
Frequency: 13.56 MHz.
z
Typical time to read and write cards:<100ms
z
Communications Interface: USB or RS232, baud rate 9600 ~115200 bps
z
Power supply :
DC
5V
z
Two LED indicators (software controlled)
z
Buzzer alarm (software controlled)
z
Mechanic and environmental characteristics:
- Size: 110 ×81× 26 (mm)

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 2 of 28 Apr 2010
- Cable length: 1.5m
-Color:Black
- Operating temperature: 0 ~60 ℃
- Storage temperature: ‐25 ~80℃
- Relative humidity: up to 90%
- Weight:90g (YHY638FU)
160g (YHY638FR)
3 Connecting
Connect the YHY638F to the USB or RS232 port of PC, after power on the RED
led and GREEN led will flash one time, then the GREEN led will light on again, next
the buzzer will beep twice, it means that the reader is ready now.
1) For YHY638FU item
Connect one of the A type USB connector to the rear side of the
YHY638FU, another USB connector connect to the host USB port.
(Item No:YHY638FU)
TO PC USB PORT
2) For YHY638FR item

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 3 of 28 Apr 2010
Connect one of the A type USB connector to the rear side of the
YHY638FR, another USB connector which near the serial
connector connect to the host USB port for power the device, and
connect the 9pin COM port to HOST COM port.
(Item No:YHY638FR)

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 4 of 28 Apr 2010
4 Electrical Characteristics
4.1 Operating Condition Range
Relative humidity:up to 90%
Symbol Parameter Conditions Min Typ Max Unit
Tamb Ambient
Temperature 0 25 60
℃
VDD
DC Supply
Voltage DVSS =
0V 4.5
5
5.5
V
Table 1 - Operating Condition Range
4.2 Current Consumption
Symbol Parameter Conditions Min Typ Max Unit
IDVDD
Supply
Current
Reading started
but no cards in
the reader range
90 mA
IDVDD
Reading started,
1 card in the
reader range
95 mA
Table 2 - Current Consumption
4.3 Operating Distance
Symbol Parameter Conditions Min Typ Max Unit
OD
14443 Type A S50 tag
Operating Distance, Measured
from the
reader
bottom
0-70
mm
OD
14443 Type B tag
Operating Distance Measured
from the
reader
bottom
0-45 mm
OD
15693 tag Operating
Distance, Measured
from the
reader
bottom
0-90 mm
Table 3 - Operating Distance
4.4 COM Interface Characteristics
Symbol Parameter Conditions Min Typ Max Unit

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 5 of 28 Apr 2010
USB baud rate 115200
RS232 baud rate 9600 115200 115200 baud
Table 4 - Serial Interface
5. DEMO
This software rfidxray.exe run on Win32 system.
5.1 COM setup
First run RFIDXray.exe, then connect the reader to PC COM port.Choose the
correct COM number, click [Connect] button to connect the Reader to PC.Baud
set to 115200. Click [Read] the product information button, you can check the
specific type of the Reader and the supported cards.
5.2 UltraLight
Click the [ReqALL] button to obtain the card Serial Number. Choose the
corresponding address to read/write the card.

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 6 of 28 Apr 2010
5.3 Mifare_1K (STD S50)
Click the [Request] button to obtain the card serial number.
Input the correct password to read, write, increase or decrease the card.

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 7 of 28 Apr 2010
5.4 Mifare_4K (STD S70)
Click the [Request] button to obtain the card serial number.
Input the correct password to read, write, increase or decrease the card.
5.5 Mifare_ProX
Click [Reset] button to obtain the serial number and the reset information of

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 8 of 28 Apr 2010
the card according to ISO14443-4 protocol.
Input the COS command, click [Send] button to commute data to card.
5.6 SR176
Click [Req] button to obtain the ID number of the card.
Then you can read, write and lock blocks of the card.

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 9 of 28 Apr 2010
5.7 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.
5.8 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.9 I.CODE SLI

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 10 of 28 Apr 2010
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.
This demo can display 4 label’s id only.
5.10 Tag_IT

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 11 of 28 Apr 2010
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/write.
5.11 HELP
You can search DLL function defined in the help file.

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 12 of 28 Apr 2010
5.12 DISCONNECT READER
5.13 EXIT
6. DLL INFORMATION ( icdev=0 )
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

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 13 of 28 Apr 2010
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, 19200 ~ 115200 bps
Return: return 0 if successful
6.1.3 INT WINAPI RF_CLOSEPORT
Function: Disconnect
Prototyp: int WINAPI rf_ClosePort(void)
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,
unsigned char *pVersion,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
pVersion: [OUT] response information
pLen: [OUT] length of
response information
Return: return 0 if successful
6.1.5 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 YHY638 into ISO14443A mode
type = 'B': set ISO14443B mode
type = 'r': set AT88RF020 card mode
type = '1': set ISO15693 mode
6.1.6 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.7 INT WINAPI RF_LIGHT

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 14 of 28 Apr 2010
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(RFU)
Return: return 0 if successful
6.1.8 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 Msec
Return: return 0 if successful
6.2 ISO14443A FUNCTION
6.2.1 UltraLight
6.2.1.1 INT WINAPI RF_REQUEST
Function: ReqA
Prototype: int WINAPI rf_request ( unsigned short icdev,
unsigned char model,
unsigned short *pTagType)
Parameter: icdev: [IN] Device ID
model: [IN] REQ MODE
pTagType: [OUT] response data, chip type code
Return: return 0 if successful
Explanation:mode = 0x26: REQ_STD
mode = 0x52: REQ_ALL
6.2.1.2 INT WINAPI INT RF_UL_SELECT
Function: Select UltraLight
Prototype: int WINAPI int rf_ul_select (unsigned short icdev,
unsigned char *pSnr,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
pSnr: [OUT] response data, card unique serial number
pLen: [OUT] length of response data
Return: return 0 if successful
6.2.1.3 INT WINAPI RF_M1_READ
Function: MifareOne read
Prototype: int WINAPI rf_M1_read ( unsigned short icdev,

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 15 of 28 Apr 2010
unsigned char block,
unsigned char *pData,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pData: [OUT] response data from card
pLen: [OUT] length of response data
Return: return 0 if successful
Explanation: this function is also applicable for UltraLight card. Every page of UltraLight card
has 4 bytes. Transfering this function every time, return data of 4 consecutive
pages.
6.2.1.4 INT WINAPI INT RF_UL_WRITE
Function: UltraLight Write
Prototype: int WINAPI int rf_ul_write ( unsigned short icdev,
unsigned char page,
unsigned char *pData)
Parameter: icdev: [IN] Device ID
page: [IN] UltraLight card page address , 0 ~ 0x0F
pData: [IN] written data, 4 bytes
Return: return 0 if successful
6.2.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
6.2.2 Mifare_Std
6.2.2.1 INT WINAPI RF_REQUEST
Function: ReqA
Prototype: int WINAPI rf_request ( unsigned short icdev,
unsigned char model,
unsigned short *pTagType)
Parameter: icdev: [IN] Device ID
model: [IN] REQ MODE
pTagType: [OUT] response data, chip type code
Return: return 0 if successful
Explanation: mode = 0x26: REQ_STD
mode = 0x52: REQ_ALL
6.2.2.2 INT WINAPI RF_ANTICOLL
Function: Mifare card Anticollision
Prototype: int WINAPI rf_anticoll ( unsigned short icdev,
unsigned char bcnt,
unsigned char *pSnr,
unsigned char *pLen)

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 16 of 28 Apr 2010
Parameter: icdev: [IN] Device ID
bcnt: [IN] mustbe4
pSnr: [OUT] response data from card, unique serial number
pLen: [OUT] length of response data
Return: return 0 if successful
6.2.2.3 INT WINAPI RF_SELECT
Function: Mifare card Selectting
Prototype: int WINAPI rf_select (unsigned short icdev,
unsigned char *pSnr,
unsigned char snrLen,
unsigned char *pSize)
Parameter: icdev: [IN] Device ID
pSnr: [IN] card unique serial number
snrLen: [IN] length of pSnr
pSize: [OUT] response data from card, capacity code
Return: return 0 if successful
Explanation: card will be on active estate after received this command, only one TYPE_A card
on active estate at the same influence range at same time.
6.2.2.4 INT WINAPI RF_M1_AUTHENTICATION2
Function: Mifare_Std Authentify
Prototype: int WINAPI rf_M1_authentication2 ( unsigned short icdev,
unsigned char model,
unsigned char block,
unsigned char *pKey)
Parameter: icdev: [IN] Device ID
model: [IN] key validate mode
block: [IN] block absolute address
pKey: [IN] 6 bytes password
Return: return 0 if successful
Explanation:model = 0x60: via KeyA
model = 0x61: via KeyB
6.2.2.5 INT WINAPI RF_M1_READ
Function: MifareOne Read
Prototype: int WINAPI rf_M1_read ( unsigned short icdev,
unsigned char block,
unsigned char *pData,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pData: [OUT] response data from card
pLen: [OUT] length of response data
Return: return 0 if successful
6.2.2.6 INT WINAPI RF_M1_WRITE
Function: Mifare_Std Write

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 17 of 28 Apr 2010
Prototype: int WINAPI rf_M1_write (unsigned short icdev,
unsigned char block,
unsigned char *pData)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pData: [IN] written data, 16 bytes
Return: return 0 if successful
6.2.2.7 INT WINAPI RF_M1_INITVAL
Function: Mifare_Std card Initialize Value
Prototype: int WINAPI rf_M1_initval ( unsigned short icdev,
unsigned char block,
long value)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pValue: [IN] initialize purse value at HEX format, low byte in former
Return: return 0 if successful
6.2.2.8 INT WINAPI RF_M1_READVAL
Function: Mifare_Std Read Value
Prototype: int WINAPI rf_M1_readval ( unsigned short icdev,
unsigned char block,
long*pValue)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pValue: [OUT] response value at HEX format, low byte in former
Return: return 0 if successful
6.2.2.9 INT WINAPI RF_M1_INCREMENT
Function: Mifare purse increment
Prototype: int WINAPI rf_M1_increment (unsigned short icdev,
unsigned char block,
long value)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
value: [IN] increasevalue at HEX format, low byte in former
Return: return 0 if successful
6.2.2.10 INT WINAPI RF_M1_DECREMENT
Function: Mifare purse decrement
Prototype: int WINAPI rf_M1_decrement (unsigned short icdev,
unsigned char block,
long value)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
value: [IN] decrease value at HEX format, low byte in former
Return: return 0 if successful

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 18 of 28 Apr 2010
6.2.2.11 INT WINAPI RF_M1_RESTORE
Function: Mifare_Std Restore
Prototype: int WINAPI rf_M1_restore (unsigned short icdev, unsigned char block)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
Return: return 0 if successful
6.2.2.12 INT WINAPI RF_M1_TRANSFER
Function: Mifare_Std Transfer
Prototype: int WINAPI rf_M1_transfer (unsigned short icdev, unsigned char block)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
Return: return 0 if successful
Explanation: this function only be transferred after increment, decrement and restore command
6.2.2.13 INT WINAPI RF_HALT
Function: Mifare Halt
Prototype: int WINAPI rf_halt (unsigned short icdev)
Parameter: icdev: [IN] Device ID
Return: return 0 if successful
Explanation: card exit active estate after received this command
6.2.3 Mifare_ProX
6.2.3.1 INT WINAPI RF_TYPE_RST
Function: Request ISO14443A-4 card and reset
Prototype: int WINAPI rf_typea_rst ( unsigned short icdev,
unsigned char model,
unsigned char *pData,
unsigned char *pMsgLg)
Parameter: icdev: [IN] Device ID
model: [IN] request mode
pData: [OUT] response data from card
pMsgLg: [OUT] length of response data
Return: return 0 if successful
Explanation:mode = 0x26: REQ_STD
mode = 0x52: REQ_ALL
pData: 4bytes CSN + RATS according to ISO14443A
6.2.3.2 INT WINAPI RF_ COS_COMMAND
Prototype: int WINAPI rf_cos_command ( unsigned short icdev,
unsigned char *pCommand,
unsigned char cmdLen,
unsigned char *pData,
unsigned char *pMsgLg)
Parameter: icdev: [IN] Device ID
pCommand: [IN] COS command

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 19 of 28 Apr 2010
cmdLen: [IN] length of COS command
pData: [OUT] response data from card, including SW1& SW2
pMsgLg: [OUT] length of response data
Return: return 0 if successful
6.2.3.3 INT WINAPI RF_CL_DESELECT
Prototype: int WINAPI rf_cl_deselect (unsigned short icdev)
Parameter: icdev: [IN] Device ID
Return: return 0 if successful
6.3 ISO14443 Type B FUNCTION
6.3.2 AT88RF020
6.3.2.1 INT WINAPI RF_ TYPEB_RST
Function: REQ ISO14443B protocol card and set SLOT
Prototype: int WINAPI rf_atqb(unsigned short icdev,
unsigned char model,
unsigned char *pData,
unsigned char *pMsgLg)
Parameter: icdev: [IN] Device ID
model: [IN] REQ MODE 0 = REQB, 1 = WUPB
pData: [OUT] response data from card
pMsgLg: [OUT] length of response data
Return: return 0 if successful
6.3.2.2 INT WINAPI RF_ AT020_CHECK
Function: AT88RF020 card Authentify
Prototype: int WINAPI rf_at020_check (unsigned short icdev, unsigned char *pKey)
Parameter: icdev: [IN] Device ID
pKey: [IN] 8 bytes pass word
Return: return 0 if successful
6.3.2.3 INT WINAPI RF_ AT020_COUNT
Function: AT88RF020 card count
Prototype: int WINAPI rf_at020_count(unsigned short icdev, unsigned char *pData)
Parameter: icdev: [IN] Device ID
pData: [IN] signature, 6 bytes
Return: return 0 if successful
6.3.2.4 INT WINAPI RF_ AT020_READ
Function: AT88RF020 read
Prototype: int WINAPI rf_at020_read (unsigned short icdev,
unsigned char page,
unsigned char *pData,
unsigned char *pMsgLen)

YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0 Page 20 of 28 Apr 2010
Parameter: icdev: [IN] Device ID
page: [IN] page address, 0 ~ 31
pData: [OUT] response data from card
pMsgLen: [OUT] length of response data
Return: return 0 if successful
6.3.2.5 INT WINAPI RF_ AT020_WRITE
Function: AT88RF020 write
Prototype: int WINAPI rf_at020_write ( unsigned short icdev,
unsigned char page,
unsigned char *pData)
Parameter: icdev: [IN] Device ID
page: [IN] page address, 0 ~ 31
pData: [IN] written data, 8 bytes
Return: return 0 if successful
6.3.2.6 INT WINAPI RF_ AT020_LOCK
Function: AT88RF020 LOCK
Prototype: int WINAPI rf_at020_lock (unsigned short icdev, unsigned char *pData)
Parameter: icdev: [IN] Device ID
pData: [IN] 4 bytes data
Return: return 0 if successful
6.3.2.7 INT WINAPI RF_ AT020_DESELECT
Function: AT88RF020 card Deselect
Prototype: int WINAPI rf_at020_deselect (unsigned short icdev)
Parameter: icdev: [IN] Device ID
Return: return 0 if successful
6.3.3 SR176/SRIX4K
6.3.3.1 INT WINAPI RF_ST_SELECT
Function: ST card (SR176/SRIX4K) Lock
Prototype: int WINAPI rf_st_select (unsigned short icdev, unsigned char *pChip_ID)
Parameter: icdev: [IN] Device ID
pChip_ID: [IN] response data from card, 1 byte ID code
Return: return 0 if successful
6.3.3.2 INT WINAPI INT_RF_SR176_READBLOCK
Function: SR176 Read
Prototype: int WINAPI int rf_sr176_readblock ( unsigned short icdev,
unsigned char block,
unsigned char *pData,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
block: [IN] blockaddress
pData: [OUT] response data from card
Table of contents
Other EHUOYAN Card Reader manuals
Popular Card Reader manuals by other brands

Feig Electronic
Feig Electronic OBID i-scan ID ISC.MR100-A Montage, installation

TransCore
TransCore Encompass 1i quick start guide

IDTECK
IDTECK NEO RF245 Quick installation guide

BlueCard
BlueCard BG-245/W user manual

Wildgame
Wildgame APPVIEW-9 user manual

Decagon Devices
Decagon Devices ProCheck Operator's manual