[En-Nut-Discussion] Problems with TCP-Sendbuffer size(?)
Ole Reinhardt
ole.reinhardt at embedded-it.de
Thu Oct 13 12:40:40 CEST 2011
Hi Klaus,
> 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 :)
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().
> 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
boards.
If you like, you might contact me by private mail to solve your problem.
Bye,
Ole
--
Thermotemp GmbH, Embedded-IT
Embedded Hard-/ Software and Open Source Development,
Integration and Consulting
http://www.embedded-it.de
Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen -
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97
Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280
More information about the En-Nut-Discussion
mailing list