8WebNet as an RS232 Gateway

A very useful application of the WebNet is 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 WebNet to 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.1Loopback 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.

P C

T ERM INAL

EM ULATOR

T ELNET

APPLICATION

WEBN ET

M ODEM

EM ULATION

S ERIALIF

E THERNETIF

E THERNETIF

S ERIALIF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 22: Principle of the loopback example

The example requires a telnet application and a terminal emulator application on the PC. Telnet is included in Win95/98/NT and is reached from the DOS prompt. They also contain a terminal emulator called “Hyper Terminal”, which is found under

start -> programs -> accessories -> communication

The following steps are carried out (We assume 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

Page 34
Image 34
Addtron Technology manual WebNet as an RS232 Gateway