
-39-
v4.9
FTP and FTPS
7.3.5. Downloading files to 3G/GPRS module
To download a file to the SD card of the 3G/GPRS module you can use the function
downloadFileSecure(FTPS_path,
SD_destination_folder, max_time)
.
SD_destination_folder
is a number that indicates the destiny folder to the
downloaded file. Allowed values for
SD_destination_folder
:
•
0 – current directory
•
1 – “C:/Picture” directory
•
2 – “C:/Video” directory
•
3 – “C:/VideoCall” directory
•
4 – “D:/Picture” directory
•
5 – “D:/Video” directory
•
6 – “D:/VideoCall” directory
•
7 – “C:/Audio” directory
•
8 – “D:/Audio” directory
FTPS_desitanion
is a string that contains the complete path with the file name. The string must be start with the character
‘/’, for example “/filename” or “/directory/filename”.
max_time
is the total time in seconds to download the file from the server.
Example of use:
{
// Downloading a file from FTPS to Video directory
_3G. downloadFileSecure(“/FTPS_path/FTPS_file_name”, 5, 180 );
}
This function returns:
•
‘1’ on success
•
‘0’ if error
•
‘-2’ if error with CME code (FTP error)
7.3.6. Log out the FTPS server
Once the uploads or downloads have been completed use the function
Example of use:
{
// Setting FTP parameters
_3G.logoutFPTS();
}
This function returns:
•
‘1’ on success
•
‘-2’ if error logging out of the server
•
‘-3’ if error releasing the SSL stack
Содержание Waspmote 3G Plus GPS
Страница 1: ...Waspmote 3G GPS Networking Guide ...