Re: Wanted: serial driver (RS232) emulation on LAN
- From: Grant Edwards <grante@xxxxxxxx>
- Date: Fri, 23 Dec 2005 15:46:58 -0000
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
.
- References:
- Wanted: serial driver (RS232) emulation on LAN
- From: Stefan Schober
- Re: Wanted: serial driver (RS232) emulation on LAN
- From: Grant Edwards
- Re: Wanted: serial driver (RS232) emulation on LAN
- From: Grant Edwards
- Wanted: serial driver (RS232) emulation on LAN
- Prev by Date: Re: Wanted: serial driver (RS232) emulation on LAN
- Next by Date: Re: What is the purpose of %fs?
- Previous by thread: Re: Wanted: serial driver (RS232) emulation on LAN
- Next by thread: Re: Wanted: serial driver (RS232) emulation on LAN
- Index(es):
Relevant Pages
|
|