Does anyone know how to write an FTP server for potpourri's WiFiEsp library?

I have started writing the class below and, at this stage, I just want it to respond to an incoming ftp request and out put the data to arduino serial monitor.

However the incoming FTP requests are not making it through.

I have tried connecting with Filezilla on port 21 and also via in my web browser.

I get nothing.

Can anyone tell me what I have done wrong?

Based on the standard WiFiEspServer class(instantiated with port 80) that comes with the library, doing the above should be quite trivial.

#ifndef __FTP_SERVER_H
#define __FTP_SERVER_H

#include "WifiEspServer.h"
#include "WifiEspClient.h"

#define SIZE 30

class CFTPServer
	// Construction, destruction and initialisation.
	void begin(const char* strUsername, const char* strPassword);
	// Interface
	bool processFTPRequest();

	// Helper functions
	// Implementation
	static const uint8_t m_nCtrlPort, m_nDataPort;
	// Servers for the control and data.
	WiFiEspServer m_serverCtrl, m_serverData;
	// FTP username and password
	char m_strUsername[SIZE], m_strPassword[SIZE];

#include <Arduino.h>
#include "WiFiFTPServer.h"

const uint8_t CFTPServer::m_nCtrlPort = 81;
const uint8_t CFTPServer::m_nDataPort = 22;

CFTPServer::CFTPServer(): m_serverCtrl(m_nCtrlPort), m_serverData(m_nDataPort)
  memset(m_strUsername, 0, SIZE);
  memset(m_strPassword, 0, SIZE);


void CFTPServer::begin(const char* strUsername, const char* strPassword)
  strcpy(m_strUsername, strUsername);
  strcpy(m_strPassword, strPassword);

bool CFTPServer::processFTPRequest()
	bool bResult = false;
	WiFiEspClient client = m_serverCtrl.available();
	char cCh = 0;

	if (client)
      Serial.println(F("New HTTP request"));

      while (client.connected())
        if (client.available())
          cCh =;
	return bResult;

WiFiFTPServer.cpp (966 Bytes)

WiFiFTPServer.h (674 Bytes)