Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to synchronize with the Time and Attendance Machine. 1

Status
Not open for further replies.

abbasaif

ISP
Oct 8, 2018
89
AE
Hi,

We have fingerTec device relating to the above mentioned subject.

Kindly let me know how can I connect with it. I am using the following command.

I have downloaded the FingerTec BioBridge SDK for connecting the above mentioned device using the following code:

Code:
Parameters devModel, i, ipAdd, portNo, comm

If Connect_TCPIP(devModel, i, ipAdd, portNo, comm) = 0
   MESSAGEBOX("Connection Successfull",16)
ELSE
   MESSAGEBOX("Connection Failed",16)
ENDIF 


And, in Connect_TCPIP.Prg, I put the following:

Parameters devModel, i, ipAdd, portNo, comm

devModel = "FaceID2"
i = 6
ipAdd = "192.xxx.xxx.xxx"
portNo = 4370
comm = 0

When running the form gives the error "Operator/Operand type mismatch."

Please guide me, how to connect the device. The Original code from fingertec is as follows:

[Method]
Connect_TCPIP(string DeviceModel, int DeviceNo, string IpAddress, int PortNo, int
Com mKey)
[Feature]
Connect to a device using TCP/IP protocol.
[Parameter Declaration]

DeviceModel = Device model. (e.g. AC100, AC800. Attn: Please specify the device model
AC100PLUS as ‘AC100+’ and AC800PLUS as ‘AC800+’ string to obtain the work code.)
DeviceNo = Device number. (e.g. 1, 2, 3)
IpAddress = Device IP addresses. (e.g. 192.168.1.0)
PortNo = Port number (default 4370)
CommKey = Communication key for authorised access, refer SetDeviceCommKey()

(default 0)
[Return Value]
Return 0 for success, or –1 for fail.
[Example]

Dim devModel, i, ipAdd, porNo, comm.

devModel = AC100
i = 1
ipAdd = “192.168.1.3”
portNo = 4370
comm = 0

If FingerTec.Connect_TCPIP(devModel, i, ipAdd, portNo, comm) = 0 Then
MsgBox (“Connected”)
Else
MsgBox (“Connection Failed”)
End If
 
Please format your code, so that it's readable. Mark a code segment, and press the Pre button. Repeat for the other code segments.
 
Use debugger to find which comment results in "Operator/Operand type mismatch"
Koen
 
Thanks

In the init of the form.

Code:
If Connect_TCPIP(devModel, i, ipAdd, portNo, comm) = 0
   MESSAGEBOX("Connection Successfull",16)
ELSE
   MESSAGEBOX("Connection Failed",16)
ENDIF

and in a prg, the code is:

And, in Connect_TCPIP.Prg, I put the following:

Code:
Parameters devModel, i, ipAdd, portNo, comm

devModel = "FaceID2"
i = 6
ipAdd = "192.xxx.xxx.xxx"
portNo = 4370
comm = 0

 
Your code is not even using the SDK and is wrong on so many levels I don't even know where to start, eg calling a function without first declaring the parameters you want to pass in and then declaring variables after you receive them as parameters. You're not asked to define your own PRG with that parameterization, the SDK has to be used, some DLL or OLE class, what is it?

If it's a DLL you need to use [tt]DECLARE LONG Connect_TCPIP IN some.dll STRING, LONG, STRING, LONG, LONG[/tt], if it's an OLE class you need to create an instance eg loInterace = CREATEOBJECT("...") with ... a name of an OLE class of the SDK and then call loInterface.Connect_TCPIP(...).

Bye, Olaf.

Olaf Doschke Software Engineering
 
Hi,

I just wanted to connect my VFP Application with the Time and Attendance device.
But I don't know how to connect, I just download the SDK from net as suggested by somebody.

Please guide me.

Thanks
 
I would like to help, but without even knowing what files you get with the SDK and what type of interface this is, DLL, OCX, EXE... I don't know what you need. The mere function definítion doesn't help to guide you.

If it's a DLL it could be a DLL llike the WinAPI with function you can DECLARE or it could be an assemlby.

You already got the necessary code to DECLARE that function, [highlight #FCE94F]if it's a standard DLL[/highlight] (not an assembly) but there will surely be more functions to declare:
Code:
CD [highlight #FCE94F]C:\dowloads\sdkfolder[/highlight]
DECLARE LONG Connect_TCPIP IN [highlight #FCE94F]fingerteksdk[/highlight].dll STRING, LONG, STRING, LONG, LONG

*Test call:
? Connect_TCPIP("FaceID2", 6, "192.168.1.3", 4370, 0)

I highlighted what you need to adapt to your situation.

What I can't do is download the SDK and test it myself, I lack the time and attendance machine.
If you can't even describe what you have at hand you can only get vague help, sorry.

But also, please spare from going from almost no information to pointing to your download or uploading the manual. This is only a forum. You should at least be able to tell what type of SDK this is, otherwise I would ask you to make better choices about the hardware you buy and first ensure you can get an SDK you can understand and use in VFP or use another programming language for which the SDK provides samples, if just to develop something you then can use from VFP, like an EXE you can call with parameters. or a COM-enabled assembly. Visual Studio Community Edition is free and offers project types for these types of projects like a console application or an assembly.

Bye, Olaf.

Olaf Doschke Software Engineering
 
I just download the SDK from net as suggested by somebody.

It's never a good idea to "just download", without understanding the concept behind whatever it is you are trying to achieve. You should start by studying the documentation for the device and the SDK.

I don't know anything about this product, but a quick glance at the Fingertex website indicates that documentation is available, and there's also a tech support facility.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top