Windows Tcp client app can't connect W5200 server

#1

Hi
Anyone can try to connect W5200 TCP server with windows’s client apps?

I’m use the source of W5200_TCP_and_UDP_SampleCode_v1.3.
And ping and AX1 loopback test are OK.

I’m going to connect other TCP client application to W5200 server mode.
But it’s not OK.
I’m used windows socket api.
Simple code is :

CSocket socket;
socket.Create(0);
if(socket.Connect(_T(“192.168.x.x”), 5000)) AfxMessageBox(_T(“socket opend”));
else AfxMessageBox(_T(“socket not opend”));

here 192.168.x.x : server ip in W5200

Anyone help or advice me?

#2

Hi,

I think it is port number problem.

Windows is hold port number before connected although socket is disconnected.

So try to change port number every time when you want to connect.

Thanks.

#3

hiieon0608,
Thanks your help!

I’m reinitialize w5200’s source and now connect test is OK.

In there, how can send the data(or command) to server (ie: w5200)?

Thanks advance!

#4

Hmmm…

I don’t know what is client app so, I cannot answer…

#5

Thanks!
I want to connect PC to w5200 with Internet.
PC has a client application with MFC Csocket API.
Now I’m simple test success with modified W5200 TCP- UDP source code.

continue work!

#6

Hi,

CSocket class support also blocked function Receive(), Send(), ReceiveFrom() and SendTo().

After connection is established, just call the above functioins.

For Async socket, refer to MSDN documents.

thank you.