001-0004-819 Rev01
Page 29 of 62
FTP Connection
SMC modem implements FTP connection feature, based on RFC959 standard, and operates as a FTP
client. When connected to a remote FTP server, SMC modem is able to receive information about
remote file system, manage it and perform files transfer operations.
The AT+FTPOPEN command is used to open a FTP connection with a remote FTP server. When SMC
modem performs FTP connection establish procedure, it allocates two TCP sockets. One of them is
used for FTP control channel, the other for FTP data channel (listen mode). FTP control channel port
has default identification number (ID) - 21 for source (client) and destination (server) sides, but the
user is able to configure control channel port ID for client as well as for server by passing new
source control port and/or new destination control port id as AT+FTPOPEN command optional
parameters. This is applicable when a remote FTP server is able to accept FTP connection over non-
standard (other then 21) ports. FTP data channel port has a default identification number (ID) - 20
for source (client) side, but the user is able to configure data channel port id by passing a new
source data port id as AT+FTPOPEN command optional parameter. This is applicable when the
remote FTP server is unable to establish data connection to some port IDs.
For example, to open a FTP connection with a remote FTP server, use the following settings:
destination URL
= <ftpsite>
(mandatory)
user
= <anonymous>
(mandatory)
password
= <*****>
(mandatory)
account
= ""
(optional, default value)
source control port id
= 1300
(optional, 21 default value)
destination control port id = 21
(optional, 21 default value)
source data port id
= 1302
(optional, 20 default value)
AT+FTPOPEN
= "<ftpsite>","<anonymous> ","<*****>",,1300,,1302
When FTP connection is establish, SMC modem remains in command mode. This mode is used for
performing most of the FTP AT commands. Only AT+FTPLIST, AT+FTPSTOR and AT+FTPRETR
commands switch SMC modem to online data mode. Generally, SMC modem returns to command
mode after the data mode caused command execution is finished, but the user is able to interrupt
online data mode (and closes the actual FTP connection) by changing the DTR line status from ON to
OFF, when AT&D settings = 2 or 3.
Established FTP connection can be closed when SMC modem is in command mode by AT+FTPCLOSE
command or by changing DTR line status from ON to OFF when data transfer operations are
performed (SMC modem is in online data mode).
When FTP connection is established, the user is able to manage file system on the remote FTP
server, like create, remove, change directory, rename or delete a file. The following FTP commands
are used for remote file system management purpose.
AT+FTPCWD - changes the working directory on a remote server.
AT+FTPMKD - creates a new directory on a remote server.
AT+FTPRMD - removes existing directory on a remote server.
AT+FTPPWD - returns actual working directory name from a remote server.
AT+FTPCDUP - changes working directory on a remote server, up to parent directory.
AT+FTPDEL - deletes a file on a remote server.
AT+FTPREN - renames a file on a remote server.
Содержание SMC-CDMA Series
Страница 51: ...001 0004 819 Rev01 Page 51 of 62 ...
Страница 52: ...001 0004 819 Rev01 Page 52 of 62 ...
Страница 53: ...001 0004 819 Rev01 Page 53 of 62 ...
Страница 54: ...001 0004 819 Rev01 Page 54 of 62 Configuring the Modem ...
Страница 55: ...001 0004 819 Rev01 Page 55 of 62 Create a Dial Up Networking DUN Connection ...
Страница 56: ...001 0004 819 Rev01 Page 56 of 62 ...
Страница 57: ...001 0004 819 Rev01 Page 57 of 62 ...
Страница 58: ...001 0004 819 Rev01 Page 58 of 62 ...
Страница 59: ...001 0004 819 Rev01 Page 59 of 62 ...
Страница 60: ...001 0004 819 Rev01 Page 60 of 62 ...
Страница 61: ...001 0004 819 Rev01 Page 61 of 62 ...