aboutsummaryrefslogtreecommitdiff
path: root/libqcdm/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libqcdm/tests')
-rw-r--r--libqcdm/tests/test-qcdm-com.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libqcdm/tests/test-qcdm-com.c b/libqcdm/tests/test-qcdm-com.c
index d8380fd7..676aea85 100644
--- a/libqcdm/tests/test-qcdm-com.c
+++ b/libqcdm/tests/test-qcdm-com.c
@@ -252,5 +252,29 @@ test_com (void *f, void *data)
str = NULL;
qcdm_result_get_string (result, QCDM_CMD_VERSION_INFO_ITEM_MODEL, &str);
g_message ("%s: Model: %s", __func__, str);
+
+ qcdm_result_unref (result);
+
+ /* Get the device's ESN */
+
+ len = qcdm_cmd_esn_new (buf, sizeof (buf), NULL);
+ g_assert (len == 4);
+
+ /* Send the command */
+ success = send_command (d, buf, len);
+ g_assert (success);
+
+ /* Get a response */
+ reply_len = wait_reply (d, buf, sizeof (buf));
+
+ /* Parse the response into a result structure */
+ result = qcdm_cmd_esn_result (buf, reply_len, &error);
+ g_assert (result);
+
+ str = NULL;
+ qcdm_result_get_string (result, QCDM_CMD_ESN_ITEM_ESN, &str);
+ g_message ("%s: ESN: %s", __func__, str);
+
+ qcdm_result_unref (result);
}