UDP server stop working after a while
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: UDP server stop working after a while
by Eugeny ·
Thus the problem is that at some point in time W5500 stops receiving broadcast packets, right?
Do W5500-based TCP servers continue working when it happens?
If yes, please make dump of all the registers from UDP socket to see if they are not corrupt and still reflect proper operating mode. Also please dump Sn_RXBUF_SIZE of all sockets to ensure they all are still configured properly and space does not exceed size of RX memory.
RE: UDP server stop working after a while
by cio74 ·
Yes, all the other TCP sockets are working fine.
I get your point but the question is when to check the registers? Shall I assume that if GetSn_SR returns SOCK_UDP there is always something in the receive buffer and the size returned by getSn_RX_RSR should be always greater than 0? And if it’s 0 then something is wrong and I shall check the registry?
Thanks.
RE: UDP server stop working after a while
by Eugeny ·
Works = W5500 receives packets. Stops working = remote device sends packets, but W5500 does not receive them (RSR is 0).
Check when it stops working = something has changed, we need to ensure that everything on W5500 side is intact.
If W5500’s registers are ok, then probably something wrong is with packets - check them using Wireshark to see that they contain what you expect W5500 to get (in terms of UDP header and packet contents).
You send broadcast packets and you will be able to see them using any device on the same physical network.
RE: UDP server stop working after a while
by cio74 ·
I am using Wireshark for debugging, that’s how I see what’s being sent and received, I’ll add the registers dump code and hopefully capture an exception to check what’s in there.
I’ll keep you posted.
RE: UDP server stop working after a while
by cio74 ·
Not sure about that, I got 0 received length at startup, before sending anything. reg dumps
getSn_MR 02
getSn_CR 00
getSn_IMR 1F
getSn_IR 00
getSn_SR 22
getSn_MSSR C0
getSn_TX_RD 00
getSn_RX_RD 00
getSn_TX_FSR 00
getSn_KPALVTR 00
UDP getSn_RXBUF_SIZE 01
UDP getSn_TXBUF_SIZE 01
FW getSn_RXBUF_SIZE 02
FW getSn_TXBUF_SIZE 02
WEB SERVER getSn_RXBUF_SIZE 04
WEB SERVER regWEB_Sn_TXBUF_SIZE 04
TCP Client getSn_RXBUF_SIZE 00
TCP Client getSn_TXBUF_SIZE 00
TCP Server getSn_RXBUF_SIZE 08
TCP Server getSn_TXBUF_SIZE 08
TCP client was not initialized at that point.
All buffers are fine, as per socket buffer definition:
uint8_t txSize[WIZCHIP_MAX_SOC_NUM] = {0,0,8,4,2,1,1,0};
uint8_t rxSize[WIZCHIP_MAX_SOC_NUM] = {0,0,8,4,2,1,1,0};
However, it works and does reply to packets, when no packets are sent by PC client getSn_RX_RSR returns 0.
RE: UDP server stop working after a while
by Eugeny ·
I am sorry I do not understand you. RSR is received data size. If nothing is received, it is 0. It is normal state, nothing special about it.
If chip did not receive anything its RSR is 0, and this is how you identify if it received anything.
In the dump below you write
This is strange because if TX buffer is empty it is set to maximum 0x800, and it is two byte (word) value, you display it as one byte. I would expect you identifying it as 0000 or 0800 (this is how it normally looks like if there’s nothing in TX buffer to send).
RE: UDP server stop working after a while
by cio74 ·
Obviously we were talking about different things, I was asking if the recv value of 0 means there is a fault and I have thought it is.
Shall RTFM but I won’t exactly call W5500 datasheet a good source of info. Same about W5100, just basics.
Is anyone using this chip in a commercial product or is all hobby development?
RE: UDP server stop working after a while
by Eugeny ·
Yes please study W5100 - it seems to have more useful information on how to use the chip family.
Let’s think about it differently - can the chip family satisfy commercial product’s requirements? I do not know about WIZnet strategy regarding their product development and product roadmap, but it is clear that products are having hardware limitations (like buffer memory and number of sockets) which can not be changed by additional hardware design (e.g. by adding SRAM chip to get more socket memory), but at the same time WIZnet chips provide extremely easy product development if you know how to apply them properly.
RE: UDP server stop working after a while
by cio74 ·
Lets read between the lines and agree it’s not suitable for commercial products, a good commercial product has good support, this one does not. I am quite certain you can’t get support even if you want to pay for it. Should be good enough for a hobby project tho.
About “if you know how to” well, people don’t get the knowledge from the sky. They read proper documents with proper examples and case studies. When they don’t have these they spend time debugging and understanding how it works. May as well ask in a forum where no one from the manufacturer bother to reply. Rant over, going back to the datasheet
RE: UDP server stop working after a while
by Eugeny ·
[quote=“cio74”]I am quite certain you can’t get support even if you want to pay for it. Should be good enough for a hobby project tho.
…
When they don’t have these they spend time debugging and understanding how it works.
[/quote]
That’s why I am here… I got to know how it works - you can look at the history of my posts - we have eaten a ton of sh*t together with WIZnet people until we found out what was wrong with my design.