port-probe: Increase AT probe command timeout to 7 seconds for altair.

This patch increases the response timeout for the probe AT commands for
altair modems.

We've been noticing some altair modems taking upto 6 seconds to respond to the
initial probe command after a reset which results in modem-manager
timing out and sending a second probe command. The modem sends a response
after about 6 seconds for the initial probe command which modem-manager
treats as response to second probe command and this results in the
modem-manager and modem going out of sync because the modem's second
probe response is treated as response to the next initialization AT command
sent by modem-manager and so on.

Change-Id: Iad8b0786327b153fd95c8ee4516f352325a42cf7
This commit is contained in:
Roshan Pius
2014-12-09 09:55:56 -08:00
committed by Aleksander Morgado
parent 2edb00cbcb
commit 470b02e8c8

View File

@@ -34,6 +34,21 @@ G_DEFINE_TYPE (MMPluginAltairLte, mm_plugin_altair_lte, MM_TYPE_PLUGIN)
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
/*****************************************************************************/
/* Custom commands for AT probing */
/* Increase the response timeout for probe commands since some altair modems
take longer to respond after a reset.
*/
static const MMPortProbeAtCommand custom_at_probe[] = {
{ "AT", 7, mm_port_probe_response_processor_is_at },
{ "AT", 7, mm_port_probe_response_processor_is_at },
{ "AT", 7, mm_port_probe_response_processor_is_at },
{ NULL }
};
/*****************************************************************************/
static MMBaseModem *
create_modem (MMPlugin *self,
const gchar *sysfs_path,
@@ -65,6 +80,7 @@ mm_plugin_create (void)
MM_PLUGIN_NAME, "Altair LTE",
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
MM_PLUGIN_ALLOWED_PRODUCT_IDS, products,
MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe,
MM_PLUGIN_ALLOWED_SINGLE_AT, TRUE,
MM_PLUGIN_SEND_LF, TRUE,
NULL));