aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-modem-helpers.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-05-22 19:21:02 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-05-29 14:58:25 +0200
commit024c7a1a8fd359c0c67fa87564a31f9c395e3903 (patch)
treedde20e1c2e6771b0fe5cbddfa7f62cd03d9386e7 /src/tests/test-modem-helpers.c
parente753911a4e9dad801b0cf0518b1abbe317598dee (diff)
broadband-modem: query +CMER format before enabling/disabling
Don't blindly try '+CMER=3,0,0,1' to enable and '+CMER=0' to disable Mobile Equipment Event Reporting. We now query the device for the supported formats and use that info to build commands that will work.
Diffstat (limited to 'src/tests/test-modem-helpers.c')
-rw-r--r--src/tests/test-modem-helpers.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
index d6984d2d..59284128 100644
--- a/src/tests/test-modem-helpers.c
+++ b/src/tests/test-modem-helpers.c
@@ -1930,6 +1930,16 @@ test_cmer_response_cinterion_ehs5 (void)
test_cmer_response (str, expected_modes, expected_inds);
}
+static void
+test_cmer_request_cinterion_ehs5 (void)
+{
+ gchar *str;
+
+ str = mm_3gpp_build_cmer_set_request (MM_3GPP_CMER_MODE_BUFFER_URCS_IF_LINK_RESERVED, MM_3GPP_CMER_IND_ENABLE_NOT_CAUSED_BY_CIND);
+ g_assert_cmpstr (str, ==, "+CMER=2,0,0,1");
+ g_free (str);
+}
+
/*****************************************************************************/
/* Test CIND responses */
@@ -3794,6 +3804,8 @@ int main (int argc, char **argv)
g_test_suite_add (suite, TESTCASE (test_cmer_response_sierra_em7345, NULL));
g_test_suite_add (suite, TESTCASE (test_cmer_response_cinterion_ehs5, NULL));
+ g_test_suite_add (suite, TESTCASE (test_cmer_request_cinterion_ehs5, NULL));
+
g_test_suite_add (suite, TESTCASE (test_cind_response_linktop_lw273, NULL));
g_test_suite_add (suite, TESTCASE (test_cind_response_moto_v3m, NULL));