8 WebNet as an RS232 Gateway
A very useful application of the WebNetis as a gateway between an ethernet network and
an RS232 equipped device. Many existing devices are presently controlled via an RS232
connection, and by applying a WebNetto such a device, it becomes Internet-enabled.
The user can then, e.g. read status information on a web page, and control the equipment
by activating web forms. The “intelligence” of the controlling system can be placed either
on the WebNet module or on the PC – pro’s and con’s of each are described in section 8.2
below.
First, we describe a quick way to establish a “hole through” the RS232-ethernet gateway,
to see that it works.
8.1 Loopback example
We wish to establish a connection from the PC to the WebNet through the serial line,
and a connection “back” from the WebNet to the PC through the ethernet connection – a
loopback connection.
T e rm i n a l
e m u l a to r
T e ln e t
a p p l i c a t i o n
M o d e m
e m u l a t i o n
S e r ia l IF S e r ia l IF
E t he r n e t IF E t he r n e t IF
P C W e b N e t
Figure 22: Principle of the loopback example
The example requires a telnet application and a terminal emulator application on the PC.
Telnetis included in Win95/98/NT and is reached from the DOS prompt. They also contain
a terminal emulator called “Hyper Terminal”, whichis found under
start -> programs -> accessories -> communication
The following steps are carried out (Weassume the PC already has network connection to
the WebNet):
A serial cord is connected to the WebNet RS232 port and to a free COM-port on the
PC (let us say COM2).
34 WebNet User’s Guide