This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PPP disconnect script


Hi Felix & Nick,

It looks like ISP (heh, you can't make ISP out of telecom ;) is _not_
failing... Typical GPRS connection has yet another status "idle", but
common PPP driver (BSD one) doesn't have such thing if  I don't miss
anything. Any GPRS-capable terminal MUST be able to go in idle after
either timeout on inactivity or on message from SGSN (I could be wrong
- last time I touched GPRS network side code more than 2 years ago) -
this is done to save bandwidth, terminal's battery, etc.  To make long
things short - common BSD PPP driver should be modified in order to
handle things properly with GPRS.

More details you can find at 3gpp.org .

BR, Andrej

On Mon, 05 Jul 2004 15:42:46 +0200, Felix Nielsen <felix@dezign.dk> wrote:
> Hi Nick,
> 
> Thanks I will try that :)
> 
> The "persist" seems to work just fine, the stack is trying to
> re-connect, when the ISP fails or no activity. But the connect fails if
> the modem is not ready to receive the initializing commands.
> 
> I thought that maybe it was possible to specify a chat disconnect script.
> 
> But I will debug some more :)
> 
> Felix
> 
> 
> 
> Nick Garnett wrote:
> 
> >Felix Nielsen <felix@dezign.dk> writes:
> >
> >
> >
> >>Hi
> >>
> >>I am trying to get a persistent connection up and running using a GRPS
> >>modem. After successful connection, at some point the connection is
> >>dropped from the ISP provider, and I need to re-connect automatically.
> >>
> >>Have enabled (=1) :
> >>
> >>"extern int    persist;    /* Reopen link after it goes down */"
> >>
> >>But before I can launch the connection again, I need to fire "+++" to
> >>the modem, so the modem is ready again. I have been looking in the
> >>source, and found :
> >>
> >>"extern char    *disconnector;    /* Script to disestablish physical
> >>link */"
> >>
> >>But how do I initialize that script?
> >>
> >>Any hints or examples would be appreciated.
> >>
> >>
> >
> >
> >I don't believe persistence has been extensively tested. Looking at
> >the code it should work, however I cannot guarantee that some part of
> >it was stripped out when porting to eCos.
> >
> >All scripting support was also removed. eCos has no scripting
> >language. If all you want to do is send the modem some simple
> >commands, then use a chat script.
> >
> >Alternatively, both of these things can be handled outside the current
> >stack. Just set up a thread to monitor the PPP connection and have it
> >run something like this:
> >
> >void ppp_monitor( CYG_ADDRWORD arg )
> >{
> >        cyg_ppp_options_t options;
> >        cyg_ppp_handle_t ppp_handle;
> >
> >        cyg_ppp_options_init( &options );
> >
> >        /* Adjust the options here */
> >
> >        while( ppp_persist )
> >        {
> >            /* Do any connection establishment processing here */
> >
> >            ppp_handle = cyg_ppp_up( ppp_device, &options );
> >
> >            cyg_ppp_wait_up( ppp_handle );
> >
> >            cyg_ppp_wait_down( ppp_handle );
> >
> >            /* Do any connection dis-establishment processing here */
> >
> >        }
> >}
> >
> >
> >
> 
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]