port-probe: add some QCDM/DIAG response bytes to non-AT responses

Seen on a Qualcomm-based Quectel EG915Q on the diag port:

ModemManager[34547]: <dbg> [1732077670.330527] [ttyUSB0/at] <-- ' \0\0\0\8\0\0\0\2\0\0\0\0`%\160$"\6\169\128\200\1\30\197\142\0G\184\225\128\0\1+\127\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254'

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2024-12-27 23:42:09 -06:00
parent 377a124865
commit 60de5751b4
+13
View File
@@ -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