I have set up a TCP server on the wiz550io that is listening on port 80.
When i send a GET request from a web browser(safari seems to work best, but ill get to that later), i read the RXbuffer and it always seems to miss the first few lines of the GET request. The other data that i see in wireshark shows up but i miss out on the actual “GET” part of the request.
I am not using the interrupt method outlined in the documentation, i just poll the Sn_SR, once the sock_established happens i and confirm there is TCP data by using the if(Sn_RX_RSR0!=0x0000) call
once i detect something i get the length of the Sn_RX_RSR
then i read the pointer from the Sn_RX_RD
once i have the pointer and the length i read from the RX buffer into an Array, once i’ve reached the length, i ADD the length i’ve read to the Sn_RX_RD register, then set the Sn_CR = to RECV.
The one thing i notice is if i resend a HTTP request again, then the pointer Sn_RX_RD is the same value as the previous request. I would assume when the next request comes in, the RX buffer pointer should have a new value that is the old value, plus the length of the previous packet.
I am implementing this for a school project on a ZiLog Z8 micro controller so any help would be greatly appreciated. I will post some snippets of code and the debugging data i get from REALTERM asap.
Also if i use firefox or chrome, the array that i copied the RX buffer into looks like all garbled data.
The only browser that seems to elicit some kind of desired response is Safari albeit the first park of the packet is gone. which would make it impossible to tell if i received a Post or a GET command.
Absolutely ANY help would be greatly appreciated
Thanks