FTP connection, TCP sending packet problem.

Hello Everyone

We are having a TCP - FTP problem, let me try and explain this one to you:

We are RCM4300 with a 1GB SD Card as a data logger with messages received via a TCP socket.

The RCM4300 also acts as an FTP server so the data logs can be downloaded via FTP.
This all works perfectly fine!

However when I add the functionality to send a TCP packet from the RCM4300 a strange situation arises. If there has been no previous FTP connection to the device the messages are sent correctly. However if the device has been accessed via FTP before a TCP message packet has attempted sending the connection will continually fail. Conversely if the TCP message packet has been sent before a FTP connection has been established the FTP connection will never occur.

If the FTP connection has been established before a TCP message has been sent the TCP message code fails at this point in the code:
tcp_open(&sendSock, 0, resolve(ip), port, NULL)

  •      The IP is valid and the port is 8000

To me this is saying that you cannot open a socket if there has ever been a FTP connection.

If an TCP message has been sent before an FTP connection has been established the FTP always fails to establish a connection.

After tracing the code in the ftp_server.lib line 1840, in the ftp_tick() function
always returns 0 and never establishes the connection.

I am using firefox 3.0.1 to establish the FTP connection. I have also used the FTP client FileZilla 3.1.2 and this has also failed.

I hope I have provided enough information. The situation is quite confusing if any clarification is required I will happily try to provide it.

Thanks in advance.