
-37-
v4.9
FTP and FTPS
7.3. FTPS related functions
Note:
the 3G/GPRS module doesn’t support FTPS server with certificate authentication. An explicit FTPS server without certificate
authentication must be used with these functions.
7.3.1. Log into FTPS server
Before to upload or download files from a FTPS server, you need to log into the FTPS server. The parameters needed to log into
the server in order are: server address (can be an IP address or a domain name), port, user name and password.
Example of use:
{
// Setting FTPS parameters
_3G.loginFPTS(“ftp_address”, “ftps_port”, “user_name”, “password”);
}
This function returns:
•
‘1’ on success
•
‘-2’ if error setting the connection parameters (APN)
•
‘-3’ if error acquiring the SSL stack
•
‘-4’ error login into the server
•
‘-5’ if timeout when logs in
7.3.2. Uploading files from Waspmote
To upload a file from Waspmote’s SD card you can use the function
uploadDataSecure(SD_origin, FTPS_destination)
.
SD_origin
and
FTPS_destination
are strings that contains the complete path with the file name. The strings must be start
with the character ‘/’, for example “/filename” or “/directory/filename”.
Example of use:
{
// Uploading a file from Waspmote
_3G.uploadDataSecure(“/SD_path/SD_file_name”, “/FTPS_path/FTPS_file_name”);
}
This function returns:
•
‘1’ on success
•
‘0’ if error
•
‘-2’ if error with CME code (FTP error)
•
‘-3’ if error getting file size from SD
Содержание Waspmote 3G Plus GPS
Страница 1: ...Waspmote 3G GPS Networking Guide ...