There are manufacturers, like Huawei, returning profile 0 as the minimum
PDP/EPS context ID. Profile 0, however, is the default profile used to
register to the LTE network. It contains manufacturer specific settings and
should not be created by +CGDCONT.

Reference: ETSI TS 127 007: AT command set for User Equipment (UE), section
10.1.0.
---
 drivers/atmodem/gprs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c
index 58d4eed3..bcf1eaaf 100644
--- a/drivers/atmodem/gprs.c
+++ b/drivers/atmodem/gprs.c
@@ -787,6 +787,13 @@ static void at_cgdcont_test_cb(gboolean ok, GAtResult 
*result,
        if (found == FALSE)
                goto error;
 
+       /*
+        * ETSI TS 127 007: profile 0 is manufacturer specific.
+        * Start from PDP/EPS context ID 1.
+        */
+       if (min <= 0)
+               min = 1;
+
        ofono_gprs_set_cid_range(gprs, min, max);
 
        g_at_chat_send(gd->chat, "AT+CGREG=?", cgreg_prefix,
-- 
2.17.1
_______________________________________________
ofono mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to