Hi, everyone!
I'm using the evaluation kit EK-LM3S9B92 and the example from TI - enep_lwip. I modified it by removing the http server. Instead I just send and receive messages. The problem is - when I send more than one message not everything arrives to my computer. I'm sending this with LM3S9B92:
"\n\r:START:FILE_START:2010:12:26:22:35:16:01a1:END\0", "\n\r:START:2010:12:26:22:35:16:01a2:END\0", "\n\r:START:2010:12:26:22:35:16:01a3:END\0", "\n\r:START:2010:12:26:22:35:16:01a4:END\0", "\n\r:START:2010:12:26:22:35:16:01a5:END\0", "\n\r:START:2010:12:26:22:35:16:01a6:END\0", "\n\r:START:2010:12:26:22:35:16:01a7:END\0", "\n\r:START:2010:12:26:22:35:16:01a8:END\0", "\n\r:START:2010:12:26:22:35:16:01a9:END\0", "\n\r:START:2010:12:26:22:35:16:01aa:END\0", "\n\r:START:2010:12:26:22:35:16:01ab:END\0", "\n\r:START:2010:12:26:22:35:16:01ac:END\0", "\n\r:START:2010:12:26:22:35:16:01ad:END\0", "\n\r:START:2010:12:26:22:35:16:01ae:END\0", "\n\r:START:2010:12:26:22:35:16:01af:END\0", "\n\r:START:2010:12:26:22:35:16:01b0:END\0", "\n\r:START:2010:12:26:22:35:16:01b1:END\0", "\n\r:START:2010:12:26:22:35:16:01bb:END\0", "\n\r:START:2010:12:26:22:35:16:01bc:END\0", "\n\r:START:2010:12:26:22:35:16:01bd:END\0", "\n\r:START:FILE_END:END\0"
and I get this on my computer:
:START:FILE_START:2010:12:26:22:35:16:01a1:END:START:2010:12:26:22:35:16:01a2:END:START:2010:12:26:22:35:16:01a3:END:START:2010:12:26:22:35:16:01a4:END:START:2010:12:26:22:35:16:01a5:END:START:2010:12:26:22:35:16:01a6:END:START:2010:12:26:22:35:16:01a7:END:START:2010:12:26:22:35:16:01a8:END:START:2010:12:26:22:35:16:01a9:END:START:2010:12:26:22:35:16:01aa:END:START:2010:12:26:22:35:16:01ab:END:START:2010:12:26:22:35:16:01ac:END:START:2010:12:26:22:35:16:01ad:END:START:2010:12:26:22:35:16:01ae:END2045.enet_lwip.txt:START:2010:12:26:22:35:16:01af:END:START:2010:12:26:22:35:16:01b0:END
As you can see 4 messages are missing.
I'm using Stellaris peripheral library - SW-EK-LM3S9B92-6594, lwip library - lwip-1.3.2, enet_lwip example in C:\Documents and Settings\user\Desktop\StWare\boards\ek-lm3s9b92\enet_lwip and TeraTerm v4.65 as a terminal. I use Eclipse with Sourcery G++ Lite for ARM EABI. I use a router with DHCP.
I suspect this part of the code:
for(ul_Count = 0; ul_Count < 21; ul_Count++) { length = strlen(c_Send_To_Host[ul_Count]); length++; UARTprintf("\nul_Count:%02d --> %s --> LEN: %d",ul_Count, c_Send_To_Host[ul_Count], length); tcp_write(pcb,c_Send_To_Host[ul_Count],length, 1); tcp_output(pcb); }
where c_Send_To_Host is a string table (two dimensional array to be exact) containing 21 different messages. I tried it with lwip-1.3.1 and SW-EK-LM3S9B92-5570 - same result.I tried with tcp_write(...., 0); and it got even worse - 6 messages were missing. I've uploaded the modified enet_lwip.c file.
Thanks in advance!
Happy holidays!
Hello Lubomir:
Each TCP write consumes one or more pbuf's. There are only 24 pbufs initialiezed by default so it is quite possible your applicaiton is overrunning the amount fo available pbufs. You should try allocating additional pbufs. Please try this out and report back the result.
Happy Holidays!
-Reed