Clean-up thread in case of GPRS connection lost

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Clean-up thread in case of GPRS connection lost

boisbu
Hi Lwip Users,

I am using LWIP with a GPRS module (through PPP connection). I am wondering how to cleanly terminate a task in case of lost of GPRS signal.

Indeed with the modem I'm using, I can catch GPRS connection lost event and in that case I'm calling ppp_sigup() API from LWIP. But in that case it seems the ppp thread is not terminated in a clean way (the task is not deleted).

Could you please help me to correctly catch this event?

Thanks in advance,

Best regards,
Pierre-Yves.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Clean-up thread in case of GPRS connection lost

Sylvain Rochet
Hi Pierre-Yves,

On Mon, Jul 22, 2013 at 09:38:42AM +0200, pierre-yves.boisbunon wrote:

> Hi Lwip Users,
>
> I am using LWIP with a GPRS module (through PPP connection). I am wondering
> how to cleanly terminate a task in case of lost of GPRS signal.
>
> Indeed with the modem I'm using, I can catch GPRS connection lost event and
> in that case I'm calling ppp_sigup() API from LWIP. But in that case it
> seems the ppp thread is not terminated in a clean way (the task is not
> deleted).
>
> Could you please help me to correctly catch this event?
Yes, this is one of the known drawback of the PPP_INPROC_OWNTHREAD
feature, please use only PPP_INPROC_MULTITHREADED instead with your own
receive loop.

For information, I have removed the lwIP owned receive thread from my
ppp-new branch because it draws much more inconvenients for (almost) no
advantages.

Sylvain

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Clean-up thread in case of GPRS connection lost

Chauveau Wilfried
In reply to this post by boisbu
Hello,

In the same kind of issue, is there a way to stop the the tcpip_thread
cleanly ?

Regards,
Wilfried

>  From: *Sylvain Rochet* <[hidden email]
>  <mailto:[hidden email]>> Date: 2013/7/22 Subject: Re:
>  [lwip-users] Clean-up thread in case of GPRS connection lost To:
>  Mailing list for lwIP users <[hidden email]
>  <mailto:[hidden email]>>
>
>
>  Hi Pierre-Yves,
>
>  On Mon, Jul 22, 2013 at 09:38:42AM +0200, pierre-yves.boisbunon
>  wrote:
> > Hi Lwip Users,
> >
> > I am using LWIP with a GPRS module (through PPP connection). I am
> > wondering how to cleanly terminate a task in case of lost of GPRS
> > signal.
> >
> > Indeed with the modem I'm using, I can catch GPRS connection lost
> > event and in that case I'm calling ppp_sigup() API from LWIP. But
> > in that case it seems the ppp thread is not terminated in a clean
> > way (the task is not deleted).
> >
> > Could you please help me to correctly catch this event?
>
>  Yes, this is one of the known drawback of the PPP_INPROC_OWNTHREAD
>  feature, please use only PPP_INPROC_MULTITHREADED instead with your
>  own receive loop.
>
>  For information, I have removed the lwIP owned receive thread from
>  my ppp-new branch because it draws much more inconvenients for
>  (almost) no advantages.
>
>  Sylvain
>
>  _______________________________________________ lwip-users mailing
>  list [hidden email] <mailto:[hidden email]>
>  https://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Clean-up thread in case of GPRS connection lost

OK2NMZ
Hello,
 I am trying to do something simillar,
The description of what I do is in a thread I created on this forum called "Deinitializing the LwIP stack".

I am describing in detail the problem there.

Maybe we can share some experiences?

Thank you,
Marek