Skip site navigation (1)Skip section navigation (2)
Date:      28 May 1998 08:07:09 -0500
From:      Dave Marquardt <marquard@zilker.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to create virtual com port device ?
Message-ID:  <85af82a6iq.fsf@localhost.zilker.net>
In-Reply-To: "M.C Wong"'s message of "Thu, 28 May 1998 09:49:23 EST"
References:  <19980527234923.2142.qmail@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"M.C Wong" <mcwong@hotmail.com> writes:
> I am using Ascend MAX which as something called MAXDIAL, which 
> essentially is a way of telnet into the MAX on some port numbers and
> get connected to the modem and one can do all sort of at commands.
> 
> However, I prefer to create some kind of virtual com port device special 
> file under /dev so that one doesn't have to worrying about
> telnet into the MAX etc and any other program that used to talk to
> real com port would still work transparently.
> 
> Can someone suggest how I can do that properly ??

Well, not in a traditiional sense of a device special file.  That
would imply having a pseudo-device driver that understands how to
telnet into the MAX.  That doesn't seem like a kernel task to me.

You might grab one of the PTYs in /dev, make a symlink to the name you
want, then create a daemon that waits for someone to open the PTY or
TTY.  Once the open happens, the daemon can telnet to the MAX.  Once
it's all set up, you can just start passing data back and forth
between the user process, the daemon, and telnet.

Another idea:  Create an "expect" script that does the telnet and all,
maybe even "invisibly", then passes control to the user once you're
logged in to the MAX.

-Dave

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85af82a6iq.fsf>