broadband-modem: only used CIND? for signal quality if actually reported

The Huawei MU736 supports CIND? but not for signal quality reporting:

AT+CIND=?
   +CIND : ("call",(0,1)), ("message",(0,1)), ("roam",(0,1))
   OK

AT+CIND?
   +CIND:0,0,0
   OK

Which ended up with the following during execution:

ModemManager[3044]: (ttyUSB1) Could not parse CIND signal quality results;
                              signal index (255) outside received range (0-3)

Just avoid this, and make CIND? be used for signal quality retrieval only if
(1) CIND? is actually supported and (2) CIND? reports signal quality
information.
This commit is contained in:
Aleksander Morgado
2013-09-11 17:08:27 +02:00
parent 0ff4da71e3
commit e755181fd5
+2 -1
View File
@@ -1987,7 +1987,8 @@ modem_load_signal_quality (MMIfaceModem *self,
/* Check whether we can get a non-connected AT port */
ctx->port = (MMSerialPort *)mm_base_modem_get_best_at_port (MM_BASE_MODEM (self), &error);
if (ctx->port) {
if (MM_BROADBAND_MODEM (self)->priv->modem_cind_supported)
if (MM_BROADBAND_MODEM (self)->priv->modem_cind_supported &&
CIND_INDICATOR_IS_VALID (MM_BROADBAND_MODEM (self)->priv->modem_cind_indicator_signal_quality))
signal_quality_cind (ctx);
else
signal_quality_csq (ctx);