lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Problem with lwip 1.3.2


From: Magnus S
Subject: Re: [lwip-users] Problem with lwip 1.3.2
Date: Mon, 26 Sep 2011 13:52:18 +0200

Hello,
we have now tried with the lwip 1.3.2 sample, but with the same result as before, the problem remain.
 
We have used the development board EVK1100 together with the example application "LWIP 1.3.2 with DHCP example".
The example application has been modified to act as a client instead as a server.
 
The problem is that when a certain kind of network load is present in the system, we are able to make the system hang,
so the only way of getting the system to work is the perform a reset.
 
Below follows a detailed instruction regarding how to reproduce the problem, including the source code.
 
In order to reproduce the problem, the EVK1100 board and two PC:s have been connected to each other with an
ethernet network hub. Note that a switch should not be used, in that case the problem does not appear.
In our case we used an "Etherprime EP-1008m" ethernet hub. Another example is "D-Link DE-824TP".
 
The hub should also be connected to a DHCP server, we used an ethernet router for this ("D-link DIR-100").
A document that descibes the setup can be found here:
https://sites.google.com/site/ethernetissue/
(See PDF-file in the first link on the page)
 
One of the PC:s should be setup as a web server. In our case, we used Ubuntu Linux and the Apache web server.
The other PC should act as a web client, and should repeatedly download a large file.
In our case a 5 Mb file was used. We configured the PC with Ubuntu Linux, and used the "wget" tool to download the file.
The following bash command was given:
 
    while [ "true" ]; do wget http://192.168.24.101/mylargefile.JPG; sleep 1; done
 
This command downloads a large file from the web server, which will take a few seconds.
Then is sleeps for one second, and after that the actions are repeated.
 
The EVK1100 board should run the test software. The source code for the application can be found at the web page:
https://sites.google.com/site/ethernetissue/
(See the second link on the page, use "File -> Download original" to download the original zip-file)

This test application is a slightly modified version of the LWIP 1.3.2 example shipped with AVR studio 2.6.0.
 
The test applicaton will first request an IP address from the DHCP server.
When it has obained an IP address, the application will repeatedly connect to a web server,
and will download the file in the root folder. This is done repeatedly with a 10 second delay 
between the TCP requests.
 
In our case we use the built-in web server in the router during the test, when pages were requested by the EVK1100 applicaton.
However, it should be possible to use the Ubuntu web server as well for this.
 
In order to configure the IP address for the web server, change following line in main.c:
    char servername[] = "192.168.24.101";
 
The actions are printed on the display by the EVK1100-application,
so it is possible to follow what happens. The leds are also indicating the progress.
 
When the EVK1100 test application is running without the Ubuntu Linux web client turned on,
the application will run forever, just as is should, without any problems.
 
However, when the Ubuntu Linux web client is started with the repeated wget calls,
the EVK1100 application will hang after a while. Note that the problem is intermittent,
and it is tricky to reproduce the problem. It might take a while to reproduce the problem.
However, we are usually able to reproduce the problem within about 10 minutes or so.
 
When the hanging appears the application will stop, and no more progress will be indicated on the display.
 
Note also that the device does not recover when the network load is turned off.
When the application has been hung, removing the power is the only way to recover.
It is a bit hard to reproduce the problem, but should be possible to do within about 10 minutes.
 
I hope someone could give some advice regarding this, how to proceed from this point.
 
/Magnus


 
2011/9/13 Simon Goldschmidt <address@hidden>
Magnus S <address@hidden> wrote:
> I use Atmel AVR32 Studio version 2.6.0

OK, got it.

> In our case, we started with an lwip 1.3.0 sample. When 1.3.2 was
> released,
> we upgraded manually, instead of using the Atmel 1.3.2 example.

Well, there seems to be a problem in the 1.3.0 driver (C:\Program Files\Atmel\AVR Tools\AVR32 Studio\plugins\com.atmel.avr32.sf.uc3_1.7.0.201009140900\framework\1.7.0-AT32UC3\SERVICES\LWIP\lwip-port-1.3.0\AT32UC3A\netif\ethernetif.c) that has been fixed in the 1.3.2 driver:

ethernetif_input() should call "netif->input(p)" (which correctly obeys lwIP threading requirements) instead of calling "ethernet_intput(p)" (which violates threading requirements when called in multithreading configurations).

Also, you should pass "tcpip_input" as last parameter to "netif_add()" when using multithreading (NO_SYS defined to 0) and "ethernet_input" if NO_SYS is defined to 1.

Hope that helps.

> Can you send a link to the possible fix? I did not find the right
> information when i searched.

No, there was no link on the page I found.

Simon
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

_______________________________________________
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]