lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] ERR MEM & TCP_OUT_ORDER


From: Cellule Num
Subject: [lwip-users] ERR MEM & TCP_OUT_ORDER
Date: Mon, 28 Nov 2011 22:57:30 +0100

Hi,

I use LWIP 1.3.1 of STM32F107 (ARM Cortex M3).
I have create server on my board, and when a computer client is connected, i sent in continuous (with my board) an identical frame . The goal is to be sent as soon as possible.

The probleme, is my server isn't stable. The flow down permanently (start at 45Mbits/s and after 5 minute is 0,2Mbtis/s)
I try for a week.

this my main: my PCB is serveur1.tcp-socket

while(1)

LwIP_Periodic_Handle(LocalTime);

if((serveur1.connectionok==1)){          // if cnx is OK 

 if((1440 < (serveur1.tcp_socket)->snd_buf)&&(((serveur1.tcp_socket)->snd_queuelen < TCP_SND_QUEUELEN)||((serveur1.tcp_socket)->snd_queuelen < TCP_SNDQUEUELEN_OVERFLOW))){

  err = tcp_write(serveur1.tcp_socket,serveur1.buffer1,1440,0);

  if (err == ERR_OK){

tcp_output(serveur1.tcp_socket);

  }

  else if((err>-9)&&(err<-4)){

sprintf(usart2.txbuffer,"ERR2N∞%d \r\n",err);

serveur1.connectionok=0; // cnx is OFF

  }

else if(err>-4){

sprintf(usart2.txbuffer,"ERR4N∞%d \r\n",err);

  }}} 


I have a lot of error message with "ERR4N -1" so a ERR MEM but i have verified the snd_buf.


I join my file "lwipopts.h". I call TCP_TMR() every 100ms with LwIP_Periodic_Handle(LocalTime);

With wirehark, i see the "push ack" frame of serveur. but each frame send i "PUSH ACK", but the client ACK every 2 frame.


If you want its possible to joint the PCAP file of wireshark.


Thank you

Attachment: lwipopts.h
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]