diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-port-probe.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index 91f101e2..27f4b6e4 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -895,6 +895,13 @@ static const guint8 zerobuf[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +static const guint8 quectel_qcdm[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, +}; + static gboolean is_non_at_response (const guint8 *data, gsize len) { @@ -910,6 +917,12 @@ is_non_at_response (const guint8 *data, gsize len) return TRUE; } + /* Observed on a Quectel EG915Q Qualcomm-based device's DIAG port */ + for (i = 0; (len >= sizeof (quectel_qcdm)) && (i < len - sizeof (quectel_qcdm)); i++) { + if (!memcmp (&data[i], quectel_qcdm, sizeof (quectel_qcdm))) + return TRUE; + } + /* Check for a well-known non-AT response. There are some ports (eg many * Icera-based chipsets, Qualcomm Gobi devices before their firmware is * loaded, Sierra CnS ports) that just shouldn't be probed for AT capability |