Professional Documents
Culture Documents
2.Driver Installation:
3.Lib Function Introduction:
Driver Contents------------------------------------------------------------------------------
Function Using Formula--------------------------------------------------------------------
Windows 16/32 bit DLL--------------------------------------------------------------------
Card Type Code------------------------------------------------------------------------------
Function Error Code Introduction---------------------------------------------------------
T600 serial contact -type smart card readers have T600S , T600 ,
T600W and T600U ; Falchion Dragon series include T2,T4,T6 & T8 T600S
is built-in, bunches of communication, adopt and push and pull out, push two kinds of
card seats, utilize and supply power within the computer; T600 adopts and pushes
the pulling out type card seat for the putting type outside, bunches of communication,
the power adopts the keyboard mouth to fetch the electricity; T600W adopts and
pushes pulling out type , pushing type or the playing type card stand by oneself,
bunches of communication, utilize AC220V to supply power; T600U utilizes
deposition electricity of USB at the same time in order to adopt USB interface to
carry on reading the writing device of communication. It all have a SAM card that
T600 series & Falchion dragon series read the card writing device (except T600U),
can realize the safe hairpin and meet demands of safe field . The T600 series &
Falchion dragon series are read & write device to develop the relevant products of
smart card and indispensable front-end processing equipment of system integration, it
is abundant , perfect interface function, smart cards , such as can apply to the industry
and commerce conveniently, telecommunication , postal service , tax , bank ,
insurance , medical treatment and various kinds of charging , stored value ,
inquiring ,etc. are managed in the application system.
Introduction Light
The red light will be on if plug in
The green light will be on to indicate the insert of card, and blink when communicate.
Please pay attention to the following points while using the example:
1: Passwords of the logic encrypt cards are different because of the difference of card
encapsulation manufacturer, so before using, please consult the card factory or the
Chip manufacturer confirm the information, or consult us in case of the damage of the
card.
2: During operation, Reader may not be connected correctly because of the disaccord
of the interface. So please use the demo provided by our company to check whether
the reader is connected well. Please remember the port you connect if the connection
is correct in case that you have more problems when debuging the procedure .
3: Be clear of the type of your card on hand. If you are unclear, please use the
demonstration or ask the relevant personnel for help.
Declare: The card type that the Demonstration test are just for reference.It can't be
regarded as the last basis of the type of the card that confirmed.Please ask the factory
of card and manufacturer of chip to comfirm the type of the card.
Function operation rules
(1) First transfer the initialize function IC _ InitComm (Port ), Port means the port
that to open, 0 means serial port1, 2 means the serial port 2,the same consequence
as that 20 means serial port 19,if Port is equaled 100, means the USB interface.
(2) Function IC _ Status (HANDLE icdev ) can obtain the current status of the
device (have cards or have no card), it’ s suggested that use this function after the
success of the initialize function IC _ InitComm (Port ),the parameter of icdev is
the value that IC_InitComm returns,namely the identifier of the device of one port.
(3) Under the serial port communication way , while transferring WINDOWS
16/ 32 bit dynamic Lib or Unix / Linux function lib, should carry out
IC_ExitComm() function before the procedure withdraws, then close serial port,
release serial port of the equipments; Otherwise it makes mistakes when initialize
serial port again.
(4) The function transfers the error type, please go to the function error type code
for reference. All error codes of function will return with the negative form; except
the Foxpro for Dos
(5) The position of the Lib state database should be in the declared corresponding
catalogue or the default catalogue, otherwise there will be the mistake that can't
find the dynamic state database.
(6)When using the Function of HEX(namely the transferring of IC_XXXHEX
similarity),the character string that send into or read out are used by the character
string(HEX) ,the transferring way of other parameters are the same ,so we don’ t list
it any more in the detailed function specifation.
Note:The capitalization and the minuscule of the function’ s name must be
distinguished strictly, otherwise, they can’ t be transferred.
Attention: Detailed operation method of function, Please refer to the example of
T600 or T6.
WINDOWS3X 16bit DLL develop platform, such as Visual Basic 6.0, Delphi 5.0
Power Builder,6.0 Visual FoxPro, Visual C++, C++ Builder.
WINDOWS9X/2K/NT/XP 32bit DLL develop platform, such as VB, PB, Foxpro,
Visual C++, C++ Builder
SCO UNIX & LINUX System
Communication interface: RS232,Baud rate: 9600bit/s, stable and reliable。
Technical data of reader:
Communication interface:RS232 or USB(for low speed 1.1)
Baud rate: 9600-115200BPS
Power supply: Set-in DC5V±10%;Set-out: AC220V±10%
T600: 115mmx82mmx90mm
T600W: 160mmx120x110
T600P:64mmx75mmx17mm
T2:88mmx30mmx13mm
T4:85mmx75mmx26mm
T6:71mmx88mmx122mm
2.Driver Installation:
Before using the reader needed to install drivers, you could find drivers software in
the additional CD-disc. The detail install step as following:
A. open your operating system
B. insert CD-ROM to CD drive
C. run the installed software(T600.EXE or T6.EXE)
D. insert the reader into USB port of PC, the system will find the U-disc
automatically.
E. For PC/SC driver, you must click SETUP to finish the process. then insert the
reader and open the system again.
1)Common functions
6)1604/1604B functions
1 IC_CheckPass_1604 Check1604 system password
2 IC_ChangePass_1604 Change 1604 password
3 IC_ReadCount_1604 Read 1604 error counter
4 IC_Fuse_1604 1604 fuse broken
5 IC_Check_1604 check whether the 1604 card is insert in the Reader
<1>Common Function
1.__int16 IC_Status(HANDLE ICDev)
Description : Return to the current connecting status of readers and test if it is
connected or the card is inserted; for the USB readers, this function rises at the same
time when the electricity is up, it is necessary before you operate the card.
Parameter:
HANDLE ICDev –the communication identifier that IC_InitComm returns
Return: <0 reader communication error, please see the error code
=0 communication correct, the card has already inserted
=1 communication correct, no card has inserted
Example :
St=IC_Status(ICDev)
7.__ the int16 IC_Write( the HANDLE ICDev,__ the int16 Offset,__ int16 len,
unsigned char* DataBuffer)
Description:Write data into the IC card .
Parameters:
HANDLE ICDev –the communication identifier that IC_InitComm returns
__int16 Offset - the start address of the IC card that to write
__int16 length - The length of the data
unsigned char * Databuffer- stores the data that’ s about to write into the card
Return:<0 error.Its absolute value is the error code
=0 correct
Example:
IC_Write(ICDev,32,14,"IcCard Message")
Write "IC Card Message" into data area which begins at address 32
Related Function:
__int16 __stdcall IC_Write_Hex(HANDLE idComDev,__int16 offset,__int16
len,unsigned char * writebuffer)
8.__ the int16 IC_Erase( the HANDLE ICDev,__ the int16 Offset,__ int16 len)
Description: erase data, that’
s write Hex FF , decimalist 255.
Parameters:
HANDLE ICDev- the communication identifier that IC_InitComm returns
__int16 Offset –the start address that erased
__int16 len –erase byte number
Return:<0 error.Its absolute value is the error code
>=0 the length of data that write into
Example:
St=IC_Erase(ICDev,24,32)
Erase 32 bytes from the beginning of absolutely offset address 24
9.__ the int16 IC_Read_Float( the HANDLE ICDev,__ the int16 Offset, float&
fdata)
Description: Read a float data, and return to fdata. Each float data needs 4 bytes in the
card.
Parameters:
HANDLE ICDev- the communication identifier that IC_InitComm returns
__int16 Offset - The start address that to read
float& fdata - Return to address that stores the float data.
Return:<0 error .Its absolute value is the error code.
=0 correct
Example:
St=IC_Read_Float(ICDev,24,&fdata)
Read a float data from the beginning of absolutely offset address 24
10.__ the int16 IC_Write_Float( the HANDLE ICDev,__ int16 Offset,float fdata)
Description: Write a float data into the card. Each float data needs 4 bytes in the card.
Parameters:
HANDLE ICDev- the communication identifier that IC_InitComm returns
__int16 Offset - The start address that to write
float fdata –the float data that to write
Return:<0 error. Its absolute value is error code
=0 correct
Example:
St=IC_Write_Float(ICDev,24,45.67)
Write a float data from the beginning of absolutely offset address 24.
11.__ the int16 IC_Encrypt( char* key, char* ptrsource, unsigned__ the int16
msglen, char* ptrdest)
Description: The encrypt function of DES arithmetic
Parameters:
char *key Password that is encrypted ;Length is 8
Char* ptrsource :original text
Unsigned__ int16 msglen: length of original text multiple of 8
Char* ptrdest : secret content
Return:<0 error. Its absolute value is the error code
=0 correct
Example: IC_Encrypt;("12345678"," abcdefghabcdefgh",16, dest)
Use password "12345678"to encrypt "abcdefghabcdefgh" whose length is 16
Related Function:
__int16 __stdcall IC_Encrypt_Hex( char *key,char *ptrSource, unsigned __int16
msgLen, char *ptrDest)
12.__ the int16 IC_Decrypt( char* key, the char ptrsource, unsigned__ the int16
msglen, char* ptrdest)
Description: The decrypted function of DES arithmetic, the usage is contrary
to IC_Encrypt.
Related Function:
__int16 __stdcall IC_Decrypt_Hex( char *key,char *ptrSource, unsigned __int16
msgLen, char *ptrDest)
2._ the int16 IC_WriteProtection( the HANDLE ICDev,__ int16 Offset, __int16
len,unsigned char *ProtBuffer)
Description: Write protection bit of IC card
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
__int16 Offset –the start address of the I Cc a r
d’s protection bit that to write
__int16 len –length of data
unsigned char *ProtBuffer - buffer area that stores data ,To place the data
contents of the protection bit, its contents must be the same as the existing contents in
card, otherwise the write_ prot ec t
ionbi tc a
n’t be placed.
Return:<0 error.Its absolute value is error code.
=0 correct
Example:
ProtBuffer="DCIC"
IC_WriteProtection(ICDev,16,4,ProtBuffer)
Place the bits 16,17,18,19 protected
Related Function:
__int16 __stdcall IC_WriteProtection_Hex(HANDLE idComDev,__int16
offset,__int16 len,unsigned char *protbuffer)
2.__ the int16 IC_CpuApdu( the HANDLE ICDev, the unsigned char slen, the
unsigned char* sbuff, the unsigned char* rlen, the unsigned char* rbuff)
Description: the message exchange function of APDU( the application agreement data
unit) of the CPU card. This function has sealed the T=0 and T= 1 operation
Parameters:
int ICDev - the communication identifier that IC_InitComm returns
unsigned char *slen –length of the sending information
unsigned char * sbuff –databuffer that stores the sending information
unsigned char *rlen –length of the information that returns
unsigned char * rbuff –databuffer that stores the returning information
Return: <0 error.Its absolute value is error code
=0 correct.
Example:
int st;
unsigned char slen,rlen,sneddata[100], recdata[100];
slen=5;
senddata[0]=0x00;senddata[1]=0x84;senddata[2]=0x00;
senddata[3]=0x00;senddata[4]=0x04;
st= IC_CpuApdu ( icdev,slen,senddata,&rlen,recdata)
Related Function:
__int16 __stdcall IC_CpuApdu_Hex(HANDLE idComDev,unsigned char
slen,unsigned char * sendbuffer,unsigned char *rlen,unsigned char * databuffer)
5.__ the int16 IC_CpuSetProtocol( the HANDLE ICDev, unsigned char prtol)
Description: Establish the protocol of the CPU card
Parameters:
int ICDev - the communication identifier that IC_InitComm returns
unsigned char prtol --- set protocol 0 or 1
Return: <0 error. Its absolute value is error code
=0 correct
2.__ the int16 IC_ReadUserZone( the HANDLE ICDev,__ the int16 Offset,__ the
int16 len, the unsigned char* RDataBuff)
Description: Read data of userzone
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
int offset –the start address of data that to read
int len –length of data
unsigned char * buff –stores data that read from the userzone
Return:<0 error.Its absolute value is error code
=0 correct
Example:
IC_ReadUserZone (ICDev,0,16,buff)
Read 0-15 of data of current user zone to buff, returns 0 if correct.
Related Function:
__int16 __stdcall IC_ReadUserZone_Hex(HANDLE idComDev,__int16
Offset,__int16 len,unsigned char *RDataBuff)
4.__ the int16 IC_WriteUserZone( the HANDLE Dev,__ the int16 Offset,__ the
int16 len, the unsigned char* RDataBuff)
Description: write data of userzone
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
int offset - start address of data that to write
int len –length of data
unsigned char * buff –stores data that to write into the userzone
Return:<0 error.Its absolute value is error code
=0 correct
Example:
IC_WriteUserZone (ICDev,0,16,buff)
Write data of buffer into the current userzone 0-15,returns 0 if correct.
Related Function:
__int16 __stdcall IC_WriteUserZone_Hex(HANDLE idComDev,__int16
Offset,__int16 len,unsigned char *WDataBuff)
7.__ the int16 IC_WriteFuse( the HANDLE ICDev, unsgined char FuseType)
Description: Write the fuse
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
unsigned char fusetype - The fuse type, for 1608 that parameter of card are
invalid, for 153 that parameter of card mean: 1 fuse FAB,2 fuse CMA,3 fuse PER
Return:<0 error.Its absolute value is error code
=0 correct.
Example:
IC_WriteFuse (ICDev,3) 153 card PER of fuse
15.__ the int16 IC_InitAuth( the HANDLE idComDev, the unsigned char* Q0)
Description: initialize card authentication, send the random number Q0 into the card
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
unsigned char *Q0 --- Random character string
Return:<0 error .Its absolute value is error code.
=0 correct.
Example:
IC_InitAuth;( ICDev, Q0) initialize card authentication
Related Function:
__int16 __stdcall IC_InitAuth_Hex(HANDLE idComDev,unsigned char *Q0)
16.__ the int16 IC_CheckAuth( the HANDLE idComDev, the unsigned char*
Q1)
Description: The card authenticate host, send the authenticated data Q1 into the card
Parameters:
HANDLE ICDev - the communication identifier that IC_InitComm returns
unsigned char *Q1 --- authentication data character string
Return:<0 error.Its absolute value is error code.
=0 correct
Example:
IC_CheckAuth;( ICDev, Q1) Card authenticate host
Related Function:
__int16 __stdcall IC_CheckAuth_Hex(HANDLE idComDev,unsigned char *Q1)
17.__ the int16 SetInit( the unsigned char* Ci,unsigned char *Gc,unsigned char
*Q0)
Description: The host authentication initialization
Parameters:
unsigned char *Ci --- Encrypted number
unsigned char *Gc --- Key of encryption
unsigned char *Q0 --- Random number, authenticate with card
Return:<0 error.Its absolute value is error code.
=0 correct.
Example:
SetInit;( Ci, Gc, Q0) The host authentication initialization
Related Function:
__int16 SetInit_Hex (unsigned char *Ci, unsigned char *Gc,unsigned char *Q0)
18.__ the int16 Authenticate( the unsigned char* Q1, the unsigned char* Q2)
Description: The host Authentication card, form two authentication data
Parameters:
unsigned char *Q1 --- form card authentication data
unsigned char *Q2 --- form authentication card data
Return:<0 error.Its absolute value is error code.
=0 correct.
Example:
St= Authenticate( Q1, Q2)
st= IC_CheckAuth(Q1); The card authentication host,
st=0 means that the authentication pass, and rewrite the Ci. The host reads Ci and
comapare it with Q2, the host authentication card pass if they’are equal
Related Function:
__int16 __stdcall Authenticate_Hex(unsigned char *Q1,unsigned char *Q2)
160(0xa0) 01604/1604B