Re: PPP object questions

Kishimoto Toshio <toshio-DfIjI1/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi, Shawn,

> I've tried reusing my PPP object, and the second time it connected, 
> calling up() does not trigger an UP event.  The only thing I've done 
> between uses is call close() then freePort(), and then nothing else 
> until the next use, where I set the username and password, and then 
> call open().

Try to call these methods at each reusing PPP object, 
then UP event comes, I think.
    * setLocalAddress()
    * setRomoteAddress()
    * setRemoteAccm()
    * setLocalAccm()
    * setAuthenticate()
    * setUsername()
    * setPassword()

I do not use open() method.

At first time to create PPP object, I call
    (1) setup serial port
        ppp = new PPP();
        ppp.addEventLintener();
At each time to dial up,
    (2) ppp.setLocalAddress();
        ppp.setRomoteAddress();
        ppp.setRemoteAccm();
        ppp.setLocalAccm();
        ppp.setAuthenticate();
        ppp.setUsername();
        ppp.setPassword();
        and then reset a modem, send ATD command,
        ppp.up();
When UP event comes,
    (3) ppp.addInterface();
        and start communication.
When the communication finished,
    (4) ppp.close();
When CLOSED event comes,
    (5) ppp.removeInterface();
        and reset the modem.
When you do not use the PPP object any more,
    (6) ppp.removeEventListener();
        ppp.freePort();
        ppp.finish();
        and release the serial port.

To reuse the PPP object, you start from (2) again.

Sorry my bad English.

----------------------------------------------------------------------
KISHIMOTO Toshio
E-mail: toshio-DfIjI1/[email protected]

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.