Re: thttpd question (TCP close problem?)

2020-01-12 Thread Adam Feuer
Greg, Thanks, I will try to use the host client programs. I just need to see if I can get them compiled on Linux. Re: link speed, 100 Mbps using Ethernet over USB would work. Higher would be better. The network I want this to work on is just from the NuttX box to the host computer. The host is di

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Gregory Nutt
Thanks, that document is very helpful. I set up TCP Blaster as a client, not a server, just because it was easier for me to send data from Linux with netcat. I'll try it as a server, I just have to look up the right netcat params. I am not sure if you should not use netcat.  When you build a

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Adam Feuer
Thanks, that document is very helpful. I set up TCP Blaster as a client, not a server, just because it was easier for me to send data from Linux with netcat. I'll try it as a server, I just have to look up the right netcat params. I am glad to hear from you that's your experience was that NuttX is

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Gregory Nutt
Ok, thanks. I did do that yesterday with tcpdump while trying to find the closing-early problem with the header lengths. Now with the header length calculation things look good– at low speeds, the packet exchange matches what I am getting from a Linux web server. No retransmissions, resets, or

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Adam Feuer
Greg, Ok, thanks. I did do that yesterday with tcpdump while trying to find the closing-early problem with the header lengths. Now with the header length calculation things look good– at low speeds, the packet exchange matches what I am getting from a Linux web server. No retransmissions, resets,

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Gregory Nutt
The first thing I would do would be to use Wireshark to see what exactly the timing on the network is. Greg, Thanks- that sounds good. Would you be willing to say more about this? What exactly would you look for? You should see the connection, the HTTP requests and the HTTP responses, and

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Adam Feuer
> The first thing I would do would be to use Wireshark to see what exactly > the timing on the network is. > Greg, Thanks- that sounds good. Would you be willing to say more about this? What exactly would you look for? I also plan to hook up a gigabit Ethernet from the board to my laptop to see

Re: thttpd question (TCP close problem?)

2020-01-12 Thread Gregory Nutt
It was a bug in thttpd – it wasn't accounting for the length of the headers properly. I'll make a PR for it once I get a few other issues worked out. The thttpd performance is a lot worse then uIP webserver– this shouldn't be the case. Maybe there is a resource bottleneck of some kind. I tried

Re: thttpd question (TCP close problem?)

2020-01-11 Thread Adam Feuer
It was a bug in thttpd – it wasn't accounting for the length of the headers properly. I'll make a PR for it once I get a few other issues worked out. The thttpd performance is a lot worse then uIP webserver– this shouldn't be the case. Maybe there is a resource bottleneck of some kind. I tried adj

Re: thttpd question (TCP close problem?)

2020-01-11 Thread Adam Feuer
I am thinking it's not the TCP close problem... I'm debugging, it's starting to look like thttpd is always closing the connection just short of the end of the file. The number of missing bytes equal the length of the header bytes returned. So the bug seems to be in thttpd. I'm trying to track it d

Re: thttpd question (TCP close problem?)

2020-01-11 Thread Adam Feuer
Xiang, It looks like connection is still not getting closed correctly. 10.0.0.1 is my linux box. 10.0.0.2 is the nuttx box. Here's the end of a correct close sequence to a Linux webserver: sudo tcpdump -n -v dst 10.0.0.1 and 'tcp[tcpflags] & > (tcp-syn|tcp-ack|tcp-fin) > 0' -i lo > > 12:38:41.1

Re: thttpd question (TCP close problem?)

2020-01-11 Thread Adam Feuer
Xiang Xiao, Thanks for the PR, I updated to the latest master since this has been merged, and I tried it. I am getting a different error now: * Closing connection 0 curl: (18) transfer closed with 226 bytes remaining to read I tried removing CONFIG_NET_TCP_READAHEAD from my config too, with the

Re: thttpd question (TCP close problem?)

2020-01-11 Thread Xiang Xiao
On Sat, Jan 11, 2020 at 12:42 PM Adam Feuer wrote: > > After debugging, it seems like the TCP connection is not being closed > correctly, and the client receive times out. > > Could this be the TCP close problem that has been reported? When was it > introduced? I'd like to go back to a previous ve

Re: thttpd question (TCP close problem?)

2020-01-10 Thread Adam Feuer
After debugging, it seems like the TCP connection is not being closed correctly, and the client receive times out. Could this be the TCP close problem that has been reported? When was it introduced? I'd like to go back to a previous version and see if that works correctly. -adam On Fri, Jan 10,

thttpd question

2020-01-10 Thread Adam Feuer
Hi, I got the uIP webserver example to work on the SAMA5D36-Xplained. However, it's not fast enough for my needs. (Probably to be expected since it's designed for low-power devices.) I am trying to get the thttpd example to work. It compiles, and I can run the thttp command from the NuttX shell.