Patirk,

Issue seems to be that ofono does not activate the context when I re-insert
the Huawei E303 3G dongle.

ofono log gives:

"/ofono-1.14/src/gprs.c:pri_activate_callback() Activating context failed
with error: Unknown error type"

If you have any suggestions then great.

Homam


On 12 March 2014 15:11, <connman-requ...@connman.net> wrote:

> Send connman mailing list submissions to
>         connman@connman.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.connman.net/mailman/listinfo/connman
> or, via email, send a message with subject or body 'help' to
>         connman-requ...@connman.net
>
> You can reach the person managing the list at
>         connman-ow...@connman.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of connman digest..."
>
>
> Today's Topics:
>
>    1. Re: Unable to reconnect to 3G network after
>       removing/reinserting a dongle (Patrik Flykt)
>    2. Re: What scenario does a application need to create two
>       sessions? (Patrik Flykt)
>    3. Re: [PATCH] doc: Missing PeersChanged description information
>       added (Patrik Flykt)
>    4. [RFC v0 2/7] session: Add set_active_session() helper
>       (Daniel Wagner)
>    5. [RFC v0 4/7] session: Add policy plugin allowed callback
>       (Daniel Wagner)
>    6. [RFC v0 3/7] session: Add policy session_changed callback
>       (Daniel Wagner)
>    7. [RFC v0 1/7] session: On session connect check service is
>       already availabe (Daniel Wagner)
>    8. [RFC v0 0/7] Poliy daemon plugin (Daniel Wagner)
>    9. [RFC v0 5/7] session: Add connect/disconnect services
>       (Daniel Wagner)
>   10. [RFC v0 6/7] service: Add autoconnect getter (Daniel Wagner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 12 Mar 2014 09:59:54 +0200
> From: Patrik Flykt <patrik.fl...@linux.intel.com>
> To: connman@connman.net
> Subject: Re: Unable to reconnect to 3G network after
>         removing/reinserting a dongle
> Message-ID: <1394611194.15951.39.camel@pflykt-mobl1>
> Content-Type: text/plain; charset="UTF-8"
>
>
>         Hi,
>
> On Mon, 2014-03-10 at 16:21 +0000, Homam Dabis wrote:
> > Hi,
> >
> > I am using connman 1.20, ofono 1.14 and linux 2.6.35.
> >
> > I have a Huawei 3G USB dongle that I use to connect to a particular APN.
> >
> > I can connect OK. However, if I remove the dongle and reinsert it, The
> > process fails at the connect to service stage. I did some debugging and
> it
> > seems that the APN is not being set properly by ofono.
> >
> > If I restart either ofonod or connmand then all is ok.
> >
> > Do I need to perform a reconfigure or something like that?
>
> All should just work, and connman should pick up the network. If you run
> connman with debugs enabled, i.e. 'connmand -d plugins/ofono.c', do you
> see any messages containing AccessPointName followed by the APN string?
> If not, it means ofono isn't sending the APN information.
>
>
> Cheers,
>
>         Patrik
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 12 Mar 2014 10:06:04 +0200
> From: Patrik Flykt <patrik.fl...@linux.intel.com>
> To: connman@connman.net
> Subject: Re: What scenario does a application need to create two
>         sessions?
> Message-ID: <1394611564.15951.42.camel@pflykt-mobl1>
> Content-Type: text/plain; charset="UTF-8"
>
> On Tue, 2014-03-11 at 09:45 +0800, Chengyi Zhao wrote:
> > Would you like to explain what scenario a application needs to create
> > two sessions, and how to create them?
>
> No idea, depends on the use case. According to the documentation in
> doc/session-api.txt one could set up another session by calling
> CreateSession with a different notifier path.
>
> HTH,
>
>         Patrik
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 12 Mar 2014 10:10:02 +0200
> From: Patrik Flykt <patrik.fl...@linux.intel.com>
> To: connman@connman.net
> Subject: Re: [PATCH] doc: Missing PeersChanged description information
>         added
> Message-ID: <1394611802.15951.43.camel@pflykt-mobl1>
> Content-Type: text/plain; charset="UTF-8"
>
> On Tue, 2014-03-11 at 10:23 +0200, Tomasz Bursztyka wrote:
> > The second array as a paremeter was missing.
>
> Applied, thanks!
>
>         Patrik
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 12 Mar 2014 16:11:55 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 2/7] session: Add set_active_session() helper
> Message-ID:
>         <1394637120-5088-3-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> With adding this helper function we are able to add a one single hook
> to the policy plugin instead of several places.
> ---
>  src/session.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/src/session.c b/src/session.c
> index 1e96cc1..59d19f8 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -416,6 +416,12 @@ static void free_session(struct connman_session
> *session)
>         g_free(session);
>  }
>
> +static void set_active_session(struct connman_session *session, bool
> enable)
> +{
> +       __connman_service_set_active_session(enable,
> +                               session->info->config.allowed_bearers);
> +}
> +
>  static void cleanup_session(gpointer user_data)
>  {
>         struct connman_session *session = user_data;
> @@ -426,8 +432,7 @@ static void cleanup_session(gpointer user_data)
>         cleanup_firewall_session(session);
>
>         if (session->active)
> -               __connman_service_set_active_session(false,
> -                               session->info->config.allowed_bearers);
> +               set_active_session(session, false);
>
>         session_deactivate(session);
>         update_session_state(session);
> @@ -897,8 +902,7 @@ int connman_session_config_update(struct
> connman_session *session)
>                 &allowed_bearers);
>
>         if (session->active)
> -               __connman_service_set_active_session(false,
> -                               session->info->config.allowed_bearers);
> +               set_active_session(session, false);
>
>         session->active = false;
>         session_deactivate(session);
> @@ -941,8 +945,7 @@ static DBusMessage *connect_session(DBusConnection
> *conn,
>
>         if (!session->active) {
>                 session->active = true;
> -               __connman_service_set_active_session(true,
> -                               session->info->config.allowed_bearers);
> +               set_active_session(session, true);
>         }
>
>         session_activate(session);
> @@ -968,8 +971,7 @@ static DBusMessage *disconnect_session(DBusConnection
> *conn,
>
>         if (session->active) {
>                 session->active = false;
> -               __connman_service_set_active_session(false,
> -                               session->info->config.allowed_bearers);
> +               set_active_session(session, false);
>         }
>
>         session_deactivate(session);
> @@ -1012,8 +1014,7 @@ static DBusMessage *change_session(DBusConnection
> *conn,
>                                 return __connman_error_failed(msg, -err);
>
>                         if (session->active)
> -                               __connman_service_set_active_session(false,
> -
> session->info->config.allowed_bearers);
> +                               set_active_session(session, false);
>
>                         session->active = false;
>                         session_deactivate(session);
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 12 Mar 2014 16:11:57 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 4/7] session: Add policy plugin allowed callback
> Message-ID:
>         <1394637120-5088-5-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> ---
>  include/session.h | 2 ++
>  src/session.c     | 3 +++
>  2 files changed, 5 insertions(+)
>
> diff --git a/include/session.h b/include/session.h
> index 224a98b..9832f25 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -81,6 +81,8 @@ struct connman_session_policy {
>         void (*destroy)(struct connman_session *session);
>         void (*session_changed)(struct connman_session *session, bool
> active,
>                                 GSList *bearers);
> +       bool (*allowed)(struct connman_session *session,
> +                       struct connman_service *service);
>  };
>
>  int connman_session_policy_register(struct connman_session_policy
> *config);
> diff --git a/src/session.c b/src/session.c
> index 651985b..9d403c7 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -1476,6 +1476,9 @@ static bool session_match_service(struct
> connman_session *session,
>         enum connman_service_type service_type;
>         GSList *list;
>
> +       if (policy && policy->allowed)
> +               return policy->allowed(session, service);
> +
>         for (list = session->info->config.allowed_bearers; list; list =
> list->next) {
>                 bearer_type = GPOINTER_TO_INT(list->data);
>                 service_type = connman_service_get_type(service);
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 12 Mar 2014 16:11:56 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 3/7] session: Add policy session_changed callback
> Message-ID:
>         <1394637120-5088-4-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> ---
>  include/session.h | 3 ++-
>  src/session.c     | 6 +++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/include/session.h b/include/session.h
> index 2001e0c..224a98b 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -79,7 +79,8 @@ struct connman_session_policy {
>                         connman_session_config_func_t cb,
>                         void *user_data);
>         void (*destroy)(struct connman_session *session);
> -
> +       void (*session_changed)(struct connman_session *session, bool
> active,
> +                               GSList *bearers);
>  };
>
>  int connman_session_policy_register(struct connman_session_policy
> *config);
> diff --git a/src/session.c b/src/session.c
> index 59d19f8..651985b 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -418,6 +418,11 @@ static void free_session(struct connman_session
> *session)
>
>  static void set_active_session(struct connman_session *session, bool
> enable)
>  {
> +
> +       if (policy && policy->session_changed)
> +               policy->session_changed(session, enable,
> +
> session->info->config.allowed_bearers);
> +
>         __connman_service_set_active_session(enable,
>                                 session->info->config.allowed_bearers);
>  }
> @@ -1511,7 +1516,6 @@ static void session_activate(struct connman_session
> *session)
>
>         if (!service_hash)
>                 return;
> -
>         g_hash_table_iter_init(&iter, service_hash);
>         while (g_hash_table_iter_next(&iter, &key, &value)) {
>                 struct connman_service_info *info = value;
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 12 Mar 2014 16:11:54 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 1/7] session: On session connect check service is
>         already availabe
> Message-ID:
>         <1394637120-5088-2-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> When the session_connect() is called, the auto connect algorithm might
> decide there is nothing to do because there is already a service
> online. In this case the session stays offline until there is a change
> via service_state_changed(). Therefore we need to go through the list
> of online services and see if there is already a online service which
> matches the current session configuration and select that one.
> ---
>  src/session.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/session.c b/src/session.c
> index a2c0da2..1e96cc1 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -945,6 +945,8 @@ static DBusMessage *connect_session(DBusConnection
> *conn,
>                                 session->info->config.allowed_bearers);
>         }
>
> +       session_activate(session);
> +
>
> __connman_service_auto_connect(CONNMAN_SERVICE_CONNECT_REASON_SESSION);
>
>         return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 12 Mar 2014 16:11:53 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 0/7] Poliy daemon plugin
> Message-ID:
>         <1394637120-5088-1-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> Hi,
>
> Currently there is one policy plugin for session.c which reads the
> configuration from the local filesystem.
>
> This series brings now a new plugin which allows to update and
> maintain the configuration/policy through an external component
> (called pold for policy daemon). The main idea is that the
> configuration can change or can be invalid at anytime. If this happens
> pold's job is to update the configuration and let ConnMan know to
> update all sessions.
>
> Obviously for this the system needs to go online without letting any
> other session user to see this happening. pold uses for this the
> Session API.
>
> Let's have a simple example where an application A wants to go online
> and has no configuration so far. The system is offline at this point.
>
> 1) App A CreateSession() -> session.c ->
>    session_policy_pold.c:policy_pold_create()
> 2) policy_pold_create() asks pold via D-Bus for a configuration
> 3) pold calls Session.Connect()
> 4) ConnMan online -> pold Session online (note App A doesn't see this)
> 5) pold does a HTTP GET to get the configuration for App A
> 6) pold sends configuration to the plugin: session_policy_pold->session.c
> ->
>    App A CreateSession() returns
>
> The configuration can change also during runtime, in this case pold
> just sends a new version of the configuration and the plugin updates
> the sessions.
>
> For getting this running you need also pold which will be available at
>
>   http://git.projects.genivi.org/pold.git
>
> hopefully in a couple of hours.
>
>   #1 session: On session connect check service is already available
>
>     This is a bug fix as described in the commit message. I think we
>     should apply this one.
>
>   Following patches just provide some hooks for the plugin to be
>   able to function.
>
>   #2 session: Add set_active_session() helper
>
>     The plugin needs to get the Session.Connect()/Disconnect(). Refactor
>     the code so that we have only one place to extend.
>
>   #3 session: Add policy session_changed callback
>
>     Whenever the user changes Session.AllowedBearers the plugin needs to
>     know it, in order to update the session (online/offline).
>
>   #4 session: Add policy plugin allowed callback
>
>     Let the plugin decide which service is attached the session.
>
>   #5 session: Add connect/disconnect services
>
>     The plugin needs a way to tell a service to go online.
>
>   #6 service: Add autoconnect getter
>
>     In case we only considering services with AutoConnect set to true
>     the plugin needs to know which service have been marked.
>
>   #7 session_policy_pold: Add session plugin for remote configuration
>
>     PoC for pold. As you can see we also have a complete own
>     connection algorithm implemneted here. It is pretty simple though
>     it gives an idea how to do this.
>
> It would be awesome if we could agree on something like patch 1 to
> 6. The plugin doesn't need necessarily to be applied to ConnMan. This
> could easily live in the pold repository.
>
> cheers,
> daniel
>
> Daniel Wagner (7):
>   session: On session connect check service is already availabe
>   session: Add set_active_session() helper
>   session: Add policy session_changed callback
>   session: Add policy plugin allowed callback
>   session: Add connect/disconnect services
>   service: Add autoconnect getter
>   session_policy_pold: Add session plugin for remote configuration
>
>  Makefile.plugins              |  13 +
>  configure.ac                  |   6 +
>  include/service.h             |   1 +
>  include/session.h             |   8 +-
>  plugins/session_policy_pold.c | 949
> ++++++++++++++++++++++++++++++++++++++++++
>  src/service.c                 |   5 +
>  src/session.c                 |  47 ++-
>  7 files changed, 1017 insertions(+), 12 deletions(-)
>  create mode 100644 plugins/session_policy_pold.c
>
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 9
> Date: Wed, 12 Mar 2014 16:11:58 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 5/7] session: Add connect/disconnect services
> Message-ID:
>         <1394637120-5088-6-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> ---
>  include/session.h |  3 +++
>  src/session.c     | 15 +++++++++++++++
>  2 files changed, 18 insertions(+)
>
> diff --git a/include/session.h b/include/session.h
> index 9832f25..3f66664 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -100,6 +100,9 @@ int connman_session_parse_bearers(const char *token,
> GSList **list);
>
>  const char *connman_session_get_owner(struct connman_session *session);
>
> +int connman_session_connect(struct connman_service *service);
> +int connman_session_disconnect(struct connman_service *service);
> +
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/src/session.c b/src/session.c
> index 9d403c7..c8df29f 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -1431,6 +1431,21 @@ int __connman_session_destroy(DBusMessage *msg)
>         return 0;
>  }
>
> +int connman_session_connect(struct connman_service *service)
> +{
> +       DBG("service %p name %s", service,
> __connman_service_get_name(service));
> +
> +       return __connman_service_connect(service,
> +                               CONNMAN_SERVICE_CONNECT_REASON_SESSION);
> +}
> +
> +int connman_session_disconnect(struct connman_service *service)
> +{
> +       DBG("service %p", service);
> +
> +       return __connman_service_disconnect(service);
> +}
> +
>  static enum connman_session_state service_to_session_state(
>                                         enum connman_service_state state)
>  {
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Message: 10
> Date: Wed, 12 Mar 2014 16:11:59 +0100
> From: Daniel Wagner <daniel.wag...@oss.bmw-carit.de>
> To: connman@connman.net
> Cc: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Subject: [RFC v0 6/7] service: Add autoconnect getter
> Message-ID:
>         <1394637120-5088-7-git-send-email-daniel.wag...@oss.bmw-carit.de>
>
> From: Daniel Wagner <daniel.wag...@bmw-carit.de>
>
> ---
>  include/service.h | 1 +
>  src/service.c     | 5 +++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/include/service.h b/include/service.h
> index cba4988..4dbfc10 100644
> --- a/include/service.h
> +++ b/include/service.h
> @@ -125,6 +125,7 @@ char **connman_service_get_proxy_excludes(struct
> connman_service *service);
>  const char *connman_service_get_proxy_url(struct connman_service
> *service);
>  const char *connman_service_get_proxy_autoconfig(struct connman_service
> *service);
>  bool connman_service_get_favorite(struct connman_service *service);
> +bool connman_service_get_autoconnect(struct connman_service *service);
>
>  struct connman_service *connman_service_lookup_from_network(struct
> connman_network *network);
>
> diff --git a/src/service.c b/src/service.c
> index 8bb3ee3..560f6fb 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -4934,6 +4934,11 @@ bool connman_service_get_favorite(struct
> connman_service *service)
>         return service->favorite;
>  }
>
> +bool connman_service_get_autoconnect(struct connman_service *service)
> +{
> +       return service->autoconnect;
> +}
> +
>  int __connman_service_set_immutable(struct connman_service *service,
>                                                 bool immutable)
>  {
> --
> 1.8.5.3
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> connman mailing list
> connman@connman.net
> https://lists.connman.net/mailman/listinfo/connman
>
> ------------------------------
>
> End of connman Digest, Vol 62, Issue 13
> ***************************************
>
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to