aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRoshan Pius <rpius@chromium.org>2014-12-09 09:55:56 -0800
committerAleksander Morgado <aleksander@aleksander.es>2015-01-09 21:26:01 +0100
commit470b02e8c8ee97277a2cfbb7e79853c03340b09b (patch)
treed95285813ec7d78c1eed0ec1713a60551268e378 /plugins
parent2edb00cbcb0ab7ad0bef82f4d7f4111f2edb75a6 (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/altair/mm-plugin-altair-lte.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/altair/mm-plugin-altair-lte.c b/plugins/altair/mm-plugin-altair-lte.c
index 1e1ecef0..42015483 100644
--- a/plugins/altair/mm-plugin-altair-lte.c
+++ b/plugins/altair/mm-plugin-altair-lte.c
@@ -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));