TCP Server Socket Problem
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: TCP Server Socket Problem
by becky ·
Hello,
In the same environment, using a different socket is no different.
Make sure that there are no differences in port settings or socket register settings.
Becky
RE: TCP Server Socket Problem
by lawrence WIZnet ·
hello, Jimbo
Seems you want to use 4 sockets all as TCP server. doesn’t it?
When you open 4 sockets as TCP Server, All socket has same source MAC and IP.
But only different is PORT number.
You must set different PORT number with each Socket. (refer Sn_PORTR)
With different PORT number, the client can connect to right Socket.
Thank you
lawrence
RE: RE: TCP Server Socket Problem
by Jimbo ·
Hi Lawrence,
I tried changing the port number for each socket with the same result.
I setup the socket, sent the listen, I get a status of 0x14. Then try and connect from my client app and get a 0x16 status returned and it does not progress onto 0x17. Even if I only open socket 1 without opening socket 0 I get the same result.
Thanks for your help.
Jimbo
RE: TCP Server Socket Problem
by lawrence WIZnet ·
hi Jimbo
If the socket states goes to 0x16, it means socket received [SYN] packet from client and sending [SYN ACK] to client.
But if the state does not changed to 0x17, I think client can not receive [SYN ACK].
If client can not receive [SYN ACK], must check the network condition.
So, could you let me know the network cofiguratino? how you connect between app and w5100.
What if try to send [SYN] from PC that connected directly to w5100, if PC has successful connection, it means everything is ok but network has some problem.
But even the pc has fail, it means the firmware has some problem.
Thank you
lawrence
RE: TCP Server Socket Problem
by Eugeny ·
Let me suspect your code does not handle odd socket registers properly - e.g. your code is writing to registers of socket 0 when you think you access registers of socket 1. Perform the dump of socket 1 registers when you see it stuck in 0x16 state, and confirm all needed information (you wrote before and the one has to be there per connection process) is present and set properly.