diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-12-26 19:25:56 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:37 +0100 |
commit | 9868d757c75f8d06ca435ae99bc8caa8f36a00ac (patch) | |
tree | 0e407de500d2b8925b0ecc703d2cc4205b46511d /cli/mmcli-modem.c | |
parent | 5e0df902721c251d6876e5ff3e509284a92676e6 (diff) |
cli: print supported/allowed bands in modem info
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r-- | cli/mmcli-modem.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index a4637317..ce1b8191 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -228,6 +228,10 @@ print_modem_info (void) gchar *unlock; gchar *capabilities_string; gchar *access_technologies_string; + gchar *supported_bands_string; + gchar *allowed_bands_string; + MMModemBand *bands = NULL; + guint n_bands = 0; /* Not the best thing to do, as we may be doing _get() calls twice, but * easiest to maintain */ @@ -257,6 +261,16 @@ print_modem_info (void) mm_modem_get_modem_capabilities (ctx->modem)); access_technologies_string = mm_modem_get_access_technologies_string ( mm_modem_get_access_technologies (ctx->modem)); + mm_modem_get_allowed_bands (ctx->modem, + &bands, + &n_bands); + allowed_bands_string = mm_modem_get_bands_string (bands, n_bands); + g_free (bands); + mm_modem_get_supported_bands (ctx->modem, + &bands, + &n_bands); + supported_bands_string = mm_modem_get_bands_string (bands, n_bands); + g_free (bands); /* Rework possible multiline strings */ prefixed_revision = prefix_newlines (" | ", @@ -299,6 +313,13 @@ print_modem_info (void) VALIDATE_UNKNOWN (mmcli_get_state_string (mm_modem_get_state (ctx->modem))), VALIDATE_UNKNOWN (access_technologies_string)); + /* Band related stuff */ + g_print (" -------------------------\n" + " Bands | supported: '%s'\n" + " | allowed: '%s'\n", + VALIDATE_UNKNOWN (supported_bands_string), + VALIDATE_UNKNOWN (allowed_bands_string)); + /* If available, 3GPP related stuff */ if (ctx->modem_3gpp) { g_print (" -------------------------\n" @@ -319,6 +340,8 @@ print_modem_info (void) VALIDATE_NONE (mm_modem_get_sim_path (ctx->modem))); g_print ("\n"); + g_free (allowed_bands_string); + g_free (supported_bands_string); g_free (access_technologies_string); g_free (capabilities_string); g_free (prefixed_revision); |