[PATCH] for ModemManager to add (partial) support for ZTE MF192

Hello All.

Not sure if this is a right place to post a patch. Actually a simple one, what drop more than add :-)


ZTE MF192 does not respond properly to the AT%IPDPACT command:

--> 'AT%IPDPCFG=1,0,1,"mts","mts"<CR>'
<-- '<CR><LF>OK<CR><LF>'
--> 'AT%IPDPACT=1,0<CR>'
<-- '<CR><LF>ERROR<CR><LF>'
Got failure code 100: Unknown error
--> 'AT%IPDPACT=1,1<CR>'
<-- '<CR><LF>ERROR<CR><LF>'
Got failure code 100: Unknown error

Thus, it can't work with icera command set. However, it partially work
with generic command set:

--> 'ATD*99***1#<CR>'
<-- '<CR><LF>CONNECT 7200000<CR><LF>'


--> 'AT+ZPAS?<CR>'
<-- '<CR><LF>ERROR<CR><LF>'

and more importantly:

--> 'AT+ZSNT=1,0,0<CR>'
<-- '<CR><LF>ERROR<CR><LF>'

Can, please, someone point me to the way to avoid this incompatibilities?

Anyway, I think it is better than nothing:

diff --git a/plugins/mm-modem-zte.c b/plugins/mm-modem-zte.c
index 88ef734..2ced846 100644
--- a/plugins/mm-modem-zte.c
+++ b/plugins/mm-modem-zte.c
@@ -432,8 +432,10 @@ icera_check_cb (MMModem *modem,
     if (!error) {
         MMModemZte *self = MM_MODEM_ZTE (user_data);
         MMModemZtePrivate *priv = MM_MODEM_ZTE_GET_PRIVATE (self);
+        MMModemBase *base = MM_MODEM_BASE (user_data);
+        const char *model = mm_modem_base_get_model (base);

-        if (result) {
+        if (result && (!model || strcasecmp(model, "MF192"))) {
             priv->is_icera = TRUE;
             g_object_set (G_OBJECT (modem),
                           MM_MODEM_IP_METHOD, MM_MODEM_IP_METHOD_STATIC,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]