lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Pulling data from a server using HTTP with lwIP


From: Robert Wood
Subject: Re: [lwip-users] Pulling data from a server using HTTP with lwIP
Date: Thu, 13 Nov 2014 16:45:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hi Simon,

It's starting to fall in to place now.

I have:

ip.addr==192.168.0.205

In the Wireshark filter. I had assumed that when I exported that as the pcap then it would only export the filtered transactions. Having loaded that and cleared the filter I can see that is the case.

If you put that in, you will see that the only traffic is between:

192.168.0.205 (client - lwIP board)
192.168.0.87 (Server. Linux desktop running Apach server with a very simple index.html as the sole file.)

So, in ack_but_no_get.pcap, the three relevant packets are 23, 24 and 25.

In no_ack_but_get.pcapm the four relevant packets are 52, 53, 54 and 55.

With packets 23, 24 and 25, that is the correct handshake.

With 52 and 53, that is the client attempting to do the handshake, but the GET command [presumably] overwriting the ACK command similar to what went out in packet 25.

However, you were right in what you were trying to tell me and I was wrong in my major assumption. If I change the GET line to be:

"GET /index.html HTTP/1.0\r\n\r\n"

I get a correct response back.

What I just wasn't understanding was your point about the ACK being sent out in the GET packet. I just wasn't getting that you didn't have to have a separate packet with the ACK, but that you could bundle it up with the GET. I especially wasn't getting it, because I didn't understand that lwIP obviously does that for you automatically.

Also, Mikael's email got delayed because that's only just shown up. :-/

I am now slightly concerned that it only works if I use

"GET /index.html HTTP/1.0\r\n\r\n"

And not:

"GET /index.html HTTP/1.1\r\n\r\n"

Does that mean I can't use HTTP 1.1 or is it simply I have to put extra information in the GET string?

Many thanks for your patience, it is much appreciated.

Rob



On 13/11/14 16:13, Simon Goldschmidt wrote:
Robert Wood wrote:
Sorry, I'm obviously still not explaining this clearly.

I don't really think that this is our problem...


To get a grip on this, could you please explain your pcaps:

- which IP is lwIP, which IP is the remote host in question (there are plenty 
of hosts in your pcap file, not only 2!)
- which packet numbers are you talking about?
- which packet number exactly is the one you wouldn't expect, or in other 
words, where would the missing ACK be inserted?

I can again try to explain why *I* think that packet #54 in 
"no_ack_but_get.pcap" is correct: I think you are expecting an ACK packet here 
(note that an [ACK] packet is only a description of wireshark: in TCP, this is a packet 
with the ACK flag set but no user data contained).

Instead of this packet (ACK but no data) you get the "GET" request, which in 
TCP is ACK+DATA. This is perfectly valid to me.

Maybe you should tell us what the real problem is. I think your real problem is the 
missing HTTP answer. So why not start and send a correct HTTP request? Like Mikale Eiman 
wrote, "GET /index.html HTTP/1.0\r\n\r\n" (double newline at the end) should be 
enough when the send length is correct (you seem to be sending invalid data after the 
HTTP header!).


Hope that helps,
Simon

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]