diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-08-20 17:22:28 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-08-25 22:00:56 -0500 |
commit | 2a9a6ad79b4bfe5d83e938c929c229a930c513a8 (patch) | |
tree | 7b3b82b89d6330f62b636a27ea069240cbaa46f0 /plugins/mm-plugin-nokia.c | |
parent | 7348b4c0c872a09103d32fe44cb4c2a086eaa66b (diff) |
nokia: use E1 E0 when initializing the modem
Passing E1 and E0 afterwards seems to properly disable the echo in Nokia modems
(N900 and C7 at least)
Diffstat (limited to 'plugins/mm-plugin-nokia.c')
-rw-r--r-- | plugins/mm-plugin-nokia.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/mm-plugin-nokia.c b/plugins/mm-plugin-nokia.c index f605a233..12a00d36 100644 --- a/plugins/mm-plugin-nokia.c +++ b/plugins/mm-plugin-nokia.c @@ -59,6 +59,22 @@ probe_result (MMPluginBase *base, mm_plugin_base_supports_task_complete (task, get_level_for_capabilities (capabilities)); } +static gboolean +custom_init_response_cb (MMPluginBaseSupportsTask *task, + GString *response, + GError *error, + guint32 tries, + gboolean *out_stop, + guint32 *out_level, + gpointer user_data) +{ + if (error) + return tries <= 4 ? TRUE : FALSE; + + /* No error, assume success */ + return FALSE; +} + static MMPluginSupportsResult supports_port (MMPluginBase *base, MMModem *existing, @@ -95,6 +111,12 @@ supports_port (MMPluginBase *base, return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED; } + mm_plugin_base_supports_task_add_custom_init_command (task, + "ATE1 E0", + 3, + custom_init_response_cb, + NULL); + /* Otherwise kick off a probe */ if (mm_plugin_base_probe_port (base, task, 100000, NULL)) return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS; |