sierra: handle probing ERROR response better

The USB305 (Icera-based) apparently has a port that replies to everything
with ERROR, and that port is unusable.  Make sure it's ignored, otherwise
MM may claim it as the primary AT port since it technically speaks AT.
This commit is contained in:
Dan Williams
2013-04-24 14:44:57 -05:00
parent cebe828f7f
commit cabf53179e

View File

@@ -96,6 +96,13 @@ gcap_ready (MMAtSerialPort *port,
mm_port_probe_set_result_at (ctx->probe, FALSE); mm_port_probe_set_result_at (ctx->probe, FALSE);
ctx->retries = 0; ctx->retries = 0;
} }
/* Some Icera-based devices (eg, USB305) have an AT-style port that
* replies to everything with ERROR, so tag as unsupported; sometimes
* the real AT ports do this too, so let a retry tag the port as
* supported if it responds correctly later. */
else if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN)) {
mm_port_probe_set_result_at (ctx->probe, FALSE);
}
/* Just retry... */ /* Just retry... */
sierra_custom_init_step (ctx); sierra_custom_init_step (ctx);