
-35-
v4.9
FTP and FTPS
7.2.2. Uploading files from Waspmote
To upload a file from Waspmote’s SD card you can use the function
uploadData(SD_origin, FTP_destination)
.
SD_
origin
and
FTP_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.uploadData(“/SD_path/SD_file_name”, “/FTP_path/FTP_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
7.2.3. Uploading files from 3G/GPRS module
To upload a file from the SD card of the 3G/GPRS module you can use the function
uploadFile(3G_folder, FTP_
destination_path
)
.
3G_folder
is a number that indicates the folder that contains the file to upload. Allowed values for
3G_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
FTP_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”.
Example of use:
{
// Uploading a file from Video directory in the 3G microSD card
_3G. uploadFile(5, “/FTP_path/FTP_file_name”);
}
This function returns:
•
‘1’ on success
•
‘0’ if error
•
‘-2’ if error with CME code (FTP error)
•
‘-3’ if error getting the file of the size to upload
Содержание Waspmote 3G Plus GPS
Страница 1: ...Waspmote 3G GPS Networking Guide ...