<div dir="ltr"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I’m trying to use ModemManager 1.8.2 with a Verizon LTE Cat-M1 modem.</blockquote><div>Aleksander wrote this for my team for this very case. I've re-based it to 1.8.2 so it should go on clean.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We should work on the new API at some point...</blockquote><div>I really think the patch here is great to be honest. Again we are using it not just for Vzw but also in Asia where a few carrier's require PDP #1.</div><div><br></div><div><br></div><div><br></div><div><div>From da8bc6feb036cfdcd5db8280f00565c82685d794 Mon Sep 17 00:00:00 2001</div><div>From: Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>></div><div>Date: Fri, 12 May 2017 18:24:13 +0200</div><div>Subject: [PATCH 1/1] allow specifying the PDP CID to use</div><div><br></div><div>Some operators, most notably Verizon, require connection to be</div><div>performed through a specific PDP context. This API update allows the</div><div>user to specify the PDP cid via a new 'pdp-cid' parameter given in</div><div>either the Simple.Connect() or the Modem.CreateBearer() methods.</div><div><br></div><div>Signed-off-by: mstanger <<a href="mailto:matthew_stanger@trimble.com">matthew_stanger@trimble.com</a>></div><div>---</div><div> cli/mmcli-bearer.c                                 |  9 ++++</div><div> docs/reference/libmm-glib/libmm-glib-sections.txt  |  4 ++</div><div> .../org.freedesktop.ModemManager1.Modem.xml        |  2 +</div><div> libmm-glib/mm-bearer-properties.c                  | 59 +++++++++++++++++++++-</div><div> libmm-glib/mm-bearer-properties.h                  |  3 ++</div><div> libmm-glib/mm-simple-connect-properties.c          | 34 +++++++++++++</div><div> libmm-glib/mm-simple-connect-properties.h          |  3 ++</div><div> src/mm-broadband-bearer.c                          | 41 ++++++++++-----</div><div> src/mm-iface-modem-simple.c                        | 13 +++--</div><div> 9 files changed, 150 insertions(+), 18 deletions(-)</div><div><br></div><div>diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c</div><div>index cd9ecca..daa8614 100644</div><div>--- a/cli/mmcli-bearer.c</div><div>+++ b/cli/mmcli-bearer.c</div><div>@@ -163,11 +163,18 @@ print_bearer_info (MMBearer *bearer)</div><div> </div><div>     if (properties) {</div><div>         gchar *ip_family_str;</div><div>+        gchar *pdp_cid_str = NULL;</div><div>+        guint  pdp_cid;</div><div> </div><div>         ip_family_str = (mm_bearer_ip_family_build_string_from_mask (</div><div>                              mm_bearer_properties_get_ip_type (properties)));</div><div>+</div><div>+        if ((pdp_cid = mm_bearer_properties_get_pdp_cid (properties)) != 0)</div><div>+            pdp_cid_str = g_strdup_printf ("%u", pdp_cid);</div><div>+</div><div>         g_print ("  -------------------------\n"</div><div>                  "  Properties         |         apn: '%s'\n"</div><div>+                 "                     |     PDP CID: '%s'\n"</div><div>                  "                     |     roaming: '%s'\n"</div><div>                  "                     |     IP type: '%s'\n"</div><div>                  "                     |        user: '%s'\n"</div><div>@@ -175,6 +182,7 @@ print_bearer_info (MMBearer *bearer)</div><div>                  "                     |      number: '%s'\n"</div><div>                  "                     | Rm protocol: '%s'\n",</div><div>                  VALIDATE_NONE (mm_bearer_properties_get_apn (properties)),</div><div>+                 VALIDATE_NONE (pdp_cid_str),</div><div>                  mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden",</div><div>                  VALIDATE_UNKNOWN (ip_family_str),</div><div>                  VALIDATE_NONE (mm_bearer_properties_get_user (properties)),</div><div>@@ -183,6 +191,7 @@ print_bearer_info (MMBearer *bearer)</div><div>                  VALIDATE_UNKNOWN (mm_modem_cdma_rm_protocol_get_string (</div><div>                                        mm_bearer_properties_get_rm_protocol (properties))));</div><div>         g_free (ip_family_str);</div><div>+        g_free (pdp_cid_str);</div><div>     }</div><div> </div><div>     /* IPv4 */</div><div>diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt</div><div>index 46f2d92..077e7ee 100644</div><div>--- a/docs/reference/libmm-glib/libmm-glib-sections.txt</div><div>+++ b/docs/reference/libmm-glib/libmm-glib-sections.txt</div><div>@@ -779,6 +779,8 @@ mm_simple_connect_properties_get_operator_id</div><div> mm_simple_connect_properties_set_operator_id</div><div> mm_simple_connect_properties_get_apn</div><div> mm_simple_connect_properties_set_apn</div><div>+mm_simple_connect_properties_get_pdp_cid</div><div>+mm_simple_connect_properties_set_pdp_cid</div><div> mm_simple_connect_properties_get_allowed_auth</div><div> mm_simple_connect_properties_set_allowed_auth</div><div> mm_simple_connect_properties_get_user</div><div>@@ -1064,6 +1066,8 @@ mm_bearer_properties_new</div><div> <SUBSECTION GettersSetters></div><div> mm_bearer_properties_get_apn</div><div> mm_bearer_properties_set_apn</div><div>+mm_bearer_properties_get_pdp_cid</div><div>+mm_bearer_properties_set_pdp_cid</div><div> mm_bearer_properties_get_allowed_auth</div><div> mm_bearer_properties_set_allowed_auth</div><div> mm_bearer_properties_get_user</div><div>diff --git a/introspection/org.freedesktop.ModemManager1.Modem.xml b/introspection/org.freedesktop.ModemManager1.Modem.xml</div><div>index a5a236c..23c14ed 100644</div><div>--- a/introspection/org.freedesktop.ModemManager1.Modem.xml</div><div>+++ b/introspection/org.freedesktop.ModemManager1.Modem.xml</div><div>@@ -61,6 +61,8 @@</div><div>         <variablelist></div><div>         <varlistentry><term><literal>"apn"</literal></term></div><div>           <listitem><para>Access Point Name, given as a string value (signature <literal>"s"</literal>). Required in 3GPP.</para></listitem></varlistentry></div><div>+        <varlistentry><term><literal>"pdp-cid"</literal></term></div><div>+          <listitem><para>PDP context identifier, given as an unsigned 32-bit integer value (signature <literal>"u"</literal>). Optional in 3GPP.</para></listitem></varlistentry></div><div>         <varlistentry><term><literal>"ip-type"</literal></term></div><div>           <listitem><para>Addressing type, given as a <link linkend="MMBearerIpFamily">MMBearerIpFamily</link> value (signature <literal>"u"</literal>). Optional in 3GPP and CDMA.</para></listitem></varlistentry></div><div>         <varlistentry><term><literal>"allowed-auth"</literal></term></div><div>diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c</div><div>index c87068f..8e54f10 100644</div><div>--- a/libmm-glib/mm-bearer-properties.c</div><div>+++ b/libmm-glib/mm-bearer-properties.c</div><div>@@ -34,6 +34,7 @@</div><div> G_DEFINE_TYPE (MMBearerProperties, mm_bearer_properties, G_TYPE_OBJECT);</div><div> </div><div> #define PROPERTY_APN             "apn"</div><div>+#define PROPERTY_PDP_CID         "pdp-cid"</div><div> #define PROPERTY_ALLOWED_AUTH    "allowed-auth"</div><div> #define PROPERTY_USER            "user"</div><div> #define PROPERTY_PASSWORD        "password"</div><div>@@ -45,6 +46,8 @@ G_DEFINE_TYPE (MMBearerProperties, mm_bearer_properties, G_TYPE_OBJECT);</div><div> struct _MMBearerPropertiesPrivate {</div><div>     /* APN */</div><div>     gchar *apn;</div><div>+    /* PDP CID */</div><div>+    guint pdp_cid;</div><div>     /* IP type */</div><div>     MMBearerIpFamily ip_type;</div><div>     /* Allowed auth */</div><div>@@ -100,6 +103,40 @@ mm_bearer_properties_get_apn (MMBearerProperties *self)</div><div> /*****************************************************************************/</div><div> </div><div> /**</div><div>+ * mm_bearer_properties_set_pdp_cid:</div><div>+ * @self: a #MMBearerProperties.</div><div>+ * @pdp_cid: PDP context ID.</div><div>+ *</div><div>+ * Sets the PDP context ID to use in the connection attempt.</div><div>+ */</div><div>+void</div><div>+mm_bearer_properties_set_pdp_cid (MMBearerProperties *self,</div><div>+                                  guint               pdp_cid)</div><div>+{</div><div>+    g_return_if_fail (MM_IS_BEARER_PROPERTIES (self));</div><div>+</div><div>+    self->priv->pdp_cid = pdp_cid;</div><div>+}</div><div>+</div><div>+/**</div><div>+ * mm_bearer_properties_get_pdp_cid:</div><div>+ * @self: a #MMBearerProperties.</div><div>+ *</div><div>+ * Gets the PDP context ID to use in the connection attempt.</div><div>+ *</div><div>+ * Returns: the context number, or 0 if not set.</div><div>+ */</div><div>+guint</div><div>+mm_bearer_properties_get_pdp_cid (MMBearerProperties *self)</div><div>+{</div><div>+    g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), 0);</div><div>+</div><div>+    return self->priv->pdp_cid;</div><div>+}</div><div>+</div><div>+/*****************************************************************************/</div><div>+</div><div>+/**</div><div>  * mm_bearer_properties_set_allowed_auth:</div><div>  * @self: a #MMBearerProperties.</div><div>  * @allowed_auth: a bitmask of #MMBearerAllowedAuth values. %MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.</div><div>@@ -361,6 +398,12 @@ mm_bearer_properties_get_dictionary (MMBearerProperties *self)</div><div>                                PROPERTY_APN,</div><div>                                g_variant_new_string (self->priv->apn));</div><div> </div><div>+    if (self->priv->pdp_cid)</div><div>+        g_variant_builder_add (&builder,</div><div>+                               "{sv}",</div><div>+                               PROPERTY_PDP_CID,</div><div>+                               g_variant_new_uint32 (self->priv->pdp_cid));</div><div>+</div><div>     if (self->priv->allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN)</div><div>         g_variant_builder_add (&builder,</div><div>                                "{sv}",</div><div>@@ -428,7 +471,16 @@ mm_bearer_properties_consume_string (MMBearerProperties *self,</div><div> </div><div>     if (g_str_equal (key, PROPERTY_APN))</div><div>         mm_bearer_properties_set_apn (self, value);</div><div>-    else if (g_str_equal (key, PROPERTY_ALLOWED_AUTH)) {</div><div>+    else if (g_str_equal (key, PROPERTY_PDP_CID)) {</div><div>+        guint aux;</div><div>+</div><div>+        if (!mm_get_uint_from_str (value, &aux)) {</div><div>+            g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,</div><div>+                         "Invalid PDP CID given: %s", value);</div><div>+            return FALSE;</div><div>+        }</div><div>+        mm_bearer_properties_set_pdp_cid (self, aux);</div><div>+    }else if (g_str_equal (key, PROPERTY_ALLOWED_AUTH)) {</div><div>         GError *inner_error = NULL;</div><div>         MMBearerAllowedAuth allowed_auth;</div><div> </div><div>@@ -548,6 +600,10 @@ mm_bearer_properties_consume_variant (MMBearerProperties *properties,</div><div>         mm_bearer_properties_set_apn (</div><div>             properties,</div><div>             g_variant_get_string (value, NULL));</div><div>+    else if (g_str_equal (key, PROPERTY_PDP_CID))</div><div>+        mm_bearer_properties_set_pdp_cid (</div><div>+            properties,</div><div>+            g_variant_get_uint32 (value));</div><div>     else if (g_str_equal (key, PROPERTY_ALLOWED_AUTH))</div><div>         mm_bearer_properties_set_allowed_auth (</div><div>             properties,</div><div>@@ -664,6 +720,7 @@ mm_bearer_properties_cmp (MMBearerProperties *a,</div><div>                           MMBearerProperties *b)</div><div> {</div><div>     return ((!g_strcmp0 (a->priv->apn, b->priv->apn)) &&</div><div>+            (a->priv->pdp_cid == b->priv->pdp_cid) &&</div><div>             (a->priv->ip_type == b->priv->ip_type) &&</div><div>             (!g_strcmp0 (a->priv->number, b->priv->number)) &&</div><div>             (a->priv->allowed_auth == b->priv->allowed_auth) &&</div><div>diff --git a/libmm-glib/mm-bearer-properties.h b/libmm-glib/mm-bearer-properties.h</div><div>index 361c867..6fc1347 100644</div><div>--- a/libmm-glib/mm-bearer-properties.h</div><div>+++ b/libmm-glib/mm-bearer-properties.h</div><div>@@ -59,6 +59,8 @@ MMBearerProperties *mm_bearer_properties_new (void);</div><div> </div><div> void mm_bearer_properties_set_apn           (MMBearerProperties *self,</div><div>                                              const gchar *apn);</div><div>+void mm_bearer_properties_set_pdp_cid       (MMBearerProperties *self,</div><div>+                                             guint               pdp_cid);</div><div> void mm_bearer_properties_set_allowed_auth  (MMBearerProperties *self,</div><div>                                              MMBearerAllowedAuth allowed_auth);</div><div> void mm_bearer_properties_set_user          (MMBearerProperties *self,</div><div>@@ -75,6 +77,7 @@ void mm_bearer_properties_set_rm_protocol   (MMBearerProperties *self,</div><div>                                              MMModemCdmaRmProtocol protocol);</div><div> </div><div> const gchar           *mm_bearer_properties_get_apn           (MMBearerProperties *self);</div><div>+guint                  mm_bearer_properties_get_pdp_cid       (MMBearerProperties *self);</div><div> MMBearerAllowedAuth    mm_bearer_properties_get_allowed_auth  (MMBearerProperties *self);</div><div> const gchar           *mm_bearer_properties_get_user          (MMBearerProperties *self);</div><div> const gchar           *mm_bearer_properties_get_password      (MMBearerProperties *self);</div><div>diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c</div><div>index 200b7c3..c696f50 100644</div><div>--- a/libmm-glib/mm-simple-connect-properties.c</div><div>+++ b/libmm-glib/mm-simple-connect-properties.c</div><div>@@ -153,6 +153,40 @@ mm_simple_connect_properties_get_apn (MMSimpleConnectProperties *self)</div><div> /*****************************************************************************/</div><div> </div><div> /**</div><div>+ * mm_simple_connect_properties_set_pdp_cid:</div><div>+ * @self: a #MMSimpleConnectProperties.</div><div>+ * @pdp_cid: PDP context ID.</div><div>+ *</div><div>+ * Sets the PDP context ID to use in the connection attempt.</div><div>+ */</div><div>+void</div><div>+mm_simple_connect_properties_set_pdp_cid (MMSimpleConnectProperties *self,</div><div>+                                          guint                      pdp_cid)</div><div>+{</div><div>+    g_return_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self));</div><div>+</div><div>+    mm_bearer_properties_set_pdp_cid (self->priv->bearer_properties, pdp_cid);</div><div>+}</div><div>+</div><div>+/**</div><div>+ * mm_simple_connect_properties_get_pdp_cid:</div><div>+ * @self: a #MMSimpleConnectProperties.</div><div>+ *</div><div>+ * Gets the PDP context ID to use in the connection attempt.</div><div>+ *</div><div>+ * Returns: the context number, or 0 if not set.</div><div>+ */</div><div>+guint</div><div>+mm_simple_connect_properties_get_pdp_cid (MMSimpleConnectProperties *self)</div><div>+{</div><div>+    g_return_val_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self), 0);</div><div>+</div><div>+    return mm_bearer_properties_get_pdp_cid (self->priv->bearer_properties);</div><div>+}</div><div>+</div><div>+/*****************************************************************************/</div><div>+</div><div>+/**</div><div>  * mm_simple_connect_properties_set_allowed_auth:</div><div>  * @self: a #MMSimpleConnectProperties.</div><div>  * @allowed_auth: a bitmask of #MMBearerAllowedAuth values. %MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.</div><div>diff --git a/libmm-glib/mm-simple-connect-properties.h b/libmm-glib/mm-simple-connect-properties.h</div><div>index 3167db0..5378c5e 100644</div><div>--- a/libmm-glib/mm-simple-connect-properties.h</div><div>+++ b/libmm-glib/mm-simple-connect-properties.h</div><div>@@ -65,6 +65,8 @@ void mm_simple_connect_properties_set_operator_id   (MMSimpleConnectProperties *</div><div>                                                      const gchar *operator_id);</div><div> void mm_simple_connect_properties_set_apn           (MMSimpleConnectProperties *self,</div><div>                                                      const gchar *apn);</div><div>+void mm_simple_connect_properties_set_pdp_cid       (MMSimpleConnectProperties *self,</div><div>+                                                     guint pdp_cid);</div><div> void mm_simple_connect_properties_set_allowed_auth  (MMSimpleConnectProperties *self,</div><div>                                                      MMBearerAllowedAuth allowed_auth);</div><div> void mm_simple_connect_properties_set_user          (MMSimpleConnectProperties *self,</div><div>@@ -81,6 +83,7 @@ void mm_simple_connect_properties_set_number        (MMSimpleConnectProperties *</div><div> const gchar         *mm_simple_connect_properties_get_pin           (MMSimpleConnectProperties *self);</div><div> const gchar         *mm_simple_connect_properties_get_operator_id   (MMSimpleConnectProperties *self);</div><div> const gchar         *mm_simple_connect_properties_get_apn           (MMSimpleConnectProperties *self);</div><div>+guint                mm_simple_connect_properties_get_pdp_cid       (MMSimpleConnectProperties *self);</div><div> MMBearerAllowedAuth  mm_simple_connect_properties_get_allowed_auth  (MMSimpleConnectProperties *self);</div><div> const gchar         *mm_simple_connect_properties_get_user          (MMSimpleConnectProperties *self);</div><div> const gchar         *mm_simple_connect_properties_get_password      (MMSimpleConnectProperties *self);</div><div>diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c</div><div>index ac70173..de4fa72 100644</div><div>--- a/src/mm-broadband-bearer.c</div><div>+++ b/src/mm-broadband-bearer.c</div><div>@@ -732,25 +732,17 @@ initialize_pdp_context_ready (MMBaseModem  *modem,</div><div> }</div><div> </div><div> static void</div><div>-find_cid_ready (MMBaseModem  *modem,</div><div>-                GAsyncResult *res,</div><div>-                GTask        *task)</div><div>+initialize_pdp_context (GTask *task)</div><div> {</div><div>     gchar                   *apn;</div><div>     gchar                   *command;</div><div>-    GError                  *error = NULL;</div><div>     const gchar             *pdp_type;</div><div>     CidSelection3gppContext *ctx;</div><div> </div><div>     ctx = (CidSelection3gppContext *) g_task_get_task_data (task);</div><div> </div><div>-    mm_base_modem_at_sequence_full_finish (modem, res, NULL, &error);</div><div>-    if (error) {</div><div>-        mm_warn ("Couldn't find best CID to use: '%s'", error->message);</div><div>-        g_task_return_error (task, error);</div><div>-        g_object_unref (task);</div><div>-        return;</div><div>-    }</div><div>+    /* If no error reported, we must have a valid CID to be used */</div><div>+    g_assert (ctx->cid != 0);</div><div> </div><div>     /* Validate requested PDP type */</div><div>     pdp_type = mm_3gpp_get_pdp_type_from_ip_family (ctx->ip_family);</div><div>@@ -766,9 +758,6 @@ find_cid_ready (MMBaseModem  *modem,</div><div>         return;</div><div>     }</div><div> </div><div>-    /* If no error reported, we must have a valid CID to be used */</div><div>-    g_assert (ctx->cid != 0);</div><div>-</div><div>     /* If there's already a PDP context defined, just use it */</div><div>     if (ctx->use_existing_cid) {</div><div>         g_task_return_int (task, (gssize) ctx->cid);</div><div>@@ -792,6 +781,24 @@ find_cid_ready (MMBaseModem  *modem,</div><div>     g_free (command);</div><div> }</div><div> </div><div>+static void</div><div>+find_cid_ready (MMBaseModem  *modem,</div><div>+                GAsyncResult *res,</div><div>+                GTask        *task)</div><div>+{</div><div>+    GError *error = NULL;</div><div>+</div><div>+    mm_base_modem_at_sequence_full_finish (modem, res, NULL, &error);</div><div>+    if (error) {</div><div>+        mm_warn ("Couldn't find best CID to use: '%s'", error->message);</div><div>+        g_task_return_error (task, error);</div><div>+        g_object_unref (task);</div><div>+        return;</div><div>+    }</div><div>+</div><div>+    initialize_pdp_context (task);</div><div>+}</div><div>+</div><div> static gboolean</div><div> parse_cid_range (MMBaseModem              *modem,</div><div>                  CidSelection3gppContext  *ctx,</div><div>@@ -998,6 +1005,12 @@ cid_selection_3gpp (MMBroadbandBearer   *self,</div><div>     task = g_task_new (self, cancellable, callback, user_data);</div><div>     g_task_set_task_data (task, ctx, (GDestroyNotify) cid_selection_3gpp_context_free);</div><div> </div><div>+    if ((ctx->cid = mm_bearer_properties_get_pdp_cid (mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)))) != 0) {</div><div>+        mm_dbg ("Explicit CID requested by the user: %u", ctx->cid);</div><div>+        initialize_pdp_context (task);</div><div>+        return;</div><div>+    }</div><div>+</div><div>     mm_dbg ("Looking for best CID...");</div><div>     mm_base_modem_at_sequence_full (ctx->modem,</div><div>                                     ctx->primary,</div><div>diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c</div><div>index a16adb1..59d980e 100644</div><div>--- a/src/mm-iface-modem-simple.c</div><div>+++ b/src/mm-iface-modem-simple.c</div><div>@@ -651,9 +651,10 @@ connect_auth_ready (MMBaseModem *self,</div><div> </div><div>     /* Log about all the parameters being used for the simple connect */</div><div>     {</div><div>-        MMBearerAllowedAuth allowed_auth;</div><div>-        gchar *str;</div><div>-        MMBearerIpFamily ip_family;</div><div>+        MMBearerAllowedAuth  allowed_auth;</div><div>+        gchar               *str;</div><div>+        MMBearerIpFamily     ip_family;</div><div>+        guint                aux_uint;</div><div> </div><div> #define VALIDATE_UNSPECIFIED(str) (str ? str : "unspecified")</div><div> </div><div>@@ -665,6 +666,12 @@ connect_auth_ready (MMBaseModem *self,</div><div> </div><div>         mm_dbg ("   APN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_apn (ctx->properties)));</div><div> </div><div>+        aux_uint = mm_simple_connect_properties_get_pdp_cid (ctx->properties);</div><div>+        if (aux_uint)</div><div>+            mm_dbg ("   PDP CID: %u", aux_uint);</div><div>+        else</div><div>+            mm_dbg ("   PDP CID: unspecified");</div><div>+</div><div>         ip_family = mm_simple_connect_properties_get_ip_type (ctx->properties);</div><div>         if (ip_family != MM_BEARER_IP_FAMILY_NONE) {</div><div>             str = mm_bearer_ip_family_build_string_from_mask (ip_family);</div><div>-- </div><div>1.9.1</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 8, 2019 at 11:40 AM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I’m trying to use ModemManager 1.8.2 with a Verizon LTE Cat-M1 modem. Verizon requires using PDP context #3 for the internet connection. I read the thread from 2017 (<a href="https://lists.freedesktop.org/archives/modemmanager-devel/2017-May/004663.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/modemmanager-devel/2017-May/004663.html</a>) in which a patch was proposed to handle this case in ModemManager, but saw that the thread ended with a plan to develop a new API for managing profiles instead of that patch.<br>
><br>
><br>
><br>
> But I haven’t been able to find this new API, and it doesn’t look like the original patch was applied either. Is this profile management API available in 1.8.2, or in a newer version? How do I force ModemManager to use PDP context #3 for the internet connection?<br>
><br>
<br>
Right now, you could manually create the PDP context with the settings<br>
you want, and MM should re-use the already created context if the<br>
settings requested match the existing ones.<br>
<br>
We should work on the new API at some point...<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
_______________________________________________<br>
ModemManager-devel mailing list<br>
<a href="mailto:ModemManager-devel@lists.freedesktop.org" target="_blank">ModemManager-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel</a></blockquote></div>