lkml.org 
[lkml]   [2003]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Serial port over TCP/IP
Date
From

Michael Buesch wrote:
> Is it possible to make a char-dev (a serial device ttyS0)
> available via TCP/IP on a network like it is possible
> for block-devices like a harddisk via nbd?
> Is kernel-support for this present?
> If not, is it technically possible to develop such a driver?

Hi Michael,

No need for kernel support. This simple shell-script is what I use for
a project at the moment.

greetings,
Rob van Nieuwkerk

------------------------------------------------
#!/bin/sh

TCP_PORT=4000
SERIAL_PORT=/dev/ttyS1
BAUDRATE=19200

while (true)
do
(stty $BAUDRATE -echo clocal raw pass8 ; exec nc -l -p $TCP_PORT) \
< $SERIAL_PORT > $SERIAL_PORT
done
------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.070 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site