mirror of git://git.sysmocom.de/ofono
Add support for HSO signal quality reporting
This commit is contained in:
parent
8b496ec7eb
commit
5b12b25ce6
|
@ -524,6 +524,25 @@ static void calypso_csq_notify(GAtResult *result, gpointer user_data)
|
||||||
report_signal_strength(netreg, strength);
|
report_signal_strength(netreg, strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void option_osigq_notify(GAtResult *result, gpointer user_data)
|
||||||
|
{
|
||||||
|
struct ofono_netreg *netreg = user_data;
|
||||||
|
int strength;
|
||||||
|
GAtResultIter iter;
|
||||||
|
|
||||||
|
dump_response("option_osigq_notify", TRUE, result);
|
||||||
|
|
||||||
|
g_at_result_iter_init(&iter, result);
|
||||||
|
|
||||||
|
if (!g_at_result_iter_next(&iter, "_OSIGQ:"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!g_at_result_iter_next_number(&iter, &strength))
|
||||||
|
return;
|
||||||
|
|
||||||
|
report_signal_strength(netreg, strength);
|
||||||
|
}
|
||||||
|
|
||||||
static void csq_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
static void csq_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct cb_data *cbd = user_data;
|
struct cb_data *cbd = user_data;
|
||||||
|
@ -638,6 +657,13 @@ static void at_network_registration_initialized(gboolean ok, GAtResult *result,
|
||||||
g_at_chat_register(nd->chat, "%CSQ:", calypso_csq_notify,
|
g_at_chat_register(nd->chat, "%CSQ:", calypso_csq_notify,
|
||||||
FALSE, netreg, NULL);
|
FALSE, netreg, NULL);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case OFONO_VENDOR_OPTION_HSO:
|
||||||
|
g_at_chat_send(nd->chat, "AT_OSQI=1", none_prefix,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
g_at_chat_register(nd->chat, "_OSIGQ:", option_osigq_notify,
|
||||||
|
FALSE, netreg, NULL);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue