Kim Woelders 0f879c8b61 Fix zero size reads
In certain cases we may get zero size reads (e.g. if the server sends an
rfc2217 notification without any other data).
In this situation we must not propagate the zero size read to user space
as it may be interpreted as end of input.

I haven't found a way to tell fuse that it should just ignore this read
but passing EINTR seems to work.
2018-07-02 12:40:27 +02:00
2018-06-28 11:58:03 +02:00
2018-06-28 11:58:03 +02:00
2018-06-28 11:58:03 +02:00
2018-06-19 16:11:28 +02:00
2018-06-19 15:38:46 +02:00
2018-06-19 15:38:46 +02:00
2018-06-19 15:38:46 +02:00
2018-06-28 13:37:25 +02:00
2018-07-02 12:40:27 +02:00

1 Build environment
  The gcc compiler is used by default (see Makefile).
  libfuse-dev - Filesystem in Userspace (development) must be installed
  at the build system.
  glibc must support pthreads.

2 Target
  The linux kernel at the target system must support FUSE (FUSE_FS=y) and
  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.

4 Run
  The application (ttynvt) installs a virtual serial device in the /dev
  directory (by default: /dev/ttyNVT0).
  The major/minor number of the device, the address (name/IP) and the port
  number of the serial server must be specified when the application
  is started (command-line options).

  E.g.
  ./ttynvt -M 199 -m 6 -n ttyNVT0 -p 5020 -s 169.254.1.1

  To get a list of all command-line options:
  ./ttynvt --help

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
   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).
   At the target, open the virtual serial port, with a termial program,
   e.g minicom:
   minicom -D /dev/ttyNVT0

6 Diagnostic
  Add the command-line option '-l' to enable logging of diagnostic information.
  Wireshark is also very useful when debugging the interface between the client
  and the server.

Ref: RFC-854  - Telnet Protocol Specification
     RFC-2217 - Telnet Com Port Control Option
S
Description
Virtual Network Terminal supporting the Com Port Control Option (RFC2217)
Readme 171 KiB
Languages
C 91.3%
C++ 5.3%
Makefile 2.1%
M4 1.3%