Project

General

Profile

TCP IP Client help required.

Added by CdRsKuLL over 6 years ago

Hi peeps,

I was wondering if anyone could help me with the following project.

I’ve been tasked to make a time and attendance clocking system and this is really the last piece I need in the project.

So far.. I’m using a Arduino Uno / RF Reader / LCD Sheild / ENC Network card with the ethercard library. The idea is, a person scans there RF tag, the arduino connects to a VB.net server passing the rf’s serial number. The vb.net server then goes to a accdb database, retrieves the persons name and there last status (IN/OUT). It then records the present time and sends the persons name / status back to the arduino.

So far I’ve found and adapted some vb.net to do the database polling and it works great with the supplied vb.net client for testing. The last bit I need to write is the tcpip client.

From what I understand and have read this should be possible from the ethercard library. So, this is what I was thinking regarding the arduino code;

When you connect it to the network it’s assigned an IP via DCHP (I’m ok with this, working fine)
It opens a connection to the tcpip server (I think I need to set something to true to keep this connection open?)
It then sends a command like “name:23423” which would be name = name request / 23423 = rf serial.
The server responses and the arduino then displays this on it’s LCD display.

The bit I’m unsure of is the open link / send / receive bit. Also, if the connection is broken it would need to re-make it.

Sorry if all this sounds a bit vague but I’ve not approached this networking side before, been more the com port communication I’ve done.

Has anyone done a tcp client before that I could look at it please?

Many thanks,

Great forum, even though I only understand about 2% of it all.. lol :-)

Steve