diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-28 19:01:55 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-28 19:01:55 +0200 |
commit | 969e242d72b8dc9b6d4fd75dc8ab0dcb2e3a964d (patch) | |
tree | 872f646b5ecc4cb08876a3db8013fe8397621fa2 | |
parent | b433249763c606d75fd089d386b0082e6a7c9ee9 (diff) | |
download | ofono-969e242d72b8dc9b6d4fd75dc8ab0dcb2e3a964d.tar.bz2 |
atmodem: Enable home zone reporting for IFX modems
For the Infineon modem the AT+XHOMEZR option can be set to get informed
about home zone labels. If this information is available, it it still
not properly used, but it shows up in the traces for reference.
-rw-r--r-- | drivers/atmodem/network-registration.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index 6472a922..a7e245f1 100644 --- a/drivers/atmodem/network-registration.c +++ b/drivers/atmodem/network-registration.c @@ -631,6 +631,23 @@ static void option_osigq_notify(GAtResult *result, gpointer user_data) at_util_convert_signal_strength(strength)); } +static void ifx_xhomezr_notify(GAtResult *result, gpointer user_data) +{ + //struct ofono_netreg *netreg = user_data; + const char *label; + GAtResultIter iter; + + g_at_result_iter_init(&iter, result); + + if (!g_at_result_iter_next(&iter, "+XHOMEZR:")) + return; + + if (!g_at_result_iter_next_string(&iter, &label)) + return; + + ofono_info("Home zone: %s", label); +} + static void ifx_xciev_notify(GAtResult *result, gpointer user_data) { struct ofono_netreg *netreg = user_data; @@ -1176,15 +1193,21 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data) case OFONO_VENDOR_IFX: /* Register for specific signal strength reports */ g_at_chat_register(nd->chat, "+XCIEV:", ifx_xciev_notify, - FALSE, netreg, NULL); + FALSE, netreg, NULL); g_at_chat_send(nd->chat, "AT+XMER=1", none_prefix, NULL, NULL, NULL); + /* Register for home zone reports */ + g_at_chat_register(nd->chat, "+XHOMEZR:", ifx_xhomezr_notify, + FALSE, netreg, NULL); + g_at_chat_send(nd->chat, "AT+XHOMEZR=1", none_prefix, + NULL, NULL, NULL); + /* Register for network time update reports */ g_at_chat_register(nd->chat, "+CTZV:", ctzv_notify, - FALSE, netreg, NULL); + FALSE, netreg, NULL); g_at_chat_register(nd->chat, "+CTZDST:", ctzdst_notify, - FALSE, netreg, NULL); + FALSE, netreg, NULL); g_at_chat_send(nd->chat, "AT+CTZR=1", none_prefix, NULL, NULL, NULL); break; |