Seems a number of ublox modems (unlike specified) do not support
the AT+CGDATA command. So let's use atd99 instead which does seem to work.
---
 drivers/atmodem/gprs-context.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index 4e623a63..989a47e2 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -447,15 +447,18 @@ static int at_gprs_context_probe(struct 
ofono_gprs_context *gc,
 
        ofono_gprs_context_set_data(gc, gcd);
 
-       chat = g_at_chat_get_slave(gcd->chat);
-       if (chat == NULL)
-               return 0;
-
        switch (vendor) {
        case OFONO_VENDOR_SIMCOM_SIM900:
                gcd->use_atd99 = FALSE;
                break;
+       case OFONO_VENDOR_UBLOX:
+               DBG("Setting atd99 use for UBLOX");
+               gcd->use_atd99 = TRUE;
+               break;
        default:
+               chat = g_at_chat_get_slave(gcd->chat);
+               if (chat == NULL)
+                       return 0;
                g_at_chat_send(chat, "AT+CGDATA=?", cgdata_prefix,
                                                at_cgdata_test_cb, gc, NULL);
        }
-- 
2.20.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to