Open Source Telephony
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: ofono@ofono.org
Subject: Re: Telit HE910 modem --- unable be put on line by Connman
Date: Mon, 03 Dec 2012 14:13:47 +0100	[thread overview]
Message-ID: <50BCA58B.6080102@southpole.se> (raw)
In-Reply-To: <50BC8FB6.7020309@southpole.se>

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

On 12/03/2012 12:40 PM, Jonas Bonn wrote:
> So, my thinking is that we need to do something like this:
>
> i)   At telit_enable, set CFUN=1 and wait for QSS=2 or QSS=3.
> ii)  When we get QSS=2 or QSS=3 then we can set SIM_READY state so that
> post_sim gets called... this should be called after all the IMSI
> querying, etc. (right?)
> iii) Once we're in SIM_READY state, we set CFUN=4... this is the 'end'
> of the 'telit_enable' phase
> iv)  While in CFUN=4 state, we ignore QSS: 0
> V)   This should result in the GPRS interface being exported so that
> connman can call 'online' call which will result in the switch to the
> "real" CFUN=1

I gave this a try with the HE910 from Telit and the following works (not 
in git format, this is just for reference... I will resubmit it later 
after comment).  Just note that it takes about 1 min for the SIM to 
reach "ready" state after power up.

This also doesn't account for QSS: 0 occurring during 'offline' state... 
need to check what happens there.

Comments?


diff --git a/plugins/telit.c b/plugins/telit.c
index fe2ccd6..40d72fe 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -339,7 +339,7 @@ static int telit_enable(struct ofono_modem *modem)
         g_at_chat_send(data->chat, "AT#QSS=0", none_prefix, NULL, NULL, 
NULL);

         /* Set phone functionality */
-       g_at_chat_send(data->chat, "AT+CFUN=4", none_prefix,
+       g_at_chat_send(data->chat, "AT+CFUN=1", none_prefix,
                                 cfun_enable_cb, modem, NULL);

         return -EINPROGRESS;
@@ -565,6 +565,16 @@ static void telit_post_sim(struct ofono_modem *modem)

         if (gprs && gc)
                 ofono_gprs_add_context(gprs, gc);
+
+       /*
+        * We need the modem in CFUN!=4 state in order to get to
+        * post_sim... now we can check if we really should be offline
+        * and, if so, set CFUN=4
+        */
+       if (!ofono_modem_get_online(modem)) {
+               g_at_chat_send(data->chat, "AT+CFUN=4", none_prefix,
+                               NULL, NULL, NULL);
+       }
  }

  static void set_online_cb(gboolean ok, GAtResult *result, gpointer 
user_data)

/Jonas

      reply	other threads:[~2012-12-03 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 15:40 Telit HE910 modem --- unable be put on line by Connman Ming Li Wu
2012-12-03  8:32 ` Daniel Wagner
2012-12-03 10:37   ` Ming Li Wu
2012-12-03 12:07     ` Daniel Wagner
2012-12-03  9:55 ` Christopher Vogl
2012-12-03 11:40   ` Jonas Bonn
2012-12-03 13:13     ` Jonas Bonn [this message]

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=50BCA58B.6080102@southpole.se \
    --to=jonas@southpole.se \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox