|
From: | Peter Murphy |
Subject: | [lwip-users] Limited packet size on netconn_recv |
Date: | Tue, 26 Oct 2010 14:04:28 -0600 |
Hello, I’m developing a FTP server to run under lwip and
freeRTOS. I can send directory info and files over the FTP data port but when I
go to receive a file I get a 20 second delay. WireShark shows the first packet
is sent milli-seconds after the ‘150 Opening connection’ message is
sent but lwip ignores this packet until the client resends the data with a
shorter packet length. The first packet sent is 1460 and the following two
retransmits are 1460. The third and subsequent packets are 536 in length. Lwip picks
up these short packets and returns them to my thread but only after the delay. In lwipopts.h I’ve set the following: #define
TCP_MSS
1460 #define
TCP_WND
(TCP_MSS * 8) My code simplified : res = netconn_connect(ftpdata, &data_addr,
data_port); … send msg 150… on FTP command port ftpdata->recv_timeout = 10; do{ buff = netconn_recv( ftpdata ); if(ftpdata->err == ERR_TIMEOUT){ Sleep(5); //
no data, wait & try again continue; } if(ftpdata->err != ERR_OK) goto
FTP_SaveExit; netbuf_data( buff, (void
*)&ptr2, &len ); // locate data in pkt … copy the data… netbuf_delete( buff ); //
recycle packet buf }while(len !=0); … send msg 226 (transfer complete)… on FTP
command port I must be missing something in the set up any ideas? Thanks Peter |
[Prev in Thread] | Current Thread | [Next in Thread] |