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>
(cherry picked from commit 8cf25a97a1)
This commit is contained in:
Dan Williams
2025-05-08 16:07:58 -05:00
parent 9f0db52ed0
commit dc3a7f0d3b
+5 -2
View File
@@ -768,11 +768,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;