Re: Reset modem while using pppd

2017-11-07 Thread walter harms


Am 07.11.2017 16:11, schrieb Léo Serre:
> Hello world,
> 
> I'm using pppd with a SARA-U201 3G+ modem (from u-blox).
> It works fine normally, except in that case:
> 
>  1. pppd is connected to the modem correctly
>  2. pppd is stopped using poff
>  3. The chat script is changed by the user
>  4. pppd is started using pon
> 
> That introduces an error, since the modem won't accept a new PIN code as
> it is already connected correctly.
> 
> The way to fix that is to send a SW reset AT command 'AT+CFUN=1,1'
> between steps 2 and 4.
> That's why I introduced a new disconnect chat script which consists of:
> 
> ABORT 'BUSY'
> ABORT 'NO CARRIER'
> ABORT 'VOICE'
> ABORT 'NO DIALTONE'
> ABORT 'NO DIAL TONE'
> ABORT 'NO ANSWER'
> ABORT 'DELAYED'
> TIMEOUT 180
> 'OK' 'AT+CFUN=1,1'
> 
> I have the following output:
> 
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (BUSY)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (NO CARRIER)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (VOICE)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (NO DIALTONE)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (NO DIAL TONE)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (NO ANSWER)
> Jan  1 02:24:47 domeradio local2.info chat[568]: abort on (DELAYED)
> Jan  1 02:24:47 domeradio local2.info chat[568]: timeout set to 180 seconds
> Jan  1 02:24:47 domeradio local2.info chat[568]: expect (OK)
> Jan  1 02:24:49 domeradio local2.err chat[568]: SIGTERM
  ^^

You are expecting a 'ok' from the modem that never appears -> timeout
did you try '' 'AT+CFUN=1,1' ?

> Jan  1 02:24:49 domeradio daemon.warn pppd[534]: Child process
> /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem-off.chat
> (pid 567) terminated with signal 15
> Jan  1 02:24:49 domeradio daemon.warn pppd[534]: disconnect script failed
> Jan  1 02:24:50 domeradio daemon.info pppd[534]: Exit.
> 
> It seems that the command is never sent.
> 
> My two questions are:
> 
>  1. Do you have an idea about the command that is never sent?
>  2. Is there an other way to send an AT command while pppd is running
> (or none)?
> 
> Thank you,
> 
> Léo SERRE
>   l...@lstronic.com 
>   lstronic.com 
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 04/21] ppp: exit_net cleanup checks added

2017-11-06 Thread walter harms
Hello Vasily Averin,
just a general hint:
when you send new versions of a patch please document also
what you have changed. Here an example from an other ML:

The problematic code looks like this:

res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK;
res_seq >>= TB_XDOMAIN_SN_SHIFT;

TB_XDOMAIN_SN_SHIFT is 27, and right shifting a u8 27 bits is always
going to result in zero.  The fix is to declare these variables as u32.

Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol")
Signed-off-by: Dan Carpenter 
---
v2: I accidentally sent this through the wrong list, so I'm resending to
netdev.  Also Mika asked me to split it up because the Fixes tags
are different for these patches.


please notice the V2. that tell the reader what has changes against
the V1.

re,
 wh

Am 06.11.2017 14:23, schrieb Vasily Averin:
> Be sure that lists initialized in net_init hook were return
> to initial state.
> 
> Signed-off-by: Vasily Averin 
> ---
>  drivers/net/ppp/ppp_generic.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
> index e365866..c0861d1 100644
> --- a/drivers/net/ppp/ppp_generic.c
> +++ b/drivers/net/ppp/ppp_generic.c
> @@ -960,6 +960,12 @@ static __net_exit void ppp_exit_net(struct net *net)
>   rtnl_unlock();
>  
>   idr_destroy(>units_idr);
> + WARN_ONCE(!list_empty(>all_channels),
> +   "net %x %s: all_channels list is not empty\n",
> +   net->ns.inum, __func__);
> + WARN_ONCE(!list_empty(>new_channels),
> +   "net %x %s: new_channels list is not empty\n",
> +   net->ns.inum, __func__);
>  }
>  
>  static struct pernet_operations ppp_net_ops = {
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html