From 53b033c727a5fb69155e445d11aec30d87d4c3d9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 2 Apr 2013 12:17:40 -0500 Subject: broadband-modem: turn off CNMI reporting if modem doesn't support it MM doesn't yet parse the +CNMI=? response and dynamically figure out what indication settings are supported, so add another last-resort CNMI setting for the UMW190 which doesn't support any at all. And the commands shouldn't be cached, so fix that too. --- src/mm-broadband-modem.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index de09d1cb..1a36856e 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -5530,17 +5530,17 @@ cnmi_response_processor (MMBaseModem *self, return TRUE; } -/* - * Many devices based on Qualcomm chipsets don't support a value - * of '1', despite saying they do in the AT+CNMI=? response. But they - * do accept '2'. Since we're not doing much with delivery status - * reports yet, if we get a CME 303 (not supported) error when setting - * the message indication parameters via CNMI, fall back to the - * Qualcomm-compatible CNMI parameters. - */ static const MMBaseModemAtCommand cnmi_sequence[] = { - { "+CNMI=2,1,2,1,0", 3, TRUE, cnmi_response_processor }, - { "+CNMI=2,1,2,2,0", 3, TRUE, cnmi_response_processor }, + { "+CNMI=2,1,2,1,0", 3, FALSE, cnmi_response_processor }, + + /* Many Qualcomm-based devices don't support of '1', despite + * reporting they support it in the +CNMI=? response. But they do + * accept '2'. + */ + { "+CNMI=2,1,2,2,0", 3, FALSE, cnmi_response_processor }, + + /* Last resort: turn off delivery status reports altogether */ + { "+CNMI=2,1,2,0,0", 3, FALSE, cnmi_response_processor }, { NULL } }; -- cgit v1.2.3-70-g09d2