Stuck on socket listen
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: Stuck on socket listen
by Eugeny ·
There’re more bits in Sn_IR which may be set during socket lifetime. If you are not using interrupts you may consider polling the Sn_SR register instead. Please refer to W5100 datasheet chapter 5.
RE: RE: Stuck on socket listen
by samy haouara ·
I’m using the W5500, while reading the datasheet, i don’t see other Sn_IR, i check every second the Sn SR register, and it gives 0x14, its the listening state. But when i try to connect, it’s expressly refused by the W5500’s server socket.
I refresh every second the socket status = Sn_SR, it give 0 and the listen status is 1.
The connection from a client is still refused.
RE: Stuck on socket listen
by Eugeny ·
Check the Sn_SR states, 0 means socket got closed. And of course, when socket is closed, all connections go nowhere. So your goal to identify what happens first time and where socket transitions from 0x14 and to where it transitions, and ensure you reopen socket into listening after it got closed.
RE: Stuck on socket listen
by samy haouara ·
Thank you for your time Eugeny, i made it work with the no delayed ack while creating the socket, and then i had my connection established.
If anyone else has this issue, here the socket definition
uint8_t tcp_socket = socket(sn, 0x01, 50000, SF_TCP_NODELAY);