mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
b433249763
commit
969e242d72
|
@ -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;
|
||||
|
@ -1180,6 +1197,12 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue