Correct name of LTE interface - --nas-get-tx-rx-info=

Aleksander Morgado aleksander at aleksander.es
Wed Oct 7 08:01:25 UTC 2020


> Thank you for your answer.
>
> Yes, I found before that link with interface naming -  "The method requires a QmiNasRadioInterface"
> But cause, those values were in upper case, I just tested this one
>
> ~ # qmicli -d /dev/cdc-wdm0 -p --nas-get-tx-rx-info=LTE
> error: invalid radio interface value given: 'LTE'
>
> with lower case, it works fine. Thank you a lot!
>
> ~ # qmicli -d /dev/cdc-wdm0 -p --nas-get-tx-rx-info=lte
> [/dev/cdc-wdm0] Successfully got TX/RX info

This is because the string match is done against the "nickname" of the
QmiNasRadioInterface enum generated by glib-mkenums. Whenever qmicli
needs an input argument that is an enum or flags type, the nickname
generated for that enum/flags in the
"src/libqmi-glib/generated/qmi-enum-types.c" file is expected. E.g.
for QmiNasRadioInterface we have this generated during build time:

/* enumerations from "../../../src/libqmi-glib/qmi-enums-nas.h" */
static const GEnumValue qmi_nas_radio_interface_values[] = {
    { QMI_NAS_RADIO_INTERFACE_UNKNOWN,
"QMI_NAS_RADIO_INTERFACE_UNKNOWN", "unknown" },
    { QMI_NAS_RADIO_INTERFACE_NONE, "QMI_NAS_RADIO_INTERFACE_NONE", "none" },
    { QMI_NAS_RADIO_INTERFACE_CDMA_1X,
"QMI_NAS_RADIO_INTERFACE_CDMA_1X", "cdma-1x" },
    { QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO,
"QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO", "cdma-1xevdo" },
    { QMI_NAS_RADIO_INTERFACE_AMPS, "QMI_NAS_RADIO_INTERFACE_AMPS", "amps" },
    { QMI_NAS_RADIO_INTERFACE_GSM, "QMI_NAS_RADIO_INTERFACE_GSM", "gsm" },
    { QMI_NAS_RADIO_INTERFACE_UMTS, "QMI_NAS_RADIO_INTERFACE_UMTS", "umts" },
    { QMI_NAS_RADIO_INTERFACE_LTE, "QMI_NAS_RADIO_INTERFACE_LTE", "lte" },
    { QMI_NAS_RADIO_INTERFACE_TD_SCDMA,
"QMI_NAS_RADIO_INTERFACE_TD_SCDMA", "td-scdma" },
    { QMI_NAS_RADIO_INTERFACE_5GNR, "QMI_NAS_RADIO_INTERFACE_5GNR", "5gnr" },
    { 0, NULL, NULL }
};

The nickname is the last string for each of the elements; e.g.
"td-scdma" for QMI_NAS_RADIO_INTERFACE_TD_SCDMA.

This logic is a bit hidden and not documented, and that's a shame... :/

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list