ftpOpen (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

2.10 / 1.00.00


This function will open the FTP interface. Calling this function is required before the FTP interface can be used.

Also see ftpClose for closing the FTP interface when finished with the operations.

 

This function must be called before any communication with the server by using FTP can occur.

The actual connection has not been established when this function returns. The ftpConnect function must be used to establish the connection.

 

Prior to communicating with the server, the network interface connection must be established. For example by using gsmPower and gprsOpen for Mobile network.

 

Note:

Timeouts may occurs on action if they are interrupted by incoming or outgoing voice calls.

 

Input:

None.

 

Returns: INT

0

 

- Success.

- 1

 

- General error.

- 6

 

- FTP not supported on device.

-10

 

- Communication with server not possible.

 

 

Declaration:

FUNCTION ftpOpen : INT;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
VAR
  open     : BOOL;
END_VAR;
 
  gsmPower(power := ON);
  gprsOpen();
 
BEGIN
 open := (ftpOpen() = 0);
 ...
ftpClose();
END;
END_PROGRAM;