Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm trying to connecting RFID and biometrics devices in network, my loacal ip is 192.168.1.24 and the RFID device ip is 192.168.1.22, i'm using Visual studio 12 an sample windows application. to connect this device but it through an error "Unable to connect the device,error code = -201" . please do help thanks in advance.

What I have tried:

private void btnConnect_Click(object sender, EventArgs e)
{
if (txtIP.Text.Trim() == "" || txtPort.Text.Trim() == "")
{
MessageBox.Show("IP and Port cannot be null", "Error");
return;
}

int idwErrorCode = 0;
Cursor = Cursors.WaitCursor;

if (btnConnect.Text == "DisConnect")
{
axCZKEM1.Disconnect();

this.axCZKEM1.OnVerify -= new zkemkeeper._IZKEMEvents_OnVerifyEventHandler(axCZKEM1_OnVerify);
this.axCZKEM1.OnAttTransactionEx -= new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(axCZKEM1_OnAttTransactionEx);
this.axCZKEM1.OnNewUser -= new zkemkeeper._IZKEMEvents_OnNewUserEventHandler(axCZKEM1_OnNewUser);
this.axCZKEM1.OnHIDNum -= new zkemkeeper._IZKEMEvents_OnHIDNumEventHandler(axCZKEM1_OnHIDNum);
this.axCZKEM1.OnWriteCard -= new zkemkeeper._IZKEMEvents_OnWriteCardEventHandler(axCZKEM1_OnWriteCard);
this.axCZKEM1.OnEmptyCard -= new zkemkeeper._IZKEMEvents_OnEmptyCardEventHandler(axCZKEM1_OnEmptyCard);

bIsConnected = false;
btnConnect.Text = "Connect";
lblState.Text = "Current State:DisConnected";
Cursor = Cursors.Default;
return;
}

axCZKEM1.PullMode = 1;
bIsConnected = axCZKEM1.Connect_Net(txtIP.Text.Trim(), Convert.ToInt32(txtPort.Text.Trim()));


if (bIsConnected == true)
{
btnConnect.Text = "DisConnect";
btnConnect.Refresh();
lblState.Text = "Current State:Connected";
iMachineNumber = 1;//In fact,when you are using the tcp/ip communication,this parameter will be ignored,that is any integer will all right.Here we use 1.

if (axCZKEM1.RegEvent(iMachineNumber, 65535))//Here you can register the realtime events that you want to be triggered(the parameters 65535 means registering all)
{
this.axCZKEM1.OnVerify += new zkemkeeper._IZKEMEvents_OnVerifyEventHandler(axCZKEM1_OnVerify);
this.axCZKEM1.OnAttTransactionEx += new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(axCZKEM1_OnAttTransactionEx);
this.axCZKEM1.OnNewUser += new zkemkeeper._IZKEMEvents_OnNewUserEventHandler(axCZKEM1_OnNewUser);
this.axCZKEM1.OnHIDNum += new zkemkeeper._IZKEMEvents_OnHIDNumEventHandler(axCZKEM1_OnHIDNum);
this.axCZKEM1.OnWriteCard += new zkemkeeper._IZKEMEvents_OnWriteCardEventHandler(axCZKEM1_OnWriteCard);
this.axCZKEM1.OnEmptyCard += new zkemkeeper._IZKEMEvents_OnEmptyCardEventHandler(axCZKEM1_OnEmptyCard);
}

MyCountFinger = 1;
MyCountFace = 2;

}
else
{
axCZKEM1.GetLastError(ref idwErrorCode);
MessageBox.Show("Unable to connect the device,ErrorCode=" + idwErrorCode.ToString(), "Error");
}
Cursor = Cursors.Default;
}
Posted
Updated 14-Apr-21 3:59am
Comments
Richard MacCutchan 9-Feb-16 4:16am    
You will probably get an answer quicker by talking to the people who created the SDK.
jk.deso@gmail.com 9-Feb-16 6:03am    
i talked with the essl support team but i'm helpless
Richard MacCutchan 9-Feb-16 6:05am    
But they are the people who understand this SDK.
jk.deso@gmail.com 9-Feb-16 6:10am    
The company is not providing me the contact details of the development team that is what the problem is.
Richard MacCutchan 9-Feb-16 11:20am    
Then I suggest you demand your money back.

1 solution

Were you able to resolve the -201 error? I have the same problem :/
 
Share this answer
 
Comments
Richard Deeming 14-Apr-21 10:37am    
"Me too" is not a solution to this question.

If you want to ask for more information, click the "Have a Question or Comment?" button under the question and post a comment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900