support for line disciplines (TTY, PPP)
ttynvt now uses pseudoterminal (pty) to be able to get use of the tty line disciplines. Currently only the line discipline: TTY and PPP are supported.
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
ttynvt makes a virtual serial device (tty) and connects
|
||||
the device to a Network Virtual Terminal (NVT).
|
||||
|
||||
+-ttynvt-+------------------------+
|
||||
| |\ |
|
||||
| | +---------------+ |
|
||||
| | | |
|
||||
| | | |
|
||||
/dev/ttyNVT | pty /dev/ppp pty |
|
||||
| | slave | master |
|
||||
| | | | | |
|
||||
--------------------------------------------------
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
+--FUSE--+ +-tty--ldisc------+ TCP--->host
|
||||
|
||||
|
||||
1 Build environment
|
||||
The gcc compiler is used by default (see Makefile).
|
||||
libfuse-dev - Filesystem in Userspace (development) must be installed
|
||||
@@ -9,8 +26,12 @@
|
||||
libpthread and libfuse must be installed in the root filesystem.
|
||||
|
||||
3 Build
|
||||
The default target in the Makefile builds the Network Virtual Terminal.
|
||||
Output name is: ttynvt.
|
||||
$ autoreconf -vif
|
||||
$ ./configure ...
|
||||
$ make
|
||||
|
||||
The default target in the Makefile builds the Network Virtual Terminal.
|
||||
Output name is: ttynvt.
|
||||
|
||||
4 Run
|
||||
The application (ttynvt) installs a virtual serial device in the /dev
|
||||
@@ -20,7 +41,7 @@
|
||||
is started (command-line options).
|
||||
|
||||
E.g.
|
||||
./ttynvt -M 199 -m 6 -n ttyNVT0 -p 5020 -s 169.254.1.1
|
||||
./ttynvt -M 199 -m 6 -n ttyNVT0 -s 169.254.1.1:5020
|
||||
|
||||
To get a list of all command-line options:
|
||||
./ttynvt --help
|
||||
@@ -28,7 +49,7 @@
|
||||
5. Test
|
||||
The serial server: ser2net (http://ser2net.sourceforge.net/) might be used
|
||||
to test the virtual serial server on the target.
|
||||
Install the server (ser2net) and add folling line to the configuration
|
||||
Install the server (ser2net) and add following line to the configuration
|
||||
file (/etc/ser2net.conf):
|
||||
5020:telnet:0:/dev/ttyS0:115200 remctl NONE 1STOPBIT 8DATABITS RTSCTS HANGUP_WHEN_DONE
|
||||
At the server, plug-in a loopback connector in the serial port (ttyS0).
|
||||
@@ -37,7 +58,8 @@
|
||||
minicom -D /dev/ttyNVT0
|
||||
|
||||
6 Diagnostic
|
||||
Add the command-line option '-l' to enable logging of diagnostic information.
|
||||
Add the command-line option '-D <level>' to enable logging of diagnostic information.
|
||||
The log is forwarded to syslog with the debug level.
|
||||
Wireshark is also very useful when debugging the interface between the client
|
||||
and the server.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user