diff options
author | Nathan Williams <njw@chromium.org> | 2011-05-12 15:23:33 -0400 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-05-19 15:01:34 -0500 |
commit | 97ea7dca8a319f287ed355d43f33581f69827ccc (patch) | |
tree | 22e23d452322ff48fa621e8ce3af41066bd9b356 | |
parent | e28946841d150d3a7c58b24281bfdfe396d72fd8 (diff) |
samsung: split initialization sequence to ensure echo is off
Split the Samsung initialization sequence from "ATZ E0 V1" to "ATZ"
and "ATE0 V1" - the modem is allowed to ignore the rest of the line
after Z, so echoing was not being turned off, leading to getting
"AT+CIMI\n\n" as part of the IMSI when it is retrieved at startup.
Chromium:
Change-Id: Icfd767174e779e472f8cde419acb163128e4715d
-rwxr-xr-x | plugins/mm-modem-samsung-gsm.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/mm-modem-samsung-gsm.c b/plugins/mm-modem-samsung-gsm.c index 4902e0af..0f63e03f 100755 --- a/plugins/mm-modem-samsung-gsm.c +++ b/plugins/mm-modem-samsung-gsm.c @@ -505,6 +505,21 @@ init_done (MMAtSerialPort *port, } static void +init_reset_done (MMAtSerialPort *port, + GString *response, + GError *error, + gpointer user_data) +{ + MMCallbackInfo *info = (MMCallbackInfo *) user_data; + MMModemSamsungGsm *self = MM_MODEM_SAMSUNG_GSM (info->modem); + + if (error) + mm_generic_gsm_enable_complete (MM_GENERIC_GSM (self), error, info); + else + mm_at_serial_port_queue_command (port, "E0 V1", 3, init_done, info); +} + +static void do_enable (MMGenericGsm *modem, MMModemFn callback, gpointer user_data) { MMCallbackInfo *info; @@ -514,7 +529,7 @@ do_enable (MMGenericGsm *modem, MMModemFn callback, gpointer user_data) primary = mm_generic_gsm_get_at_port (modem, MM_PORT_TYPE_PRIMARY); g_assert (primary); - mm_at_serial_port_queue_command (primary, "Z E0 V1", 3, init_done, info); + mm_at_serial_port_queue_command (primary, "Z", 3, init_reset_done, info); } static void |