Send/Receive Procedures in pppd 2.4.1 - PPP

This is a discussion on Send/Receive Procedures in pppd 2.4.1 - PPP ; I have a Multitech modem that will support AT commands even while the PPP link is up if I send this: +++ .... and come back online when "ato0" is issued. I'd like to do this while the PPP link ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Send/Receive Procedures in pppd 2.4.1

  1. Send/Receive Procedures in pppd 2.4.1

    I have a Multitech modem that will support AT commands even while the
    PPP link is up if I send this:

    +++

    .... and come back online when "ato0" is issued.

    I'd like to do this while the PPP link is up because the modem is
    aware of certain things. It's wireless, and knows the signal strength
    it's seeing, the VSWR, and so on. I'd like the Linux box to know
    these things, too, so asking the modem seems natural enough.

    After beating my head against several brick walls, it looks like I'm
    going to have to put procedures to handle this in pppd itself (since
    pppd doesn't look like it wants to share the serial port; even the
    usual read(,,) and write(,,) procedures fail). What are the
    procedures in pppd that send and receive characters? And what
    procedures are run when the PPP link is considered "up"?

    Thanks in advance for any help you can lend me. I'm rather new at
    this.


  2. Re: Send/Receive Procedures in pppd 2.4.1

    "addams013" writes:
    > I have a Multitech modem that will support AT commands even while the
    > PPP link is up if I send this:
    >
    > +++
    >
    > ... and come back online when "ato0" is issued.


    Actually, I've used somewhat slicker modems in the past that are able
    to drop to command mode when DTR is dropped. It makes for a bit of a
    cleaner (and faster) implementation.

    Better still are the commercial modems used in communications servers;
    they typically have a separate interface for extracting statistics and
    issuing commands while the modem is on-line.

    > I'd like to do this while the PPP link is up because the modem is
    > aware of certain things. It's wireless, and knows the signal strength
    > it's seeing, the VSWR, and so on. I'd like the Linux box to know
    > these things, too, so asking the modem seems natural enough.


    Yes. Many people have discussed this before, but it seems that nobody
    has been interested enough to work out the design and code.

    > After beating my head against several brick walls, it looks like I'm
    > going to have to put procedures to handle this in pppd itself (since
    > pppd doesn't look like it wants to share the serial port; even the
    > usual read(,,) and write(,,) procedures fail). What are the
    > procedures in pppd that send and receive characters? And what
    > procedures are run when the PPP link is considered "up"?


    No, I don't think that'll cut it.

    Pppd starts off by running the serial connection in a normal
    character-oriented mode. This is used to exec the 'chat' process (the
    "connect" command) and any other serial initialization. Once that's
    done, it switches the kernel into PPP mode.

    When the kernel is in that mode, pppd receives only complete and
    decoded AHDLC frames that don't match one of the kernel's well-known
    protocol ID numbers. Those that do match (IP, IPv6, IPX, and a few
    others) are sent directly to the kernel routine that handles those
    packets.

    Similarly, writes by pppd to the serial port are AHDLC-encoded and
    sent as packets.

    In other words, data packets are handled in the kernel, not in user
    space.

    Thus, in order to change the system so that it can send a non-PPP
    packet (such as +++) when in PPP mode, you'll need to
    modify the kernel modules that handle AHDLC encoding. Pppd is just
    the start of such a project.

    > Thanks in advance for any help you can lend me. I'm rather new at
    > this.


    Good luck.

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677

+ Reply to Thread