Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Roger Cover
Greetings, In the Wireshark capture that I sent in my original post, the data sent from the server is ACKed by the same packet that contains the FIN. The lwIP 1.3.1 server responds to this packet with a RST packet. I am curious why lwIP 1.4.1 responds this way when lwIP 1.2.0 responds with

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread goldsimon
A RST is sent when lwip knows that one of the two sides has not read (or packed) all data that has been sent. This is what standard socket stacks would do also. Simon Gesendet mit AquaMail für Android http://www.aqua-mail.com Am 28. September 2016 7:32:05 nachm. schrieb Roger Cover

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Roger Cover
Greetings, I am using the callback API. Sorry I did not mention that. What more details do you want? The content-length=0 is due to the old server not supporting the command to report its version in the same way. There is no additional data waiting to be sent. This is a side effect of using

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Sergio R. Caprile
I see what you mean. I also see that the 1.2.0 version sent content-length=0 and the 1.4.1 version sends content-length=115 IIRC, this is not unusual, lwIP might be indicating that there is still data to be sent. Is it possible that you left some data in the buffer ? Thank you very much indeed

[lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Roger Cover
Greetings, I have a server application using lwIP 1.4.1. When I use a Python program to connect to my server, the server always terminates the TCP connection with a RST instead of a FIN packet. The RST appears to be negatively impacting the performance of my communications. I have attached a

Re: [lwip-users] Ping function problem

2016-09-28 Thread Sergio R. Caprile
You have to correctly set your checksum options according to your hardware checksum capabilities. Setting all 1 or all 0 is not correct per se. Ethernet hardware is also capable of generating IP checksums, TCP checksums, UDP checksums, all of them, some of them, none of them. Check your

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Hi Gary, Linux is heavy for a small project and complicated. If you can find an example with FreeRTOS this would be great. It is not the best one but it is free and stable. One thing that I love with FreeRTOS that the interrupt service routines are the same as with standalone software.

Re: [lwip-users] blocked udp

2016-09-28 Thread garibaldi pineda garcia
Hi Noam, I was trying to avoid dealing with setting memory addresses for DMA transfers in Linux/RTOS, but running an OS might be the better option. Best, Gary On 28 September 2016 at 13:51, Noam Weissman wrote: > Hi Gary, > > > > As a continuation to what Simon wrote… > > >

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Hi Gary, As a continuation to what Simon wrote… See section 6. This does not contradict what everyone said so far. You can call sending data functions in your main loop and the difference is how to do it properly. Dirk answered this earlier and explained how to do it with or without OS. By

Re: [lwip-users] Ping function problem

2016-09-28 Thread jakeonehalf
This question helped me check into the same issue I was having. Turns out there's an option to turn on checksums in your lwipopts.h. Under checksum options you should turn on CHECKSUM_GEN_ICMP. Also, in lwip/opt.h there is a define LWIP_CHECKSUM_CTRL_PER_NETIF. This must be set to 1 along with all

Re: [lwip-users] blocked udp

2016-09-28 Thread garibaldi pineda garcia
Oooh, I see. Then I believe I have to revisit my code because I based my design on their app note. Best, Gary On 28 September 2016 at 13:41, goldsimon wrote: > On the contrary: Xilinx does it perfectly right. They use their hardware > at interrupt level but feed rx packets

Re: [lwip-users] blocked udp

2016-09-28 Thread goldsimon
On the contrary: Xilinx does it perfectly right. They use their hardware at interrupt level but feed rx packets into lwip in the main loop. Simon Gesendet mit AquaMail für Android http://www.aqua-mail.com Am 28. September 2016 2:35:54 nachm. schrieb garibaldi pineda garcia

Re: [lwip-users] blocked udp

2016-09-28 Thread garibaldi pineda garcia
Xilinx application notes seem to contradict the don't-mix interrupt/polling domains: Creating an lwIP Application Using the RAW API The lwIP RAW mode API is more complicated as it requires knowledge of lwIP internals. The typical structure of a RAW mode program is as follows: 1. The first step

Re: [lwip-users] blocked udp

2016-09-28 Thread Simon Goldschmidt
Dirk Ziegelmeier wrote: >> A second way to do it, not so preferred by some peoples but worked for me, >> is to add critical Sections [..]  > > Depends on what you mean by "critical section". If this is disable/enable > interrupts, that only works if you don't use an OS. Just to clarify this for

Re: [lwip-users] blocked udp

2016-09-28 Thread garibaldi pineda garcia
Hi, Dirk you're right, I'm using LWIP with the NO_SYS flag set to true. I'm somewhat confused, do I have two options? 1) Do a polling-like application that manages input/output without interrupts (I have no clue how to do this, should I follow the sample code?). 2) Send everything out when I

Re: [lwip-users] blocked udp

2016-09-28 Thread Dirk Ziegelmeier
> > A second way to do it, not so preferred by some peoples but worked for me, > is to add critical > > Sections in code that call’s LwIP functions. Adding a critical section > means that you block other > > Tasks for a short time. Especially the TCP task from running. It means > that if you

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Hi Dirk, I forgot about this completely… I checked my own code and found that I already used it before ☺ Thanks for reminding this. BR, Noam. From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of Dirk Ziegelmeier Sent: Wednesday, September 28, 2016 1:59 PM To:

Re: [lwip-users] blocked udp

2016-09-28 Thread Dirk Ziegelmeier
Whenever your application wants to send, use tcpip_callback() macro to get a function called in tcpip thread and do the sending work there. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Wed, Sep 28, 2016 at 12:52 PM, Noam Weissman wrote:

Re: [lwip-users] netconn_aborted pointer in api_msg.c

2016-09-28 Thread Simon Goldschmidt
Gregory.W.Smith wrote: > I have found a situation in lwIP STABLE-2_0_0 that can result in > dereferencing a bad pointer. The crash error should be fixed (bug #49209). However, I don't understand why you wouldn't be able to reconnect after an out-of-netconns memory error... Simon

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Hi Simon, What is the preferred way to send data from within LwIP context. Beside running sys_timeout and hooking a function to it ? If I want to send data at a high rate and I will set sys_timeout to say 1ms it will cause load on the system. Is there another clean way to do it ? BR, Noam.

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Simon :-) You answered In much less words then I did. Noam. -Original Message- From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of Simon Goldschmidt Sent: Wednesday, September 28, 2016 1:33 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] blocked

Re: [lwip-users] blocked udp

2016-09-28 Thread Simon Goldschmidt
garibaldi pineda garcia wrote: > What I do is have an interrupt to receive the data from the FPGA and, > in the main program loop (would this be the LWIP context?), I guess so. That would mean you don't use an OS but use lwIP in NO_SYS=1 mode. > I call a function to send data out. I also have an

Re: [lwip-users] blocked udp

2016-09-28 Thread Noam Weissman
Hi, No problems, I enjoy it. I head lots of help from people here when I started so it’s just reasonable that I will help others when I can ☺ As far as I understand and also from my own experience there is no memory leak. You simply do not use LwIP properly. In RAW mode when you call

Re: [lwip-users] blocked udp

2016-09-28 Thread garibaldi pineda garcia
Hi Noam, I really appreciate your help and thank you for the time you've taken to reply. I believe my problem might be related to memory leaks, although I'm using a bare-metal application. The Zedboard has a dual Corex-A9 processor. So I process the video on the FPGA then transfer that via DMA