[PATCH] port-probe: Increase AT probe command timeout to 7 seconds for altair.
Aleksander Morgado
aleksander at aleksander.es
Fri Jan 9 12:27:07 PST 2015
On Tue, Dec 9, 2014 at 6:55 PM, Roshan Pius <rpius at chromium.org> wrote:
> 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
Pushed now to git master :)
> ---
> plugins/altair/mm-plugin-altair-lte.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/plugins/altair/mm-plugin-altair-lte.c b/plugins/altair/mm-plugin-altair-lte.c
> index 1e1ecef..4201548 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));
> --
> 2.2.0.rc0.207.ga3a616c
>
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list