LIMITED WARRANTY. AMX Corporation warrants that the SOFTWARE will perform substantially in accordance with
the accompanying written materials for a period of ninety (90) days from the date of receipt. Any implied warranties on
the SOFTWARE and hardware are limited to ninety (90) days and one (1) year, respectively. Some states/countries do
not allow limitations on duration of an implied warranty, so the above limitation may not apply to you.
CUSTOMER REMEDIES. AMX Corporation’s entire liability and your exclusive remedy shall be, at AMX Corporation's
option, either (a) return of the price paid, or (b) repair or replacement of the SOFTWARE that does not meet AMX Corporation's Limited Warranty and which is returned to AMX Corporation. This Limited Warranty is void if failure of the
SOFTWARE or hardware has resulted from accident, abuse, or misapplication. Any replacement SOFTWARE will be
warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer.
NO OTHER WARRANTIES.
not limited to implied warranties of merchantability and fitness for a particular purpose, with regard to the SOFTWARE,
the accompanying written materials, and any accompanying hardware. This limited warranty gives you specific legal
rights. You may have others which vary from state/country to state/country.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES
whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business
information, or any other pecuniary loss) arising out of the use of or inability to use this AMX Corporation product, even
if AMX Corporation has been advised of the possibility of such damages. Because some states/countries do not allow
the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
U.S. GOVERNMENT RESTRICTED RIGHTS
The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the
Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is AMX Corporation, 3000 Research Drive,
Richardson, TX 75082.
If you acquired this product in the United States, this Agreement is governed by the laws of the State of Texas.
Should you have any questions concerning this Agreement, or if you desire to contact AMX for any reason, please
write: AMX Corporation, 3000 Research Drive, Richardson, TX 75082.
AMX Corporation disclaims all other warranties, either expressed or implied, including, but
. In no event shall AMX Corporation be liable for any damages
Learning More ................................................................................................................... 6
i!-FTPSender
i
Table of Contents
ii
i!-FTPSender
Introduction
The i!-FTPSender™ allows you to copy a file from one FTP server to another from NetLinx™ code.
This is useful to copy files to the NetLinx Master from another FTP server or to copy files from the
NetLinx Master's disc on chip to another FTP server. This module will work between any two FTP
servers; it is not limited to copying files to and from a NetLinx Master.
Supported Operating Systems
Windows 95
Windows NT 4.0
64 MB of installed memory)
Windows 2000
(minimum requirement); 300 MHz or faster recommended, with 96 MB of installed
memory.)
Windows ME
300 MHz or faster recommended, with 96 MB of installed memory.)
®
/98® (with at least 48 MB of installed memory)
®
Workstation or Server (service pack 6 B or greater, with at least
®
Professional or Server (running on a Pentium 233 MHz processor
®
(running on a Pentium 233 MHz processor (minimum requirement);
Introduction
Minimum PC Requirements
Windows-compatible mouse (or other pointing device)
At least 5 MB of free disk space (150 MB recommended)
VGA monitor, with a minimum screen resolution of 800 x 600
A Network adapter
Installing i!-FTPSender
1. In Explorer, double-click i!-FTPSenderSetup.exe from the directory window where you
downloaded the i!-Email install program.
2. After reading the License Agreement, select I Agree and Next to proceed.
3. The Welcome To i!-FTPSender Setup dialog appears, reminding you to close all Windows
programs before going any further. Click Next to proceed.
4. In the Select i!-FTPSender Install Location dialog, use the Browse button to navigate to a
directory other than the default install directory, if desired. Click Next.
5. In the i!-FTPSender Shortcut Creation dialog, select Install Shortcut Icons for the installed
components on your desktop, if desired.
6. Click Next in the Start i!-FTPSender Installation dialog to install the selected components.
7. The program prompts you to restart your system to complete the installation.
i!-FTPSender
1
Introduction
2
i!-FTPSender
Running i!-FTPSender
Programming
i!-FTPSender is a NetLinx module you can add to any program. You interact with the module
through a virtual device supporting:
Channels
Strings
Send_Commands
Channels
The following table lists the channels supported by i!-FTPSender.
i!-FTPSender Channels
ChannelDescription
250Channel turns on when the module is communicating with the source server.
251Channel turns on when the module is communicating with the destination server.
255When channel is on, debugging messages from the module are printed to terminal.
Running i!-FTPSender
Strings
The following table lists the strings supported by i!-FTPSender.
i!-FTPSender Strings
S:<code> <message>
D:<code> <message>
Source server message. Code is the FTP return code and message is a message associated with code.
Destination server message. Code is the FTP return code and message is a
message associated with code.
Send_Commands
The following table lists the Send-Commands supported by i!-FTPSender.
i!-FTPSender Commands
COPY-SourceFile[;DestFile]
Copies SourceFile from source
server to destination server.
VERSION
Prints the module version to the
terminal or telnet window.
Syntax:
’COPY-SourceFile[;DestFile]’
Destination file can be specified as DestFile or will default to SourceFile.
Both file names can include a directory path from the root of the FTP server.
Example:
SEND_COMMAND <DEV>,"’COPY-;cSFileName’"
Copies cSFileName from source server to destination server.
Syntax:
’VERSION’
Example:
SEND_COMMAND <DEV>,’VERSION’
Prints the module version to the terminal or Telnet window.
i!-FTPSender
3
Running i!-FTPSender
Example Code
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
dvFTPSServer = 0:8:0 // master port for source ftp socket
dvFTPDServer = 0:9:0 // master port for destination ftp socket
TP = 128:1:0
vdvFTPDiag = 33001:1:0 // virtual device for receipt of ftp messages
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
FTPSServerBusy = 250 // flag if source socket is open
FTPDServerBusy = 251 // flag if destination socket is open
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
{
(* Source Server *)
cSourceIP = '192.168.13.33' // define source IP
cSourceUser = 'NetLinx' // username for above
cSourcePass = 'password' // password for above
(* Destination Server *)
cDestIP = '192.168.13.151' // define destination IP
cDestUser = 'NetLinx' // username for above
cDestPass = 'password' // password for above
SWITCH (GET_LAST(dcFTPCopy))
{
CASE 1:
{
(* File *)
cSFileName = 'ftptest.txt' // filename to copy
(* This will cause the file to be copied! *)
SEND_COMMAND vdvFTPDiag,"'COPY-',cSFileName"
cButtonPressed = 1
}
CASE 2:
{
(* File *)
cSFileName = 'ftptest.txt' // filename to copy
cDFileName = 'dir1\ftptest.txt' // filename to copy
(* This will cause the file to be copied! *)
SEND_COMMAND vdvFTPDiag,"'COPY-',cSFileName,';',cDFileName"
cButtonPressed = 2
}
CASE 3:
{
(* File *)
cSFileName = 'dir1\ftptest1.txt' // filename to copy
cDFileName = 'ftptest1.txt' // filename to copy
(* This will cause the file to be copied! *)
SEND_COMMAND vdvFTPDiag,"'COPY-',cSFileName,';',cDFileName"
cButtonPressed = 3
}
CASE 4:
{
(* File *)
cSFileName = 'dir1\ftptest1.txt' // filename to copy
cDFileName = 'dir2\ftptest.txt' // filename to copy
(* This will cause the file to be copied! *)
SEND_COMMAND vdvFTPDiag,"'COPY-',cSFileName,';',cDFileName"
cButtonPressed = 4
}
}
}
}
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
The IP address or host name supplied for the FTP server does not have an FTP server
running.
The username and/or password may be incorrect.
The source file does not exist.
The destination directory does not exist.
The destination user does not have write access to save the new file.
All of these problems can be solved by watching the strings provided from the i!-FTPSender
module and acting on that information.
This code may not work to FTP files between all FTP servers. Some servers, by default, disable
server to server transfers (also called passive mode) which is used by i!-FTPSender for transferring
files. For instance, Microsoft's IIS disables server to server transfers by default. For more
information, see the Microsoft Support Article at:
To learn more about FTP file transfers, go to www.protocols.com for general information about
FTP or www.faqs.org/rfcs/rfc959.html (RFC959) for more detailed FTP specifications. For
reference, i!-FTPSender operates under the server-server model described in section 2.3 and the
command sequence outlined in Figure 3 of section 5.2 of Postel & Reynolds' RFC 959.
6
i!-FTPSender
Running i!-FTPSender
i!-FTPSender
7
AMX reserves the right to alter specifications without notice at any time.
2005 AMX Corporation. All rights reserved. AMX, the AMX logo, the building icon, the home icon, and the light bulb icon are all trademarks of AMX Corporation.