7 Operation in Linux
the parameter with the default values. When this is finished, the Power LED blinks once. Do not
power off or reset the NetCom
+
before this blink is seen.
The Ethernet cable should not be connected, because the NetCom
+
uses DHCP in factory config-
uration. Without an Ethernet cable it does not attempt to find a DHCP server, which makes for
a faster reboot process.
7 Operation in Linux
In Linux there is no real tty driver available for NetCom Plus serial device servers. However for most
applications this is not a problem, since Linux is very good in networking. Either the application
can contact the Serial Port on the NetCom
+
via a TCP connection, or it may use a fixed tty
emulation of a serial port. In both configurations the parameters of the serial port are configured
on the NetCom
+
. Additionally the serial port is operating in the mode of TCP Raw Server, with
one defined TCP port to connect to (see
6.2.2.1 on page 74
and
6.2.2.2.2 on page 78
for details).
For the following sections the IP Address 192.168.1.198 is used, with 2001 as the TCP data port
number. This may be the serial port of a NetCom Plus 113 serial device server.
7.1 Via Fixed TTY Pseudo Serial Port (socat)
There are applications designed to operate via serial ports, and via this only. So they want to open
a device which behaves like a serial port, usually /dev/ttyS0 or /dev/modem. To create a pseudo
device of this type the program socat may be used.
s o c a t pty , l i n k =/dev / netcom0 , raw , w a i t s l a v e t c p : 1 9 2 . 1 6 8 . 1 . 2 4 9 : 2 0 0 1 &
This command creates a temporary pseudo tty device with the name as /dev/netcom0. Any name
is possible, as long as it does not conflict with already existing devices. The TCP connection will
be established to the serial port on NetCom
+
, but this is delayed until an application opens this
/dev/netcom0. The connection will be established as raw (without modifying data).
The terminating ’&’ in the line sends socat into background operation. It will terminate when
/dev/netcom0 is closed by the application.
minicom
−
D / dev / netcom0
This command will then start the application minicom as an example. In this example the created
/dev/netcom0 is used, so minicom operates via the serial port on the NetCom
+
.
Even when
minicom attempts to configure the serial port, this has no effect on the NetCom
+
. When minicom
is closed, the process of socat terminates as well. For next use socat must be started again, which
can be done in a script also.
The specification as “Fixed TTY” defines that behavior. Applications may use the pseudo port
like a serial port, but the serial configuration is fixed. Any commands to change the configuration
are accepted from the application, but they do not change the serial port operation.
September 2016
NetCom Plus User Manual
94
Summary of Contents for NetCom Plus 111
Page 133: ......