Re: Wanted: serial driver (RS232) emulation on LAN



On 2005-12-23, Kasper Dupont <17618213612886246065@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Grant Edwards wrote:
>>
>> Yes, pppd will work with a pty. However, I've never seen a
>> serial<->Ethernet gateway that used PPP.
>
> No, because they are supposed to be operating at a lower
> protocol layer. But I expect pppd to be usable on top of
> most of them.

I still don't see what ppp has to do with the OP's question.

He's got a PBX with an RS-232 port, and some sort of management
program that wants to talk to that port through a normal tty
device. He wants a virtual, transparent connection between
/dev/ttyS<something> and a serial port in another room via
Ethernet. There are dozens of such devices available that
include tty drivers. He seems to have chosen one that doesn't
include such a driver.

I've never seen any Ethernet<->serial device that used a pty as
the interface because a pty only impliments a small subset of
the standard tty device API. If his applicatoin only needs that
limited subset, then he could use a pty. My _guess_ based on
past experience is that his application isn't going to be happy
talking to a pty.

pppd was intentionally designed to work with the minimal set of
features available with a pty. I doubt the designers of the
PBX management program did so.

>> I've reverse-engineered about a half dozen different units,
>> and they all use device drivers: none of them use PPP, and
>> none of them use a pty.
>
> Maybe they have more functionality than required by pppd.

Sort of. pppd relies on an external programs to do things like
set character length, stop bits, parity, detect RI, CD, DTR and
so on. If the underlying interface is a pty, none of that
stuff is possible. The fact that pppd doesn't perform those
functions doesn't mean they aren't required when one is dealing
with a physical serial port.

> But if Stefan doesn't need all that functinality why should he
> implement it?

>From my dealings with PBX console/control ports, I'm betting he
does need more functionality than a pty will provide. It all
depends on what his management program expects to do with the
port. He should be able to determine if a pty will work by
doing an strace on the program and examining the ioctl calls
it's making.

I still have a hard time believing he can write either a
user-space interface or a kernel-mode driver for less than the
cost of a device that includes a driver that impliments a real
tty device. If a week of his time isn't worth $200, then
writing his own pty interface daemon or tty driver is certainly
an option.

--
Grant Edwards
grante@xxxxxxxx

.



Relevant Pages

  • Re: pppd pty equivilent in FBSD
    ... >I have a question about pppd. ... but not in freebsd because the ... >implementation of pppd that comes with freebsd does not recognize the pty ... >conjuction with the pty option, the child process will have pipes on its ...
    (freebsd-net)
  • pppd pty equivilent in FBSD
    ... I have a question about pppd. ... but not in freebsd because the ... implementation of pppd that comes with freebsd does not recognize the pty ... From the pppd man page on a linux machine. ...
    (freebsd-net)
  • Re: pppd pty equivilent in FBSD
    ... You don't need the pty. ... 'client' is enabled by running ppp -ddial cli from rc script. ... and all the ssh stuff setup ... >I have a question about pppd. ...
    (freebsd-net)
  • Re: Wanted: serial driver (RS232) emulation on LAN
    ... >> to talk to a serial port. ... pppd will work with a pty. ... Prev by Date: ...
    (comp.os.linux.development.system)
  • Re: csh history and pts
    ... detection" with MPSAFE TTY, but grepping through the source and asking ... I still have no idea what "pty ... detection" is and why csh has the urge to "detect pty's". ... the shell thinks it is running under a window system (i.e., ...
    (freebsd-current)