Howto configure PPPD to use both DIALIN+DIALOUT ? - PPP

This is a discussion on Howto configure PPPD to use both DIALIN+DIALOUT ? - PPP ; Hi, My (embedded) Linux device will normally have a dialout connection to internet. (Using a gsm GPRS modem) Now, on some occasions I don't use dialout, but then I want to be able to use the gsm modem to accept ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Howto configure PPPD to use both DIALIN+DIALOUT ?

  1. Howto configure PPPD to use both DIALIN+DIALOUT ?

    Hi,


    My (embedded) Linux device will normally have a dialout connection to
    internet.
    (Using a gsm GPRS modem)

    Now, on some occasions I don't use dialout, but then I want to be able to
    use the gsm modem to accept calls.

    I have seen how to configure PPPD to enable DIALIN or DIALOUT
    but not simultaneously.

    Can anyone shed some light on how to achieve this?


    --

    Many regards,

    Bonny Gijzen




  2. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    "Bonny Gijzen" writes:

    ]Hi,


    ]My (embedded) Linux device will normally have a dialout connection to
    ]internet.
    ](Using a gsm GPRS modem)

    ]Now, on some occasions I don't use dialout, but then I want to be able to
    ]use the gsm modem to accept calls.

    ]I have seen how to configure PPPD to enable DIALIN or DIALOUT
    ]but not simultaneously.

    ]Can anyone shed some light on how to achieve this?

    mgetty to answer the modem when it gets a RING message, and hand off to
    pppd. (configure login.config for AutoPPP).


  3. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    "Bill Unruh" wrote in message
    news:c64796$33q$1@string.physics.ubc.ca...

    > mgetty to answer the modem when it gets a RING message, and hand off to
    > pppd. (configure login.config for AutoPPP).


    Yes, thats what I've read.
    But if mgetty has opened the serial port, then it is not possible anymore
    for me to dialout.

    So one solution is to have 2 scripts, one for dialin and one for dialout,
    and then kill and start the needed scripts.

    This is not what I prefer. I would like to setup PPPD in such a way that it
    can accept a call and dialout when needed. Is that possible in anyway ?


    Rgs Bonny,



  4. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    Bonny Gijzen wrote:

    > But if mgetty has opened the serial port, then it is not possible
    > anymore for me to dialout.


    > So one solution is to have 2 scripts, one for dialin and one for
    > dialout, and then kill and start the needed scripts.


    > This is not what I prefer. I would like to setup PPPD in such a way
    > that it can accept a call and dialout when needed. Is that possible
    > in anyway ?


    From info mgetty, under How "`mgetty' works":

    When mgetty is started, it first checks if a valid lock file held by
    another process exists. If it does, this means that the port is in use,
    and mgetty will wait until the lock file goes away. Invalid lock files,
    e.g. for nonexistent processes ("stale" locks), are ignored.

    Once the port is free, mgetty creates its own lockfile, initializes
    the modem and removes its lock file again. Then it waits for something
    to happen on the port. Note that it does not _read_ any characters, it
    just checks if there are any available for reading by using `poll()' or
    `select()'.

    You should read the entire section and make sure pppd creates a lock file.

    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/

  5. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    Thank you for this info.

    --

    Many regards,

    Bonny Gijzen



    "Clifford Kite" wrote in message
    news:l3t56c.tfd.ln@corncob.localhost.tld...
    > Bonny Gijzen wrote:
    >
    > > But if mgetty has opened the serial port, then it is not possible
    > > anymore for me to dialout.

    >
    > > So one solution is to have 2 scripts, one for dialin and one for
    > > dialout, and then kill and start the needed scripts.

    >
    > > This is not what I prefer. I would like to setup PPPD in such a way
    > > that it can accept a call and dialout when needed. Is that possible
    > > in anyway ?

    >
    > From info mgetty, under How "`mgetty' works":
    >
    > When mgetty is started, it first checks if a valid lock file held by
    > another process exists. If it does, this means that the port is in use,
    > and mgetty will wait until the lock file goes away. Invalid lock files,
    > e.g. for nonexistent processes ("stale" locks), are ignored.
    >
    > Once the port is free, mgetty creates its own lockfile, initializes
    > the modem and removes its lock file again. Then it waits for something
    > to happen on the port. Note that it does not _read_ any characters, it
    > just checks if there are any available for reading by using `poll()' or
    > `select()'.
    >
    > You should read the entire section and make sure pppd creates a lock file.
    >
    > --
    > Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    > PPP-Q&A links, downloads: http://ckite.no-ip.net/




  6. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    I noticed that the specific getty variants all behave a little differently,
    and that some variants aren't even suitable for use with dial-in.

    On my embedded device I am using Busybox.
    Is the getty version from Busybox useable for dial-in ?


    Rgs Bonny



  7. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    "Bonny Gijzen" writes:

    ]"Bill Unruh" wrote in message
    ]news:c64796$33q$1@string.physics.ubc.ca...

    ]> mgetty to answer the modem when it gets a RING message, and hand off to
    ]> pppd. (configure login.config for AutoPPP).

    ]Yes, thats what I've read.
    ]But if mgetty has opened the serial port, then it is not possible anymore
    ]for me to dialout.

    I wonder why my system works then?
    Your statement is not true. mgetty opens the serial port locking it
    while it is opened. It then removes the lock.
    Your use of ppp MUST also lock the port since mgetty checks the port
    lock when it sees data on the port. If it sees a lock it assumes
    something else is using the port. It it does not, it tries to handle the
    data itself-- whcih is of course a disaster for the other program trying
    to use it.
    So use the lock option to pppd
    (The word
    lock
    in /etc/ppp/options)


    ]So one solution is to have 2 scripts, one for dialin and one for dialout,
    ]and then kill and start the needed scripts.

    No need.


    ]This is not what I prefer. I would like to setup PPPD in such a way that it
    ]can accept a call and dialout when needed. Is that possible in anyway ?

    As I said I do it all the time.



    ]Rgs Bonny,



  8. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    "Bonny Gijzen" writes:

    ]I noticed that the specific getty variants all behave a little differently,
    ]and that some variants aren't even suitable for use with dial-in.

    ]On my embedded device I am using Busybox.
    ]Is the getty version from Busybox useable for dial-in ?


    mgetty is the getty that is recommended by everyone for dialin control.
    Eveyone.


  9. Re: Howto configure PPPD to use both DIALIN+DIALOUT ?

    Hi Bill,



    Yes you are right.
    I read it afterwards on some mgetty webpage.

    It is possible so it seems, so I will work on it when the project starts.
    If I have some questions regarding the setup I will come back here

    --

    Many regards,

    Bonny Gijzen


    "Bill Unruh" wrote in message
    news:c68oki$p4r$1@string.physics.ubc.ca...
    > "Bonny Gijzen" writes:
    >
    > ]"Bill Unruh" wrote in message
    > ]news:c64796$33q$1@string.physics.ubc.ca...
    >
    > ]> mgetty to answer the modem when it gets a RING message, and hand off to
    > ]> pppd. (configure login.config for AutoPPP).
    >
    > ]Yes, thats what I've read.
    > ]But if mgetty has opened the serial port, then it is not possible anymore
    > ]for me to dialout.
    >
    > I wonder why my system works then?
    > Your statement is not true. mgetty opens the serial port locking it
    > while it is opened. It then removes the lock.
    > Your use of ppp MUST also lock the port since mgetty checks the port
    > lock when it sees data on the port. If it sees a lock it assumes
    > something else is using the port. It it does not, it tries to handle the
    > data itself-- whcih is of course a disaster for the other program trying
    > to use it.
    > So use the lock option to pppd
    > (The word
    > lock
    > in /etc/ppp/options)
    >
    >
    > ]So one solution is to have 2 scripts, one for dialin and one for dialout,
    > ]and then kill and start the needed scripts.
    >
    > No need.
    >
    >
    > ]This is not what I prefer. I would like to setup PPPD in such a way that

    it
    > ]can accept a call and dialout when needed. Is that possible in anyway ?
    >
    > As I said I do it all the time.
    >
    >
    >
    > ]Rgs Bonny,
    >
    >




+ Reply to Thread