* Serial port over TCP/IP
@ 2003-04-06 12:47 Michael Buesch
2003-04-06 13:11 ` Dr. David Alan Gilbert
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Michael Buesch @ 2003-04-06 12:47 UTC (permalink / raw)
To: linux-kernel
Hi.
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?
Thanks.
Regards Michael Buesch.
--
My homepage: http://www.8ung.at/tuxsoft
fighting for peace is like fu**ing for virginity
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Serial port over TCP/IP
2003-04-06 12:47 Serial port over TCP/IP Michael Buesch
@ 2003-04-06 13:11 ` Dr. David Alan Gilbert
2003-04-06 13:39 ` Michael Buesch
2003-04-06 13:35 ` Rob van Nieuwkerk
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2003-04-06 13:11 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-kernel
* Michael Buesch (freesoftwaredeveloper@web.de) wrote:
> Hi.
>
> 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?
I keep thinking that it would be nice to have a mechanism for user space
char devices; it would have to have a mechanism to pass all the ioctls
to the process that dealt with it.
(The particular cases which sparked this idea for me were to do user
space SCSI tape drivers to do raid tape and the like, and for emulation
of touch screens or mice on systems that only had the other.).
Dave
---------------- Have a happy GNU millennium! ----------------------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Serial port over TCP/IP
2003-04-06 13:11 ` Dr. David Alan Gilbert
@ 2003-04-06 13:39 ` Michael Buesch
2003-04-06 13:46 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2003-04-06 13:39 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: linux-kernel
On Sunday 06 April 2003 15:11, Dr. David Alan Gilbert wrote:
> I keep thinking that it would be nice to have a mechanism for user space
> char devices; it would have to have a mechanism to pass all the ioctls
> to the process that dealt with it.
But wouldn't this make too much overhead, if implemented all in userspace?
I say this, because nbd is also implemented in user- und kernel-space.
Regards Michael Buesch.
--
My homepage: http://www.8ung.at/tuxsoft
fighting for peace is like fu**ing for virginity
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Serial port over TCP/IP
2003-04-06 13:39 ` Michael Buesch
@ 2003-04-06 13:46 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2003-04-06 13:46 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-kernel
* Michael Buesch (freesoftwaredeveloper@web.de) wrote:
> On Sunday 06 April 2003 15:11, Dr. David Alan Gilbert wrote:
> > I keep thinking that it would be nice to have a mechanism for user space
> > char devices; it would have to have a mechanism to pass all the ioctls
> > to the process that dealt with it.
>
> But wouldn't this make too much overhead, if implemented all in userspace?
> I say this, because nbd is also implemented in user- und kernel-space.
Sure it would have overhead; but it would be a general mechanism and
mean that the kernel didn't need lots of char drivers (except for boot
time things). Lots of devices are really just filters/wrappers over
other more basic devices (look at the growing pile of USB serial
device drivers). Most char devices have such a low throughput that the
little overhead wouldn't make much difference, but would simplify the
kernel.
Dave
---------------- Have a happy GNU millennium! ----------------------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Serial port over TCP/IP
2003-04-06 12:47 Serial port over TCP/IP Michael Buesch
2003-04-06 13:11 ` Dr. David Alan Gilbert
@ 2003-04-06 13:35 ` Rob van Nieuwkerk
2003-04-06 13:41 ` Michael Buesch
[not found] ` <200304062247.45525.freesoftwaredeveloper@web.de>
2003-04-07 2:37 ` H. Peter Anvin
3 siblings, 1 reply; 9+ messages in thread
From: Rob van Nieuwkerk @ 2003-04-06 13:35 UTC (permalink / raw)
To: Michael Buesch; +Cc: robn, linux-kernel
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
------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread[parent not found: <200304062247.45525.freesoftwaredeveloper@web.de>]
* Re: Serial port over TCP/IP
2003-04-06 12:47 Serial port over TCP/IP Michael Buesch
` (2 preceding siblings ...)
[not found] ` <200304062247.45525.freesoftwaredeveloper@web.de>
@ 2003-04-07 2:37 ` H. Peter Anvin
2003-04-07 14:53 ` Michael Buesch
3 siblings, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2003-04-07 2:37 UTC (permalink / raw)
To: linux-kernel
Followup to: <200304061447.46393.freesoftwaredeveloper@web.de>
By author: Michael Buesch <freesoftwaredeveloper@web.de>
In newsgroup: linux.dev.kernel
>
> 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?
>
I think what you need is the enhanced pty driver patch which was
posted recently, which made is possible for a user-space process to
also capture ioctls() such as baud rate setting etc. Then the rest of
the work can be done in userspace.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-04-07 14:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-06 12:47 Serial port over TCP/IP Michael Buesch
2003-04-06 13:11 ` Dr. David Alan Gilbert
2003-04-06 13:39 ` Michael Buesch
2003-04-06 13:46 ` Dr. David Alan Gilbert
2003-04-06 13:35 ` Rob van Nieuwkerk
2003-04-06 13:41 ` Michael Buesch
[not found] ` <200304062247.45525.freesoftwaredeveloper@web.de>
[not found] ` <20030406161206.A12616@uph.com>
2003-04-06 21:30 ` Michael Buesch
2003-04-07 2:37 ` H. Peter Anvin
2003-04-07 14:53 ` Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox