summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-24 11:56:09 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-24 13:56:17 +0200
commit3937b2da9a5e9b3a80f1dcd7635bda351a3e759f (patch)
treecdfeeb1b68f2d8f379ca5a1f9c9989e9dd003a2b
parent1afd81e48cd48e453ef07602a2d393fb4760215c (diff)
nas: implement "Event Report" indication
-rw-r--r--TODO3
-rw-r--r--data/qmi-service-nas.json107
-rw-r--r--libqmi-glib/qmi-enums-nas.h231
3 files changed, 340 insertions, 1 deletions
diff --git a/TODO b/TODO
index e410378..eff3674 100644
--- a/TODO
+++ b/TODO
@@ -26,3 +26,6 @@ List of things left for later:
* qmicli: Implement `--dms-set-alt-net-config'.
* qmicli: Implement `--dms-get-software-version'.
* qmicli: Implement `--dms-set-service-programming-code'.
+
+ * nas: Define the 'QmiNasRegistrationRejectCause' enum for TLV 0x12 in the
+ "Event Report" indication.
diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json
index 80e57f5..42402a4 100644
--- a/data/qmi-service-nas.json
+++ b/data/qmi-service-nas.json
@@ -13,6 +13,10 @@
"type" : "Message-ID-Enum" },
// *********************************************************************************
+ { "name" : "QMI Indication NAS",
+ "type" : "Indication-ID-Enum" },
+
+ // *********************************************************************************
{ "name" : "Reset",
"type" : "Message",
"service" : "NAS",
@@ -137,6 +141,107 @@
"public-format" : "gboolean" },
{ "name" : "RSRP Delta",
"format" : "guint8" } ] } ],
- "output" : [ { "common-ref" : "Operation Result" } ] }
+ "output" : [ { "common-ref" : "Operation Result" } ] },
+ { "name" : "Event Report",
+ "type" : "Indication",
+ "service" : "NAS",
+ "id" : "0x0002",
+ "output" : [ { "name" : "Signal Strength",
+ "id" : "0x10",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "Strength",
+ "format" : "guint8" },
+ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" } ] },
+ { "name" : "RF Band Information",
+ "id" : "0x11",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "array",
+ "array-size" : { "format" : "guint16" },
+ "array-element" : { "name" : "Element",
+ "format" : "struct",
+ "contents" : [ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" },
+ { "name" : "Active Band Class",
+ "format" : "guint16",
+ "public-format" : "QmiNasActiveBand" },
+ { "name" : "Active Channel",
+ "format" : "guint16" } ] } },
+ { "name" : "Registration Reject Reason",
+ "id" : "0x12",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "Service Domain",
+ "format" : "guint8",
+ "public-format" : "QmiNasNetworkServiceDomain" },
+ { "name" : "Reject Cause",
+ "format" : "guint16" } ] },
+ { "name" : "RSSI",
+ "id" : "0x13",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "RSSI",
+ "format" : "guint8" },
+ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" } ] },
+ { "name" : "ECIO",
+ "id" : "0x14",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "ECIO",
+ "format" : "guint8" },
+ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" } ] },
+ { "name" : "IO",
+ "id" : "0x15",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint32" },
+ { "name" : "SINR",
+ "id" : "0x16",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint8",
+ "public-format" : "QmiNasEvdoSinrLevel" },
+ { "name" : "Error Rate",
+ "id" : "0x17",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "Rate",
+ "format" : "guint16" },
+ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" } ] },
+ { "name" : "RSRQ",
+ "id" : "0x18",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "RSRQ",
+ "format" : "gint8" },
+ { "name" : "Radio Interface",
+ "format" : "guint8",
+ "public-format" : "QmiNasRadioInterface" } ] },
+ { "name" : "LTE SNR",
+ "id" : "0x19",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "gint16" },
+ { "name" : "LTE RSRP",
+ "id" : "0x1A",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "gint16" } ] }
]
diff --git a/libqmi-glib/qmi-enums-nas.h b/libqmi-glib/qmi-enums-nas.h
index 41f3f97..8e5577d 100644
--- a/libqmi-glib/qmi-enums-nas.h
+++ b/libqmi-glib/qmi-enums-nas.h
@@ -23,4 +23,235 @@
#ifndef _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
#define _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Event Report' indication */
+
+/**
+ * QmiNasRadioInterface:
+ * @QMI_NAS_RADIO_INTERFACE_NONE: None, no service.
+ * @QMI_NAS_RADIO_INTERFACE_CDMA_1X: CDMA2000 1X.
+ * @QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO).
+ * @QMI_NAS_RADIO_INTERFACE_AMPS: AMPS.
+ * @QMI_NAS_RADIO_INTERFACE_GSM: GSM.
+ * @QMI_NAS_RADIO_INTERFACE_UMTS: UMTS.
+ * @QMI_NAS_RADIO_INTERFACE_LTE: LTE.
+ * @QMI_NAS_RADIO_INTERFACE_TD_SCDMA: TD-SCDMA.
+ *
+ * Radio interface technology.
+ */
+typedef enum {
+ QMI_NAS_RADIO_INTERFACE_NONE = 0x00,
+ QMI_NAS_RADIO_INTERFACE_CDMA_1X = 0x01,
+ QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO = 0x02,
+ QMI_NAS_RADIO_INTERFACE_AMPS = 0x03,
+ QMI_NAS_RADIO_INTERFACE_GSM = 0x04,
+ QMI_NAS_RADIO_INTERFACE_UMTS = 0x05,
+ QMI_NAS_RADIO_INTERFACE_LTE = 0x08,
+ QMI_NAS_RADIO_INTERFACE_TD_SCDMA = 0x09
+} QmiNasRadioInterface;
+
+/**
+ * QmiNasActiveBand:
+ * @QMI_NAS_ACTIVE_BAND_BC_0: Band class 0.
+ * @QMI_NAS_ACTIVE_BAND_BC_1: Band class 1.
+ * @QMI_NAS_ACTIVE_BAND_BC_2: Band class 2.
+ * @QMI_NAS_ACTIVE_BAND_BC_3: Band class 3.
+ * @QMI_NAS_ACTIVE_BAND_BC_4: Band class 4.
+ * @QMI_NAS_ACTIVE_BAND_BC_5: Band class 5.
+ * @QMI_NAS_ACTIVE_BAND_BC_6: Band class 6.
+ * @QMI_NAS_ACTIVE_BAND_BC_7: Band class 7.
+ * @QMI_NAS_ACTIVE_BAND_BC_8: Band class 8.
+ * @QMI_NAS_ACTIVE_BAND_BC_9: Band class 9.
+ * @QMI_NAS_ACTIVE_BAND_BC_10: Band class 10.
+ * @QMI_NAS_ACTIVE_BAND_BC_11: Band class 11.
+ * @QMI_NAS_ACTIVE_BAND_BC_12: Band class 12.
+ * @QMI_NAS_ACTIVE_BAND_BC_13: Band class 13.
+ * @QMI_NAS_ACTIVE_BAND_BC_14: Band class 14.
+ * @QMI_NAS_ACTIVE_BAND_BC_15: Band class 15.
+ * @QMI_NAS_ACTIVE_BAND_BC_16: Band class 16.
+ * @QMI_NAS_ACTIVE_BAND_BC_17: Band class 17.
+ * @QMI_NAS_ACTIVE_BAND_BC_18: Band class 18.
+ * @QMI_NAS_ACTIVE_BAND_BC_19: Band class 19.
+ * @QMI_NAS_ACTIVE_BAND_GSM_450: GSM 450.
+ * @QMI_NAS_ACTIVE_BAND_GSM_480: GSM 480.
+ * @QMI_NAS_ACTIVE_BAND_GSM_750: GSM 750.
+ * @QMI_NAS_ACTIVE_BAND_GSM_850: GSM 850.
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED: GSM 900 (Extended).
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY: GSM 900 (Primary).
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS: GSM 900 (Railways).
+ * @QMI_NAS_ACTIVE_BAND_GSM_1800: GSM 1800.
+ * @QMI_NAS_ACTIVE_BAND_GSM_1900: GSM 1900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_2100: WCDMA 2100.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900: WCDMA PCS 1900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800: WCDMA DCS 1800.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_US: WCDMA 1700 (U.S.).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_850: WCDMA 850.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_800: WCDMA 800.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_2600: WCDMA 2600.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_900: WCDMA 900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN: WCDMA 1700 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN: WCDMA 1500 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN: WCDMA 850 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_1: E-UTRA band 1.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_2: E-UTRA band 2.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_3: E-UTRA band 3.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_4: E-UTRA band 4.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_5: E-UTRA band 5.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_6: E-UTRA band 6.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_7: E-UTRA band 7.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_8: E-UTRA band 8.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_9: E-UTRA band 9.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_10: E-UTRA band 10.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_11: E-UTRA band 11.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_12: E-UTRA band 12.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_13: E-UTRA band 13.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_14: E-UTRA band 14.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_17: E-UTRA band 17.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_18: E-UTRA band 18.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_19: E-UTRA band 19.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_20: E-UTRA band 20.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_21: E-UTRA band 21.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_24: E-UTRA band 24.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_25: E-UTRA band 25.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_33: E-UTRA band 33.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_34: E-UTRA band 34.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_35: E-UTRA band 35.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_36: E-UTRA band 36.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_37: E-UTRA band 37.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_38: E-UTRA band 38.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_39: E-UTRA band 39.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_40: E-UTRA band 40.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_41: E-UTRA band 41.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_42: E-UTRA band 42.
+ * @QMI_NAS_ACTIVE_BAND_EUTRA_43: E-UTRA band 43.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_A: TD-SCDMA Band A.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_B: TD-SCDMA Band B.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_C: TD-SCDMA Band C.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_D: TD-SCDMA Band D.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_E: TD-SCDMA Band E.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_F: TD-SCDMA Band F.
+ *
+ * Band classes.
+ */
+typedef enum {
+ QMI_NAS_ACTIVE_BAND_BC_0 = 0,
+ QMI_NAS_ACTIVE_BAND_BC_1 = 1,
+ QMI_NAS_ACTIVE_BAND_BC_2 = 2,
+ QMI_NAS_ACTIVE_BAND_BC_3 = 3,
+ QMI_NAS_ACTIVE_BAND_BC_4 = 4,
+ QMI_NAS_ACTIVE_BAND_BC_5 = 5,
+ QMI_NAS_ACTIVE_BAND_BC_6 = 6,
+ QMI_NAS_ACTIVE_BAND_BC_7 = 7,
+ QMI_NAS_ACTIVE_BAND_BC_8 = 8,
+ QMI_NAS_ACTIVE_BAND_BC_9 = 9,
+ QMI_NAS_ACTIVE_BAND_BC_10 = 10,
+ QMI_NAS_ACTIVE_BAND_BC_11 = 11,
+ QMI_NAS_ACTIVE_BAND_BC_12 = 12,
+ QMI_NAS_ACTIVE_BAND_BC_13 = 13,
+ QMI_NAS_ACTIVE_BAND_BC_14 = 14,
+ QMI_NAS_ACTIVE_BAND_BC_15 = 15,
+ QMI_NAS_ACTIVE_BAND_BC_16 = 16,
+ QMI_NAS_ACTIVE_BAND_BC_17 = 17,
+ QMI_NAS_ACTIVE_BAND_BC_18 = 18,
+ QMI_NAS_ACTIVE_BAND_BC_19 = 19,
+ QMI_NAS_ACTIVE_BAND_GSM_450 = 40,
+ QMI_NAS_ACTIVE_BAND_GSM_480 = 41,
+ QMI_NAS_ACTIVE_BAND_GSM_750 = 42,
+ QMI_NAS_ACTIVE_BAND_GSM_850 = 43,
+ QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED = 44,
+ QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY = 45,
+ QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS = 46,
+ QMI_NAS_ACTIVE_BAND_GSM_1800 = 47,
+ QMI_NAS_ACTIVE_BAND_GSM_1900 = 48,
+ QMI_NAS_ACTIVE_BAND_WCDMA_2100 = 80,
+ QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900 = 81,
+ QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800 = 82,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1700_US = 83,
+ QMI_NAS_ACTIVE_BAND_WCDMA_850 = 84,
+ QMI_NAS_ACTIVE_BAND_WCDMA_800 = 85,
+ QMI_NAS_ACTIVE_BAND_WCDMA_2600 = 86,
+ QMI_NAS_ACTIVE_BAND_WCDMA_900 = 87,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN = 88,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN = 90,
+ QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN = 91,
+ QMI_NAS_ACTIVE_BAND_EUTRA_1 = 120,
+ QMI_NAS_ACTIVE_BAND_EUTRA_2 = 121,
+ QMI_NAS_ACTIVE_BAND_EUTRA_3 = 122,
+ QMI_NAS_ACTIVE_BAND_EUTRA_4 = 123,
+ QMI_NAS_ACTIVE_BAND_EUTRA_5 = 124,
+ QMI_NAS_ACTIVE_BAND_EUTRA_6 = 125,
+ QMI_NAS_ACTIVE_BAND_EUTRA_7 = 126,
+ QMI_NAS_ACTIVE_BAND_EUTRA_8 = 127,
+ QMI_NAS_ACTIVE_BAND_EUTRA_9 = 128,
+ QMI_NAS_ACTIVE_BAND_EUTRA_10 = 129,
+ QMI_NAS_ACTIVE_BAND_EUTRA_11 = 130,
+ QMI_NAS_ACTIVE_BAND_EUTRA_12 = 131,
+ QMI_NAS_ACTIVE_BAND_EUTRA_13 = 132,
+ QMI_NAS_ACTIVE_BAND_EUTRA_14 = 133,
+ QMI_NAS_ACTIVE_BAND_EUTRA_17 = 134,
+ QMI_NAS_ACTIVE_BAND_EUTRA_18 = 143,
+ QMI_NAS_ACTIVE_BAND_EUTRA_19 = 144,
+ QMI_NAS_ACTIVE_BAND_EUTRA_20 = 145,
+ QMI_NAS_ACTIVE_BAND_EUTRA_21 = 146,
+ QMI_NAS_ACTIVE_BAND_EUTRA_24 = 147,
+ QMI_NAS_ACTIVE_BAND_EUTRA_25 = 148,
+ QMI_NAS_ACTIVE_BAND_EUTRA_33 = 135,
+ QMI_NAS_ACTIVE_BAND_EUTRA_34 = 136,
+ QMI_NAS_ACTIVE_BAND_EUTRA_35 = 137,
+ QMI_NAS_ACTIVE_BAND_EUTRA_36 = 138,
+ QMI_NAS_ACTIVE_BAND_EUTRA_37 = 139,
+ QMI_NAS_ACTIVE_BAND_EUTRA_38 = 140,
+ QMI_NAS_ACTIVE_BAND_EUTRA_39 = 141,
+ QMI_NAS_ACTIVE_BAND_EUTRA_40 = 142,
+ QMI_NAS_ACTIVE_BAND_EUTRA_41 = 149,
+ QMI_NAS_ACTIVE_BAND_EUTRA_42 = 150,
+ QMI_NAS_ACTIVE_BAND_EUTRA_43 = 151,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_A = 200,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_B = 201,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_C = 202,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_D = 203,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_E = 204,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_F = 205
+} QmiNasActiveBand;
+
+/**
+ * QmiNasNetworkServiceDomain:
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS: Circuit switched.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_PS: Packet switched.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS: Circuit and packet switched.
+ *
+ * Network Service Domain.
+ */
+typedef enum {
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_CS = 1,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_PS = 2,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS = 3,
+} QmiNasNetworkServiceDomain;
+
+/**
+ * QmiNasEvdoSinrLevel:
+ * @QMI_NAS_EVDO_SINR_LEVEL_0: -9 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_1: -6 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_2: -4.5 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_3: -3 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_4: -2 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_5: +1 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_6: +3 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_7: +6 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_8: +9 dB.
+ *
+ * EV-DO SINR level.
+ */
+typedef enum {
+ QMI_NAS_EVDO_SINR_LEVEL_0 = 0,
+ QMI_NAS_EVDO_SINR_LEVEL_1 = 1,
+ QMI_NAS_EVDO_SINR_LEVEL_2 = 2,
+ QMI_NAS_EVDO_SINR_LEVEL_3 = 3,
+ QMI_NAS_EVDO_SINR_LEVEL_4 = 4,
+ QMI_NAS_EVDO_SINR_LEVEL_5 = 5,
+ QMI_NAS_EVDO_SINR_LEVEL_6 = 6,
+ QMI_NAS_EVDO_SINR_LEVEL_7 = 7,
+ QMI_NAS_EVDO_SINR_LEVEL_8 = 8
+} QmiNasEvdoSinrLevel;
+
#endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */