Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20638

EASY TCP/IP : bug in PING sample? : NEWTOPIC

$
0
0
Hi! I'm using a W5200 in a WIZ820IO. It pings a couple of IPs (and does a lot more). I encoutered some problems, the ram appeared corrupted after the ping. I found out, that the ping-answer from the pinged IP is 15 bytes long. The ping sample expects only 12 bytes to receive: dim Rec(12) As Byte. So if I read 15 bytes to clear the buffer, 3 bytes are written anywhere into the RAM. I do not know much about the ping protocol, maybe some day I will receive 20 Bytes? Here is my solution: As I do not care about the content of the ping answer (the sample does not too), I read the W5200 buffer only into ONE dummy-byte: dim rec as byte Res = Tcpread(idx , Rec , Result) 'get data with TCPREAD !!! Am I right so far? If so, maybe the sample should be changed. If you use ping according to the sample, you should check this issue, because sometimes you do not recognize a corrupted RAM, until some fine day strange things happen.

Viewing all articles
Browse latest Browse all 20638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>