EasyManua.ls Logo

W&T Com-Server++ - Application Examples

W&T Com-Server++
228 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
152
18�1�6 Application examples
Example 1:
Opening and closing the connection
1. Send the command string to the serial port. If the com-
plete string was received, the Com-Server begins to
open the connection and process the commands.
2. If the functions can be executed one after the other,
you get the string OK + Protocol Char.
3. Then the actual user data are sent, depending on the
command either from the serial port to the network or
the reverse.
4. In case of error the FTP server sends the error code +
Protocol Char + Protocol Char.
5. The connection is automatically closed in either case,
and you receive the end code + Protocol Char from the
FTP server.
Example 2:
User egon having the password happy wants to output
the file /etc/hosts in ASCII format. The value 003 (Ctrl C)
is entered as Protocol Char. The protocol would look as
follows:
Com-Server Serial device
<-----
egon<lf>happy<lf>TYPE A<lf>RETR /etc/hosts<lf><Ctrl C>
----->
OK<Ctrl C>
----->
[Content of le]<Ctrl C>
----->
221 Goodbye<Ctrl C>
Example 3:
User egon having the password happy would like to insert
binary data to the end of the file /usr/egon/config. The va-
lue 003 (Ctrl C) is entered as Protocol Char. The protocol
would look as follows:

Table of Contents

Related product manuals