broadband-modem: detect old Mediatek 62xx chipsets as GSM-capable

They don't necessarily reply to +WS46 but like old Motorola ESX
devices they reply to +CGMM with a known string.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/980

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-04-23 10:11:22 -05:00
parent 02898fed11
commit 8cf25a97a1
+5 -2
View File
@@ -761,11 +761,14 @@ parse_caps_cgmm (MMBaseModem *self,
if (!response)
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE;
/* This check detects some really old Motorola GPRS dongles and phones */
/* This check detects some really old Motorola and Mediatek GPRS dongles
* and phones.
*/
if (strstr (response, "GSM900") ||
strstr (response, "GSM1800") ||
strstr (response, "GSM1900") ||
strstr (response, "GSM850")) {
strstr (response, "GSM850") ||
strstr (response, "MTK2")) {
/* At least, it's a GSM modem */
*result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS);
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS;