diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2020-05-26 12:16:19 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-05-21 08:24:29 -0500 |
commit | 3c158ceee9af0c3840c4b860301f41e1667610e0 (patch) | |
tree | dd6ca7b2008e7157a6d388cbde3edd5e92664b67 /plugins | |
parent | 48c5ab07afd7e0475ef50dacd56943ae3d2c57ec (diff) | |
download | ofono-3c158ceee9af0c3840c4b860301f41e1667610e0.tar.gz |
quectel: Add Quectel EC21 to known serial modems
This adds the Quectel EC21 to the known modems of the quectel driver and
therefore allows to use it with its serial interface.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/quectel.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; |