[En-Nut-Discussion] Problems with TCP-Sendbuffer size(?)
klaus.kloos at gmx.de
Thu Oct 13 16:13:20 CEST 2011
Thanks for your fast answer
>> Ive got a running project (Sam7ek) connected directly by ethernet.
>> Now a wiz610 WLAN<>LAN bridge comes in between and Ive got a problem when sending more than ca. 512 Bytes using an telnet-connection and fputs() from the ethernut side.
>> NutSleep() and NutYield() do not help. The sleeping-time is spend before sending the first signs other the net.
>> If I send smaller pieces everything seems fine. After ethernut has crashed I can see 512 send bytes on my PC side of the telnet connection.
> Are you sure your Board crashed? You might have got a stack problem.
> Have you allocated your send buffer from the stack (as local variable)
> or have you used malloc / NutHeapAlloc?
> Never use such large local variables :)
Im aware of this ... no allocation on my side. Im only using fputs()....
> btw: to make sure all data is written out you should add a fflush() at
> the point where you want to make sure that all data is send.
>> How can I tell the TCP-Stack to send all the data he has to deliver and wait for the completion?
> As above: First check that you did not allocate the whole send buffer as
> local variabel. Next add a fflush() after your fputs().
fflush() does help a bit. Now I get more bytes transfered. But after sending 1005Bytes ethernut does not respond to anything.
How do i find out if this is a stack-problem?
>> Im using NutOS 4.8.9 up to now, because using 4.10rc1 ive got a problem with getting the IP-adress with or without DHCP using the tcps demo.
>> This has been changed, but I was not able to find out the problem with my board. Even when I used this part from my working 4.8.9 project the 4.10 version does not get an IP-adress.
> Sounds strange. Nut/OS 4.10 is definately working fine on our eNet-sam7X
This one is found.
The configurator was set to AT91SAM7X_EK but under device-driver->non volatile memory I have to set 'at91 on chip flash' by hand to get it working.
More information about the En-Nut-Discussion