From: Lars Poeschel <poesc...@lemonage.de>

This adds the Quectel EC21 to the known modems of the quectel driver and
therefore allows to use it with its serial interface.
---
 plugins/quectel.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/plugins/quectel.c b/plugins/quectel.c
index 5d3ad470..1a49a5b3 100644
--- a/plugins/quectel.c
+++ b/plugins/quectel.c
@@ -64,7 +64,7 @@ static const char *cpin_prefix[] = { "+CPIN:", NULL };
 static const char *cbc_prefix[] = { "+CBC:", NULL };
 static const char *qinistat_prefix[] = { "+QINISTAT:", NULL };
 static const char *cgmm_prefix[] = { "UC15", "Quectel_M95", "Quectel_MC60",
-                                       NULL };
+                                       "EC21", NULL };
 static const char *none_prefix[] = { NULL };
 
 static const uint8_t gsm0710_terminate[] = {
@@ -83,6 +83,7 @@ enum quectel_model {
        QUECTEL_UC15,
        QUECTEL_M95,
        QUECTEL_MC60,
+       QUECTEL_EC21,
 };
 
 struct quectel_data {
@@ -512,6 +513,7 @@ static void dbus_hw_enable(struct ofono_modem *modem)
 
        switch (data->model) {
        case QUECTEL_UC15:
+       case QUECTEL_EC21:
                g_at_chat_register(data->aux, "+QIND",  qind_notify, FALSE, hw,
                                        NULL);
                break;
@@ -556,6 +558,7 @@ static void qinistat_cb(gboolean ok, GAtResult *result, 
gpointer user_data)
 
        switch (data->model) {
        case QUECTEL_UC15:
+       case QUECTEL_EC21:
                /* UC15 uses a bitmap of 1 + 2 + 4 = 7 */
                ready = 7;
                break;
@@ -788,6 +791,10 @@ static void cgmm_cb(int ok, GAtResult *result, void 
*user_data)
                DBG("%p model MC60", modem);
                data->vendor = OFONO_VENDOR_QUECTEL_SERIAL;
                data->model = QUECTEL_MC60;
+       } else if (strcmp(model, "EC21") == 0) {
+               DBG("%p model EC21", modem);
+               data->vendor = OFONO_VENDOR_QUECTEL;
+               data->model = QUECTEL_EC21;
        } else {
                ofono_warn("%p unknown model: '%s'", modem, model);
                data->vendor = OFONO_VENDOR_QUECTEL;
-- 
2.26.2
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org

Reply via email to