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

Well, I am certainly no expert on HTTP, *but*, if I look at how things work with my computer, when it requests a packet from my board there is only the SYN, SYN ACK, ACK handshake before the computer sends the GET command.

Now, when my board is the client, the issue I have is not [yet] whether the GET is working properly.

What is happening when lwIP board is client and desktop is server:

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.

You may well be totally correct that my GET line is incomplete, I cannot find any details on exactly how it should be, but I don't think that is the main issue at the moment. I'm happy to be told I'm talking nonsense though.

Thanks!



On 13/11/14 11:21, Simon Goldschmidt wrote:
Robert Wood wrote:
Hmmmm. I seem to be wrong, It *does* send out the ACK. I took out these
lines:
strcpy(GetString,"GET /index.html HTTP/1.1\r\n");
netconn_write(xNetConn,GetString,sizeof(GetString),NETCONN_NOCOPY);

As you seem to be trying to implement a HTTP client: are you familiar with the 
HTTP protocol? I'm not sure the single line is enough for HTTP 1.1 (it should 
be for 0.9), but at least you need a double line-break to inform the server 
that this is the end of the HTTP header.

I'd suggest reading a bit more on  HTTP.

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]