Connect to the FTP server.

Syntax

int FTP_Connect(
  char *pcHost,
  unsigned short port,
  unsigned char mode,
  tpfResponseCb responseFunction
);

Parameters

pcHost
[in] Specify the IP address or host name of the FTP server as a string. Up to 64 characters.
port
[in] Specify the connection port of the FTP server.
mode
[in] Specifies the mode of the FTP client.
FTP_PASV : passive mode
FTP_ACTIVE : active mode
responseFunction
[in] Specifies the callback function that receives the response message. If NULL is specified, the response message will be ignored.

Return value

Returns M2M_SUCCESS if the function succeeds, otherwise it returns any other value.

Remarks

To send a command to the FTP server, call the FTP_Command function.

Be sure to call the FTP_Finish function after using the FTP client.

Requirements

Header file:
lib.h
FTP.h
Library file:
libFTP.a
libSTARTUPOPH5000.a


Last updated: 2021/06/03