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 13:22:43 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

It's not quite like that, I'm not explaining very well. I'll try again. :~)

If I send the GET command out, then my board does not send the ACK to the server for the SYN, SYN ACK, ACK handshake. This is what happens. Bear in mind the lwIP board is the client in this case.

Here are two different In both cases I do this in the lwIP client thread:

    IP4_ADDR(&local_ip,emacIPADDR0,emacIPADDR1,emacIPADDR2,emacIPADDR3);
    rc1 = netconn_bind ( xNetConn, &local_ip, 0 );
    IP4_ADDR(&remote_ip,192,168,0,87);
    rc2 = netconn_connect ( xNetConn, &remote_ip, 80 );

Scenario 1:

In this case I do not send a GET request out.

Client -> SYN (Server receives this)
Server -> SYN ACK (Client receives this)
Client -> ACK (Server receives this)

Scenario 2:

In this case I send the GET command out.

Client -> SYN (Server receives this)
Server -> SYN ACK (Client receives this)
Client -> GET Command

So, in scenario 2, the client is not sending out the ACK in the initial handshake. I'm assuming it's because I need to wait for the lwIP stack to send the ACK. I'm assuming anyway. If that is the case, how does my thread know when the stack has sent the ACK to the server and I am at liberty to send the GET request?

I hope I've made that clearer. :~)

I'm probably doing naive things because I'm trying to learn a lot of stuff at the moment!

On 13/11/14 13:09, Simon Goldschmidt wrote:
Robert Wood wrote:
If I establish a connection from the board to the desktop and do not
send a GET request, then lwIP does the SYN, SYN ACK, ACK handshake just
fine.

If I add the [potentially incorrect] GET request, the SYNN is sent, the
SYN ACK is received, but my board running lwIP does not send the ACK out
to the desktop.

Does it piggy-back the ACK on your GET request or is the GET request not even 
sent out? I'd expect to see the GET request along with the handshake-ACK.Then, 
the webserver will eventually time out waiting for the double-CRLF.

However, if lwIP does not send ANYTHING after receiving the SYN-ACK, there's 
something wrong... :-/

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]