public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Dalibor Kranjcic <dalibor.kranjcic@ultra.si>
Cc: linux-serial@vger.kernel.org
Subject: Re: modem multiplexing mode?
Date: Tue, 19 Aug 2003 09:43:13 -0400	[thread overview]
Message-ID: <20030819134313.GC4698@think> (raw)
In-Reply-To: <1061286695.1312.172.camel@dalibork.ultra.si>

On Tue, Aug 19, 2003 at 11:51:32AM +0200, Dalibor Kranjcic wrote:
> Is there any way to send addtional traffic (AT commands) to serial port 
> (/dev/ttyS1 (COM2) in my example) when ppp is atached to it, thus
> providing something as a modem 
> multiplexing mode/protocol (Wavecom GPRS modem), since /dev/ttyS1 is
> locked by pppd and used by ppp modules. 

This is actually a very hard problem, since there's a fundamental race
condition --- you need to at the kernel level, block off access to the
ppp port while your user space application sends commands to the
modem, and the kernel would have to send +++ to put the modem into
command mode, which means the kernel would need to know about the
modem command sequences.  Worse yet, there is no way of know whether
or not the "OK\n" printed after you send the +++ sequence is the
response from the modem, or part of an incoming PPP packet that was
sent just as you were trying to put the modem into command mode.

> Is it possible to send AT commands when ppp traffic is running on serial
> port?

It's possible, but it would require a lot of kernel hacking, not only
in the serial driver (and putting carnal knowledge about modems into
the serial driver where it has no place belonging), but also in the
PPP driver, in order to intercept the return messages from the modem.
It would be a very, very, very, very hard thing to do.  And probably
not worth it.  Why would you want to do such a thing, anyway?

						- Ted

  reply	other threads:[~2003-08-19 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-19  9:51 modem multiplexing mode? Dalibor Kranjcic
2003-08-19 13:43 ` Theodore Ts'o [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-21  7:28 Dalibor Kranjcic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030819134313.GC4698@think \
    --to=tytso@mit.edu \
    --cc=dalibor.kranjcic@ultra.si \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox