From 024c7a1a8fd359c0c67fa87564a31f9c395e3903 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 22 May 2017 19:21:02 +0200 Subject: 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. --- src/tests/test-modem-helpers.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/tests/test-modem-helpers.c') 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)); -- cgit v1.2.3-70-g09d2