diff options
author | Denis Kenzior <denkenz@gmail.com> | 2013-01-21 10:23:34 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-01-21 10:23:34 -0600 |
commit | 2fa7a4a66e93d85184529c4dd4bc44753a43fdfd (patch) | |
tree | 91ced6b14b8b720e72cc3c39ac6f788f664233e5 /drivers/atmodem | |
parent | 1103f8ae083272522a928f447df00b7f3e24a8db (diff) | |
download | ofono-2fa7a4a66e93d85184529c4dd4bc44753a43fdfd.tar.bz2 |
netreg: Fix broken CMER behavior on MBM
Diffstat (limited to 'drivers/atmodem')
-rw-r--r-- | drivers/atmodem/network-registration.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index 19b19b2a..24b71a3b 100644 --- a/drivers/atmodem/network-registration.c +++ b/drivers/atmodem/network-registration.c @@ -1715,8 +1715,21 @@ static void cind_support_cb(gboolean ok, GAtResult *result, gpointer user_data) if (nd->signal_index == 0) goto error; - g_at_chat_send(nd->chat, "AT+CMER=?", cmer_prefix, + switch (nd->vendor) { + case OFONO_VENDOR_MBM: + /* + * MBM devices report 'CMER: (0,3),(0,2),0,(0-1),0' when + * +CMER=? is executed, which cannot be parsed. Simply + * send the desired settings in this case. + */ + g_at_chat_send(nd->chat, "AT+CMER=3,0,0,1", none_prefix, + at_cmer_set_cb, netreg, NULL); + break; + default: + g_at_chat_send(nd->chat, "AT+CMER=?", cmer_prefix, at_cmer_query_cb, netreg, NULL); + break; + } return; |