Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-05 Thread Inderjit Singh
So, I have updated reception code (from the contrib examples httpd_raw) and still the behaviour is the same (code at bottom). I did a quick and ugly test by calling tcp_ack_now and tcp_output at the end of the function and then the behaviour dramatically improved as ACKs are being sent back an

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-04 Thread inderjit
Fair enough. I'll revise the code from example code and get back. Thanks! -- Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-03 Thread goldsi...@gmx.de
On 03.10.2018 11:25, inderjit wrote: [..] One thing I missed was this: tcp_recved(pcb, p->tot_len); This could explain ACK was not sent. No, ACK is sent implicitly, tcp_recved() only controls window updates. Simon ___ lwip-users mailing list lwip

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-03 Thread goldsi...@gmx.de
On 03.10.2018 09:39, inderjit wrote: Simon, Can you please elaborate? I'm following example code from: https://github.com/kennethnoyens/lwipHttpClient/blob/master/httpclient.c Well, that code is wrong, too. Why don't yo

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-03 Thread inderjit
Jens, I'm using 1.4.1 as there is no support for the PHY from ATMEL on 2.x.x. AFA= IK anyway as I had hard time integrating it. I followed this code reference: httpclient.c One thing I missed was this: tcp_recved(pcb

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-03 Thread inderjit
Jens, I'm using 1.4.1 as there is no support for the PHY from ATMEL on 2.x.x. AFA= IK anyway as I had hard time integrating it. I followed this code reference: httpclient.c One thing I missed was this: tcp_recved(pcb

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-03 Thread inderjit
Simon, Can you please elaborate? I'm following example code from: https://github.com/kennethnoyens/lwipHttpClient/blob/master/httpclient.c struct pbuf is a linked list and referring to the current element at top at that

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-02 Thread goldsi...@gmx.de
In addition to the correct answer from Jens: On 02.10.2018 11:45, Inderjit Singh wrote: [..]         while (p != NULL) {             if (ctx->recv_buf != NULL) {                 memcpy(&ctx->recv_buf[len], p->payload, p->len);             }             temp_p = p->next;             len += p->l

Re: [lwip-users] TCP retransmissions although packet has been recieved

2018-10-02 Thread Jens Nielsen
Hi I'll answer the standard reply to this question :)  You're saying that "the app has received the packet" but are you really sure about that? A typical cause for this problem is that the driver stops receiving and/or forwarding packets to lwip properly, lwip can't ack what lwip doesn't rece

[lwip-users] TCP retransmissions although packet has been recieved

2018-10-02 Thread Inderjit Singh
Hi, I have the following configuration: H/W ATMEL SAM4E ARM Cortex-M4 with KSZ8081MNXRNB Ethernet phy. LWIP: 1.4.1 Config (extract. See attached file for full config): #define NO_SYS 1 #define MEMP_NUM_TCP_PCB2 #define M