cli,modem: add 5GNR registration settings in modem info output

This commit is contained in:
Aleksander Morgado
2021-11-28 22:57:05 +01:00
parent dcf9bb4ee8
commit a6dd7ac60f
3 changed files with 20 additions and 0 deletions

View File

@@ -403,6 +403,8 @@ print_modem_info (void)
gchar *initial_eps_bearer_ip_family_str = NULL;
const gchar *initial_eps_bearer_user = NULL;
const gchar *initial_eps_bearer_password = NULL;
const gchar *nr5g_registration_settings_mico_mode_str = NULL;
const gchar *nr5g_registration_settings_drx_cycle_str = NULL;
if (ctx->modem_3gpp) {
imei = mm_modem_3gpp_get_imei (ctx->modem_3gpp);
@@ -426,6 +428,16 @@ print_modem_info (void)
initial_eps_bearer_password = mm_bearer_properties_get_password (initial_eps_bearer_properties);
}
}
if (mm_modem_get_current_capabilities (ctx->modem) & (MM_MODEM_CAPABILITY_5GNR)) {
MMNr5gRegistrationSettings *nr5g_registration_settings;
nr5g_registration_settings = mm_modem_3gpp_peek_nr5g_registration_settings (ctx->modem_3gpp);
if (nr5g_registration_settings) {
nr5g_registration_settings_mico_mode_str = mm_modem_3gpp_mico_mode_get_string (mm_nr5g_registration_settings_get_mico_mode (nr5g_registration_settings));
nr5g_registration_settings_drx_cycle_str = mm_modem_3gpp_drx_cycle_get_string (mm_nr5g_registration_settings_get_drx_cycle (nr5g_registration_settings));
}
}
}
mmcli_output_string (MMC_F_3GPP_IMEI, imei);
@@ -440,6 +452,8 @@ print_modem_info (void)
mmcli_output_string_take (MMC_F_3GPP_EPS_BEARER_SETTINGS_IP_TYPE, initial_eps_bearer_ip_family_str);
mmcli_output_string (MMC_F_3GPP_EPS_BEARER_SETTINGS_USER, initial_eps_bearer_user);
mmcli_output_string (MMC_F_3GPP_EPS_BEARER_SETTINGS_PASSWORD, initial_eps_bearer_password);
mmcli_output_string (MMC_F_3GPP_5GNR_REGISTRATION_MICO_MODE, nr5g_registration_settings_mico_mode_str);
mmcli_output_string (MMC_F_3GPP_5GNR_REGISTRATION_DRX_CYCLE, nr5g_registration_settings_drx_cycle_str);
mmcli_output_pco_list (pco_list);
g_free (facility_locks);

View File

@@ -43,6 +43,7 @@ static SectionInfo section_infos[] = {
[MMC_S_MODEM_IP] = { "IP" },
[MMC_S_MODEM_3GPP] = { "3GPP" },
[MMC_S_MODEM_3GPP_EPS] = { "3GPP EPS" },
[MMC_S_MODEM_3GPP_5GNR] = { "3GPP 5GNR" },
[MMC_S_MODEM_3GPP_SCAN] = { "3GPP scan" },
[MMC_S_MODEM_3GPP_USSD] = { "3GPP USSD" },
[MMC_S_MODEM_3GPP_PROFILE_MANAGER] = { "3GPP profile manager" },
@@ -139,6 +140,8 @@ static FieldInfo field_infos[] = {
[MMC_F_3GPP_EPS_BEARER_SETTINGS_IP_TYPE] = { "modem.3gpp.eps.initial-bearer.settings.ip-type", "initial bearer ip type", MMC_S_MODEM_3GPP_EPS, },
[MMC_F_3GPP_EPS_BEARER_SETTINGS_USER] = { "modem.3gpp.eps.initial-bearer.settings.user", "initial bearer user", MMC_S_MODEM_3GPP_EPS, },
[MMC_F_3GPP_EPS_BEARER_SETTINGS_PASSWORD] = { "modem.3gpp.eps.initial-bearer.settings.password", "initial bearer password", MMC_S_MODEM_3GPP_EPS, },
[MMC_F_3GPP_5GNR_REGISTRATION_MICO_MODE] = { "modem.3gpp.5gnr.registration-settings.mico-mode", "mico mode", MMC_S_MODEM_3GPP_5GNR, },
[MMC_F_3GPP_5GNR_REGISTRATION_DRX_CYCLE] = { "modem.3gpp.5gnr.registration-settings.drx-cycle", "drx cycle", MMC_S_MODEM_3GPP_5GNR, },
[MMC_F_3GPP_SCAN_NETWORKS] = { "modem.3gpp.scan-networks", "networks", MMC_S_MODEM_3GPP_SCAN, },
[MMC_F_3GPP_USSD_STATUS] = { "modem.3gpp.ussd.status", "status", MMC_S_MODEM_3GPP_USSD, },
[MMC_F_3GPP_USSD_NETWORK_REQUEST] = { "modem.3gpp.ussd.network-request", "network request", MMC_S_MODEM_3GPP_USSD, },

View File

@@ -40,6 +40,7 @@ typedef enum {
MMC_S_MODEM_IP,
MMC_S_MODEM_3GPP,
MMC_S_MODEM_3GPP_EPS,
MMC_S_MODEM_3GPP_5GNR,
MMC_S_MODEM_3GPP_SCAN,
MMC_S_MODEM_3GPP_USSD,
MMC_S_MODEM_3GPP_PROFILE_MANAGER,
@@ -141,6 +142,8 @@ typedef enum {
MMC_F_3GPP_EPS_BEARER_SETTINGS_IP_TYPE,
MMC_F_3GPP_EPS_BEARER_SETTINGS_USER,
MMC_F_3GPP_EPS_BEARER_SETTINGS_PASSWORD,
MMC_F_3GPP_5GNR_REGISTRATION_MICO_MODE,
MMC_F_3GPP_5GNR_REGISTRATION_DRX_CYCLE,
/* 3GPP scan section */
MMC_F_3GPP_SCAN_NETWORKS,
/* 3GPP profile management section */