FTP-Buffer vs. rxbuff / txbuff


#1

Hi,

as described before I’m running the Wiz550web-SW on a CPU with little RAM. I understand that you separated the FTP Buffer (FTP_DBUF) from the WEB-buffers. Is there any reason to have the separate or could I use the Web-buffers for FTP too?

Cheers,
Knut


#2

Hi,

Are you currently customizing?
If you do not have enough RAM, you can modify it as you like.
Since FTP and data communication are not performed at the same time, there is no big problem.

Best regard,
Kei.


#3

Hi Kei,

I checked the usage of the Web-Buffers for ftp. After entering the password I received a 404 from the Web-Server. I think the problem is based on socknumlist[]. If ftp is enabled the first 4 entries (sockets) 2, 3,4, 5 are used. In ftpd.h CTRL_SOCK is defined as 2 and DATA_SOCK is defined as 3. This means 2 Web-Sockets are used for ftp, but the sockets 6 and 7 are unused. Are you sure this is a wanted implementation?

Cheers,
Knut


#4

Are you asking why we use two sockets for FTP?

If so, a FTP use two sockets for FTP because we use Data and Control in FTP protocol.
Please see the RFC 959 for this.

As you can see in the code, the code uses two sockets for FTP, one for DHCP, and one for DNS.
So, to use 2, 3, 4, 5 as the socket for http communication, you have to change the above four socket numbers.

Unfortunately, the code is written by another developer, so it’s difficult to tell the exact intent.


#5

If you want to run FTP and Web server at the same time, it is better to allocate a hardware socket as follows.

  • Configuration tool / DHCP: Socket 0, 1
  • FTP Server: Socket 2, 3 (fixed)
  • Web Server: Socket 4, 5, 6, 7

Incidentally, the Web Server process requires one TCP connection per link (e.g., image file) of a web page, so it is a good idea to allocate as many hardware sockets as possible.

In the main code of Github repository of WIZ550web product, sockets are defined as follows.

#define SOCK_CONFIG		0
#define SOCK_DHCP		1
#if defined(F_APP_FTP)
uint8_t socknumlist[] = {4, 5, 6, 7};
#else
uint8_t socknumlist[] = {2, 3, 4, 5, 6, 7};
#endif

#6

Sorry for the noise, I’d copied the only the complete socknumlist from main.c and forgot to copy the ftp-version of socknumlist.

Thanks for the quick check.

Cheers,
Knut