C# Realtime Biometric Server Implementation (RS9, RS10, RS20, C121ta, T52, T60)


This blog post is written as a C# getting started guide while working with a Realtime biometric device in a windows forms application. This is going to be of a 2 series blog post.

  1. Working directly with the device on the clients machine.
  2. Working remotely with the device in the server side.

This one particularly focuses on the second one, server side implementation (Auto push technology) of the device.

The provided steps and source code snippets will help you to successfully setup and test out the FP  Server application in your computer.

The FP Server

The FP Server is a server side application that retrieves the fingerprint attendance logs from a remote device on real time.

i.e After you have configured the Server endpoint (Server IP and Port) on your Realtime fingerprint device, the next time you take attendance/fingerprint from the device, the logs are directly sent to the remote server instantly on real time.

Table Of Contents

Device Specifications

This blog intends to provide solution for the device models that are listed below. For a complete list of hardware specifications, follow the link embedded in the model names.


Model : T60

FP Users : 3,000/5,000

Card User : 3,000/5,000/10,000

Password User : 3,000/5,000

Attendance Records : 100,000/300,000

Comn : RS485, USB Drive/Link, TCP/IP


Model : C121ta

FP Users : 1,000

Card User : 1,000

Password User : 1,000

Attendance Records : 100,000

Comn. : RS485, USB Drive/Link, TCP/IP


Model : RS20, RS10, RS9

FP Users: 3,000

Card User : 3,000

Password User : 3,000

Attendance Records : 2,00,000

Comn. : Wi-fi, USB Drive/Link, TCP/IP

Model : T52

FP Users : 1,000/3,000/5,000

Card User : 1,000/3,000/5,000/10,000

Password User : 1,000/3,000/5,000

Attendance Records : 100,000

Comn : RS485, USB Drive/Link, TCP/IP


Biometric Devices are being used extensively in many corporations through out the world these days. They are widely used in various fields like social insurance, public security, time attendance, fingerprint encryption, embedded systems and many others.

Companies like Realtime Biometrics manufacture biometric access control and Time and Attendance in various shapes and sizes with different set of features per model. They provide a better way of user authentication and security in organizations comparing to the traditional authentication and authorization mechanisms.

Implementing The SDK

In order to integrate a Realtime biometric device into your application, you first need to successfully setup the sdk toolkit in your local computer. If you have not grabbed a copy of the sdk, go ahead and download a copy of the SDK for your device model from here.

You will also need to download the necessary dlls which can be found in the link entitled ‘Web Attendance Application‘ in the same page.

Once you have a copy of the sdk, Lets see how you can get it installed on your PC.

Step 1 - Install The Necessary Driver

In the SDK bundle, look for a folder containing a file called ‘FPCLOCK_Svr.ocx‘. Once you have located it, you need to register it along with the other provided dlls within that folder, in your system.

The best practice is to copy all the files into your respected systems directory and register them. To have it done in an instant, perform the following steps :

  • Create a register.bat file in that same folder and paste in the following code.
  • Open up a command prompt in the administration mode and execute the register.bat file.

This will copy the FPClock_Svr.ocx file along with the other necessary files in that folder to one of your systems directory depending on your systems architecture. After copying the files, it will then register it in the system.

If you wish to verify that you have successfully performed the above step, you can perform a query to the systems registry and see if your file is there. Here is how you do it :

  • Open a command prompt
  • Execute the following command

Step 2 - Add Reference To The Necessary Class Library

The next thing you need to do is to add up the FPCLOCK_Svr Control in your windows form application.

Here is how you do it :

  1. In the Toolbar, Right click and Press > Choose Items …
  2. Navigate to the COM Components Section
  3. Locate the control with the name FPCLOCK_Svr Control
  4. Click then checkbox and Press OK
  5. You can now drag the control and place it in your windows form.
Doing this will also include two references to your project references as follows:
Realtime Server Control References

You are now ready to implement the code.

Using The Code

The first thing to do is open the network to listen to incoming requests.

Open The Network

The first thing to do is open the network to listen for incoming requests. Here is the code for it :


public void OpenNetwork()
    int result = fpClockServer.OpenNetwork(serverPortNumber); 
    if(result == 1) 
        // All Good 
        // Something terribly went wrong 

Register To An OnReceiveGLogData Event

This is the where the log data sent by the client devices are obtained.

You need to register to the event named OnReceiveGLogData that is provided by the FPCLOCK_Svr Control.

private void axFPCLOCK_Svr1_OnReceiveGLogData_1(object sender, _DFPCLOCK_SvrEvents_OnReceiveGLogDataEvent e)
    String strKey = Convert.ToString(nIndex + 1);
    String str = e.anSEnrollNumber.ToString("D8");


    ListViewItem listViewItem = new ListViewItem();
    listViewItem.Text = strKey;


    str = Helpers.FormString(e.anVerifyMode, e.anSEnrollNumber);

    if (e.anInOutMode == 1)
        str = "OUT";
    else if (0 == e.anInOutMode)
        str = "IN";
        str = "--";

    str = Convert.ToString(e.anLogDate.ToString("yyyy/MM/dd HH:mm"));


    str = Convert.ToString(e.anDevicePort);

    str = Convert.ToString(e.vnDeviceID);

    str = Convert.ToString(e.linkindex);




    int nResult = 1;

    fpClockServer.SendResultandTime(e.linkindex, e.vnDeviceID, e.anSEnrollNumber, nResult);


Close The Network

After your work is done, you can close the network and stop listening to any incoming request.


public void CloseNetwork()
   int result = fpClockServer.CloseNetwork(serverPortNumber);
   if (result == 0)
       // Network Closed
       // Something went wrong

Head over to the GitHub code sample and see it in full action.

Go Beyond the frontiers of yourself. Peace !!!

FP Server Demo

You may also like...

8 Responses

  1. negar says:

    Hi Ozesh
    Sorry my English is not good.
    I am writing a program with C # to get information about logging in and out of ZKTeco devices.
    I read your article in the code project (C # ZKTeco Biometric Device Getting Started) Thank you for this article.
    If possible, try to help me with the following:
    1. Can I get login and exit information from several devices simultaneously and in real-time?
    2. How can I get personnel images from the device and display them in the program?
    Thank you very much

  2. negar says:

    Thank you so much for me answer.
    I can receive information from a device using the RealTimeEvent function.
    But I can not do a few devices.
    The previous device is disconnected when a new device is connected.
    What is the solution to this problem?
    Thank you

    • Ozesh says:

      If you are using the code that I provided in GitHub :
      The code currently only works for a single instance (It works with only one device at a time).

      —— Note the ZkemClient object here ——

      i.e If you connect with one device at a particular time and at the same time you try connecting with the other device, then the object ‘objZkeeper’ that is holding the instance of the previous device gets ‘re-initialized’.

      A better option for you would be to maintain multiple instances (may be a list) of the ZkemClient to handle multiple devices.

  3. Ashiful Arefin says:

    Thank you for the article it was very helpful.
    My question is will the C# Realtime Biometric Server Implementation handle multiple devices?

  4. Sabbir Ahmed says:

    Hello Ozesh,
    I am trying to get attendance data in real time. I am using T52. I downloaded your sample code and also follow the process that you have described. I ran the project in my local computer by visual studio. I am able to connect network from windows application that you uploaded in github. But unfortunately data is not showing in grid. I have connected my T52 with router. The machine IP and my development computer ip is Can you please help me?

Leave a Reply

Your email address will not be published.