All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mylene JOSSERAND <mylene.josserand@openwide.fr>
To: ofono@ofono.org
Subject: Re: [info] modem data disconnection
Date: Wed, 22 Jul 2015 08:19:53 +0200	[thread overview]
Message-ID: <55AF3609.9070702@openwide.fr> (raw)
In-Reply-To: <55AE5F55.9080001@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

Hi Denis,

>>
>> I have some questions about ofono and the data disconnection.
>>
>> With debug information, after that my modem is online (connected to network via ppp0 interface), when I go back to offline (by setting online property to false), I can see that the modem network connection is down with :
>> ofonod[1039]: Modem: < ~\377}#\300!}%}#} }$\205r~
>>
>> and PPP interface is removed :
>> ofonod[1039]: udevng.c:remove_device() /sys/devices/virtual/net/ppp0
>>
>> I searched how ofono stops the modem connection, with escape sequence for example, but ofono does not seem to use it during offline sequence.
>>
>
> In this case the ofono_gprs_context atom is being created in post_online state.  Since you go offline, the modem goes back to post_sim state and any atoms created in post_online() are destroyed.  E.g. the atom's remove() method is called.  This removes all PPP processing from the chat and forces it back into AT command mode.

ok thank you for the explanation.
How atoms force to go back into AT commands mode ? Where is it done in the code ?

>
> There was a similar thread recently about SIM Removal on HE910 exhibiting similar behavior.  In that case the modem went back to pre_sim state, so all post_sim and post_online atoms were destroyed.

I will look to it.

>
>> How does ofono handles it ?
>
> Solution is to put gprs_context creation into pre_sim on modems that reply to CFUN=4 or equivalent before sending the final PPP frame.
>
>> How ofono (or gatppp, maybe ?) puts the modem network connection down (if it does) ?
>>
>
> oFono detects PPP end-of-session frames as well as the NO CARRIER result code.  See gatchat/gathdlc.c new_bytes() and g_at_hdlc_set_no_carrier_detect()

I noticed the gathdlc::new_bytes method when I was looking into the code but I did not understand what this file is it for. Thanks for the hints.

Best regards,

Mylene

  reply	other threads:[~2015-07-22  6:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 11:31 [info] modem data disconnection Mylene JOSSERAND
2015-07-21 15:03 ` Denis Kenzior
2015-07-22  6:19   ` Mylene JOSSERAND [this message]
2015-07-22 16:23     ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AF3609.9070702@openwide.fr \
    --to=mylene.josserand@openwide.fr \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.