001-0004-819 Rev01
Page 30 of 62
The file transfer operation allows the user to transfer a file over an established FTP connection. To
avoid end-of-file detection problem for user in download case and for SMC modem in upload case,
SMC modem implements a special format of transferred files over FTP connection. The format
proposed "escaping" one of the ASCII symbols of a file context and using the "escaped" symbol as
end-of-file marker. An escaping algorithm is described below.
The algorithm defines two special characters: EOF (end-of-file character) and ESC (escape
character). EOF symbol is a hexadecimal 0x03 (decimal 3) ASCII ETX symbol and ESC symbol is a
hexadecimal 0x10 (decimal 16) ASCII DLE symbol - not to be confused with the ASCII ESCape
character.
To encode a file to FTP File Transfer Format, the user or SMC modem will read each data byte from
the source file and will perform the following operations:
When a data byte has the same code as EOF character, a two byte sequence of ESC and EOF
characters is sent instead.
When a data byte has the same code as ESC character, a two byte sequence of ESC and ESC
characters is sent instead.
When end of file is reached, EOF character is sent.
To decode a file from FTP File Transfer Format, the user or SMC modem will read each data byte
from the source file and will perform the following operations:
When a data byte has the same code as ESC character and next data byte is ESC or EOF
character, the first byte should be ignored.
When a data byte has the same code as EOF character and previous data byte is not ESC
character, end of file is reached.
Other FTP Operations and Interaction with MIP Commands
SMC modem provides AT+FTPINFO feature that allows the user to receive more information about
FTP connection and FTP commands execution. When the feature is enabled, all FTP commands sent
by SMC modem to the remote server and all FTP responses, received by the SMC modem from the
remote server are printed to the user as AT+FTPINFO: <text> unsolicited response. Use the
AT+FTPINFO=1 for the feature enabling, and the AT+FTPINFO=0 for the feature disabling in any
SMC modem operation time, when SMC modem is in command mode.
The external ODM session is prohibited when the FTP feature is executed, because FTP feature data
connection is based on socket, opened for ODM (internal ODM session), so, when SMC modem
reMIPODM command within FTP connection, the error code: 302 (FTP session is active) is
returned to the user.
The user cannot initiate FTP connection with AT+MIPOPEN command as well as close FTP connection
with AT+MIPCLOSE command. However, AT+MIPOPEN and AT+MIPCLOSE commands in "read" state
still indicate actually used / unused sockets include sockets, allocated for active FTP connection:
• AT+MIPOPEN? indicates inactive sockets (include allocated for active FTP connection)
• AT+MIPCLOSE? indicates active sockets (include allocated for active FTP connection)
When SMC modem receives AT+MIPCLOSE command for closing a socket, used within FTP
connection, the error code: 302 (FTP session is active) is returned to the user.
Summary of Contents for SMC-CDMA Series
Page 51: ...001 0004 819 Rev01 Page 51 of 62 ...
Page 52: ...001 0004 819 Rev01 Page 52 of 62 ...
Page 53: ...001 0004 819 Rev01 Page 53 of 62 ...
Page 54: ...001 0004 819 Rev01 Page 54 of 62 Configuring the Modem ...
Page 55: ...001 0004 819 Rev01 Page 55 of 62 Create a Dial Up Networking DUN Connection ...
Page 56: ...001 0004 819 Rev01 Page 56 of 62 ...
Page 57: ...001 0004 819 Rev01 Page 57 of 62 ...
Page 58: ...001 0004 819 Rev01 Page 58 of 62 ...
Page 59: ...001 0004 819 Rev01 Page 59 of 62 ...
Page 60: ...001 0004 819 Rev01 Page 60 of 62 ...