pppd and DTR signal

Hallo,
I have following problem: using QNX 4.25, TCP/IP toolkit 4.25 (pppd from
19.2.1999) I try to connect to server:

  1. my proprietary modem driver dials and establishes modem connection
  2. pppd with option “connect chat -f login_script” is launched

However, pppd before launching chat drops DTR signal and the line disconnects
before chat can login.

Question: can I suppress the pppd manipulation with DTR signal through
some option (pppd option “modem”, either enabled or disabled, does not
affect this behaviour) ?

If no, where can I find the pppd sources ?

Please, note:
one can do that by changing the modem settings to “DTR ALWAYS ON” (if a
modem supports this), or one can use the chat script not only for login,
but also for dialing as well (no need for any modem driver), however:

  1. some modems don’t support “+++” escape sequence, the DTR signal
    must be used for disconnecting
  2. we use proprietary modem driver (for dialling, for call answering),
    so I should dial through this driver and not through chat script
    in order to avoid inconsistencies in project.

Thanks.


Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:matog@microstep-mis.sk

If your driver is a shell script, look at stty +clocal -hupcl.
+clocal tell the serial port to ignore the state of the CD line,
and -hupcl tells the driver not to drop DTR when no one has the
port open.

If your driver is a C prog, look at tcsetattr(), in particular
c_cflag, the macros CLOCAL and HUPCL, which are described under
tcgetattr().

Richard

matog@microstep-mis.sk wrote:

Hallo,
I have following problem: using QNX 4.25, TCP/IP toolkit 4.25 (pppd from
19.2.1999) I try to connect to server:

  1. my proprietary modem driver dials and establishes modem connection
  2. pppd with option “connect chat -f login_script” is launched

However, pppd before launching chat drops DTR signal and the line disconnects
before chat can login.

Question: can I suppress the pppd manipulation with DTR signal through
some option (pppd option “modem”, either enabled or disabled, does not
affect this behaviour) ?

If no, where can I find the pppd sources ?

Please, note:
one can do that by changing the modem settings to “DTR ALWAYS ON” (if a
modem supports this), or one can use the chat script not only for login,
but also for dialing as well (no need for any modem driver), however:

  1. some modems don’t support “+++” escape sequence, the DTR signal
    must be used for disconnecting
  2. we use proprietary modem driver (for dialling, for call answering),
    so I should dial through this driver and not through chat script
    in order to avoid inconsistencies in project.

Thanks.


Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:> matog@microstep-mis.sk

Richard R. Kramer <rrkramer@kramer-smilko.com> wrote:

If your driver is a shell script, look at stty +clocal -hupcl.
+clocal tell the serial port to ignore the state of the CD line,
and -hupcl tells the driver not to drop DTR when no one has the
port open.

Thank you for an answer, but I think this is not the case. Our modem
driver is a C program, that opens serial port and controls modem
according to client requests (it dials numbers, answers calls, registers
proxy from clients, periodically checks CD etc.)

  • at least this program has the port open all the time.

Now I would like to modify the driver to setup the pppd connection, the
driver dials the number correctly, the connection is established, then the
pppd is launched.
However: if the pppd has option “connect” (for login, password) enabled,
it drops DTR signal and modem hangs the established connection.


If your driver is a C prog, look at tcsetattr(), in particular
c_cflag, the macros CLOCAL and HUPCL, which are described under
tcgetattr().

Richard

matog@microstep-mis.sk > wrote:

Hallo,
I have following problem: using QNX 4.25, TCP/IP toolkit 4.25 (pppd from
19.2.1999) I try to connect to server:

  1. my proprietary modem driver dials and establishes modem connection
  2. pppd with option “connect chat -f login_script” is launched

However, pppd before launching chat drops DTR signal and the line disconnects
before chat can login.

Question: can I suppress the pppd manipulation with DTR signal through
some option (pppd option “modem”, either enabled or disabled, does not
affect this behaviour) ?

If no, where can I find the pppd sources ?

Please, note:
one can do that by changing the modem settings to “DTR ALWAYS ON” (if a
modem supports this), or one can use the chat script not only for login,
but also for dialing as well (no need for any modem driver), however:

  1. some modems don’t support “+++” escape sequence, the DTR signal
    must be used for disconnecting
  2. we use proprietary modem driver (for dialling, for call answering),
    so I should dial through this driver and not through chat script
    in order to avoid inconsistencies in project.

Thanks.


Mgr. Martin Gazak, MicroStep-MIS
Ilkovicova 3, 841 04 Bratislava, Slovakia
Tel: +421 2 60291 816
e-mail:matog@microstep-mis.sk

matog@microstep-mis.sk wrote:

Question: can I suppress the pppd manipulation with DTR signal through
some option (pppd option “modem”, either enabled or disabled, does not
affect this behaviour) ?

Start pppd with “local” option. It suppress changing of DTR (but also
ignores CD).

Regards,
Grzegorz Wrobel

wrobel@no-spam.zdania.com.pl Experimental Department of Scientific
phone: (+48 12) 617-2883 Equipment and Automation
fax: (+48 12) 634-2205 30-059 Krakow, al.Mickiewicza 30, Poland