WIZnet Developer Forum

W5500 as TCP client POSTing failures

Hello all:
I have designed a custom board around W5500 for uploading data logger data to my server.
Every thing is OK until the SEND process:
I am sending a POST in order to get success response from the server as HTTP/1 200 OK but most of the time I see that the post string is wrapped with “endless garbage bytes” sent along with it.
The strange thing is that some times it do send the post right and server response is OK!!
I thought that handling of TX_WR is not right but when I got OK few times I got confused
Same code behave differently…

see below log:
partial log of connection and sending:

.Wait for CONNECT… - waiting for connection loop
.Wait for CONNECT…
.Wait for CONNECT…
wiz5500 connected to server…
.SENDing 0x0096 bytes (sending a post to server)
.ptr_WR = 0x00b8 - initiated WR pointer value
.ptr_RD = 0x00b8

.len = 0096. - data lengh
.ddrsel = b810 - writing address


.Sn_IR_SENDOK… - data have sent ok
.ptr_WR = 004e - WR pointer after sending ( expect 0x00B8+0x0096 = 0x014E )
.ptr_RD = 004e
.Socket closed…

Please explain why TX_WR value after sending is not original value + data lengh as expected. Most sig byte is 00 while should be 01…

POST sent to the server:

POST /update HTTP/1.1
Content-Type: application/octet-stream
Accept: /
User-Agent: Creacell/1.0. Content-Length: 0…

Server response if success:

HTTP/1.1 200 OK
X-Powered-By: Express
Date: Fri, 12 Jun 2020 20:20:42 GMT
Connection: keep-alive
Content-Length: 0

Any advise will be much appreciated.

I tested TX_WR before and after sending bytes. But it works well.
I don’t think it’s a pointer problem. There must be a http protocol problem.

Please refer the link below.


Thanks for your mail.
I am sure pointer work as expected.

My first problem is that I get a lot of extra bytes when sending regular POST to my server and I wondered whether it
due to pointers handling problem…
It strange because the same code some times does send the POST ok and the server response to it as expected, but its rear…!
Any idea will be very helpful, as I am “studying” the module from scratch…!

Hi again:
I am using ATMEL uP as my embedded.

Is it possible that I have to change the data structure? (little/big-endian issue)?
Is it possible that W5500 is sending the whole buffer and wrapped to the RX pointer again?
Please advise…

Sorry, in last mail I meant TX pointer, not RX…

I don’t think it’s a endian or pointer problem.
Before you do it with our IC, please test it with https://reqbin.com/ <- this kind of site first.
And if it’s possible,

  1. let us know about your test environment more detail.
  2. share the wireshark packet capture.


Hi Peter:
Problem solved and everything works nice now…
I have recompiled with the last version of ioLibraray files and all have been settled…

1 Like

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.