Re: [lwip-users] Consecutive calls to sendto() and recvfrom() functions

2016-11-03 Thread pekez
Thanks Sergio for your advice. When it comes to layer-2 driver, it is a 
driver provided by Xilinx, so I guess that problem couldn't be there. I 
have no idea how to check driver itself and be sure that problem is not 
there (do you have any suggestion how I could do that?). As you said 
FreeRTOS port should be OK, I got it from Xilinx as well, and for 
hardware itself, that's something I should try to test better. All in 
all, since I don't have much experience, I would be grateful if you 
could give me more references about these stuff that is how to eliminate 
faulty variables in a proper way.



On 28.10.2016 19:35, Sergio R. Caprile wrote:
> Sergio, can you just explain what you mean by third sentence, how 
can > I check all those things (port, driver) and what is 
known-to-work app?


lwIP is not and end-user full contained product, it starts at layer-3 
(IP) and runs on some hardware, it has been ported to that hardware.
Your layer-2 driver might just be discarding/losing frames, for 
example; or your hardware might be doing that.
A known-to-work application is an application that is known to work 
;^), that is, it is not something you are writing yourself while you 
learn how to use lwIP but something that has been proved OK. For 
example, the examples in the contrib tree.
Since your hardware can be faulty, your driver can be faulty, your 
port can be faulty, and your application can be faulty, you have to 
eliminate variables (faulty stuff), so if one of the examples do not 
work for you, either your hardware, your port or your driver 
(sometimes both...) are the culprit. Most of the times, your driver 
can be checked alone, and your port can sometimes be checked for doing 
things the proper way, that is, only calling low-level functions from 
within a single thread; sockets and netconns can be called each one 
from its thread. RTOS ports (NO_SYS=0) use some semaphores, you can 
search the list for a priority problem, I bet the FreeRTOS port is 
running OK, but depends on where you get it from...

You should also read the wiki... http://lwip.wikia.com/wiki/LwIP_Wiki




___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users



___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] LwIP bootloader stack deinitialisation

2016-11-03 Thread Philipp Tölke
I am using it like this; the bootloader uses lwip and then jumps into the
firmware-code. The firmware is a completely different program (even with
different lwip-config) and just initializes everything like it had just
booted from a power-on.

Be careful about your hardware though! We use microcontrollers by TI and
they do not mind being initialized twice but I would imagine that some
hardware would need to be carefully reset in order to work.

-- 
Philipp Tölke - T +49 89 999 542 58 - F +49 89 999 542 01

> -Original Message-
> From: lwip-users [mailto:lwip-users-bounces+pt=fos4x...@nongnu.org] On
> Behalf Of pischin...@lunatone.com
> Sent: 3 November, 2016 11:56
> To: Mailing list for lwIP users
> Subject: [lwip-users] LwIP bootloader stack deinitialisation
>
> Hello,
>
> i'm doing a bootloader for my custom board right now and i'm thinking
> about wether i should leave the LwIP stack only in the application or put
> it into the bootloader aswell..
> Is it possible to completely deinitialise the whole stack? Because the
> application would initialise it again as soon as it boots..
> Has anyone here maybe done something like this before?
>
> I'm working on a ATSAM4E16C custom board with LwIP 1.4.1.
> Regards,
> Markus

-- 
*fos4X GmbH | www.fos4x.de *
Thalkirchner Str. 210, Geb. 6 | 81371 München | DE

Handelsregister | Commercial Register: Amtsgericht München HRB 189 218
Geschäftsführer | Managing Directors: Dr. Lars Hoffmann, Dr. Mathias Müller
Unternehmenssitz | Place of Business: München, DE


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] LwIP bootloader stack deinitialisation

2016-11-03 Thread pischin...@lunatone.com

Hello,

i'm doing a bootloader for my custom board right now and i'm thinking 
about wether i should leave the LwIP stack only in the application or 
put it into the bootloader aswell..
Is it possible to completely deinitialise the whole stack? Because the 
application would initialise it again as soon as it boots..

Has anyone here maybe done something like this before?

I'm working on a ATSAM4E16C custom board with LwIP 1.4.1.
Regards,
Markus
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] Big time gaps in TCP communication

2016-11-03 Thread pekez

Hello people,

I have implemented a simple TCP echo server app that runs on ZYNQ board, 
and simple TCP echo client that runs on Windows PC. I am using lwip141 
1.5 with FreeRTOS on ZYNQ and windows sockets on PC.


This is a main loop of server app:

while (TRUE)
{
read = Fread(g_sendline, 1, TCP_MAX_DATA_LEN, fprd);
Send(g_sockfd, g_sendline, read, 0);

recvd = Recv(g_sockfd, g_recvline, TCP_MAX_DATA_LEN, 0);
written = Fwrite(g_recvline, 1, recvd, fpwr);

if (read < TCP_MAX_DATA_LEN)
break;
}

Everything works as it should, but the problem is time. Every time the 
packet is lost, there is a big time gap of 2 or 3 seconds before 
communication is normally continued. I am sending a picture of Wireshark 
capture, just to see clearly what is happening. (boards IP is the one 
ending with 240, whereas the PCs IP is the one ending with 101).


Maybe this is not even directly connected to lwip, but I guess you guys 
can help me anyways.


Thanks

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users