summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-10-24 12:37:05 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-11-11 10:50:18 +0100
commit65e42b247a624584366420e5f92270b006cd61de (patch)
tree671c0588865d7999e07d431a9f14243347885943
parent780abd945a55f9304558c64048338b448c60ca0f (diff)
downloadlibqmi-65e42b247a624584366420e5f92270b006cd61de.tar.gz
dms: new 'Extended LTE Band Capability' TLV in "Get Band Capabilities"
The 'LTE Band Capability' TLV (0x10) is a 64-bit mask, and therefore isn't capable of reporting more than 64 bands (1 to 64). In order to support LTE bands greater than 64, this new 'extended' TLV is defined, as an array of uint16 values, one per band. E.g. this "Get Band Capabilities" response where the modem reports band 66: [/dev/cdc-wdm0] received message... <<<<<< RAW: <<<<<< length = 98 <<<<<< data = 01:61:00:80:02:01:02:01:00:45:00:55:00:02:04:00:00:00:00:00:01:08:00:00:00:C0:07:00:00:02:00:10:08:00:DF:18:09:3B:A0:01:00:00:11:08:00:00:00:00:00:00:00:00:00:12:2A:00:14:00:01:00:02:00:03:00:04:00:05:00:07:00:08:00:0C:00:0D:00:11:00:14:00:19:00:1A:00:1C:00:1D:00:1E:00:26:00:28:00:29:00:42:00 [/dev/cdc-wdm0] received generic response (translated)... <<<<<< QMUX: <<<<<< length = 97 <<<<<< flags = 0x80 <<<<<< service = "dms" <<<<<< client = 1 <<<<<< QMI: <<<<<< flags = "response" <<<<<< transaction = 1 <<<<<< tlv_length = 85 <<<<<< message = "Get Band Capabilities" (0x0045) <<<<<< TLV: <<<<<< type = "Result" (0x02) <<<<<< length = 4 <<<<<< value = 00:00:00:00 <<<<<< translated = SUCCESS <<<<<< TLV: <<<<<< type = "Band Capability" (0x01) <<<<<< length = 8 <<<<<< value = 00:00:C0:07:00:00:02:00 <<<<<< translated = wcdma-2100, wcdma-pcs-1900, wcdma-dcs-1800, wcdma-1700-us, wcdma-850-us, wcdma-900 <<<<<< TLV: <<<<<< type = "LTE Band Capability" (0x10) <<<<<< length = 8 <<<<<< value = DF:18:09:3B:A0:01:00:00 <<<<<< translated = 1, 2, 3, 4, 5, 7, 8, 12, 13, 17, 20, 25, 38, 40, 41 <<<<<< TLV: <<<<<< type = 0x11 <<<<<< length = 8 <<<<<< value = 00:00:00:00:00:00:00:00 <<<<<< TLV: <<<<<< type = "Extended LTE Band Capability" (0x12) <<<<<< length = 42 <<<<<< value = 14:00:01:00:02:00:03:00:04:00:05:00:07:00:08:00:0C:00:0D:00:11:00:14:00:19:00:1A:00:1C:00:1D:00:1E:00:26:00:28:00:29:00:42:00 <<<<<< translated = { [0] = '1 ' [1] = '2 ' [2] = '3 ' [3] = '4 ' [4] = '5 ' [5] = '7 ' [6] = '8 ' [7] = '12 ' [8] = '13 ' [9] = '17 ' [10] = '20 ' [11] = '25 ' [12] = '26 ' [13] = '28 ' [14] = '29 ' [15] = '30 ' [16] = '38 ' [17] = '40 ' [18] = '41 ' [19] = '66 '} Based on a patch from Wolfgang Tolkien <wtolkien@cypress.bc.ca> Updated according to suggestions from Carlo Lobrano <c.lobrano@gmail.com>
-rw-r--r--data/qmi-service-dms.json11
-rw-r--r--src/qmicli/qmicli-dms.c15
2 files changed, 25 insertions, 1 deletions
diff --git a/data/qmi-service-dms.json b/data/qmi-service-dms.json
index 72ebb6e9..32ae8906 100644
--- a/data/qmi-service-dms.json
+++ b/data/qmi-service-dms.json
@@ -1016,7 +1016,16 @@
"since" : "1.0",
"format" : "guint64",
"public-format" : "QmiDmsLteBandCapability",
- "prerequisites": [ { "common-ref" : "Success" } ] } ] },
+ "prerequisites": [ { "common-ref" : "Success" } ] },
+ { "name" : "Extended LTE Band Capability",
+ "id" : "0x12",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "since" : "1.20",
+ "format" : "array",
+ "size-prefix-format" : "guint16",
+ "array-element" : { "format" : "guint16" },
+ "prerequisites" : [ { "common-ref" : "Success" } ] } ] },
// *********************************************************************************
{ "name" : "Get Factory SKU",
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
index 46b684b5..1c363d2c 100644
--- a/src/qmicli/qmicli-dms.c
+++ b/src/qmicli/qmicli-dms.c
@@ -2362,6 +2362,7 @@ get_band_capabilities_ready (QmiClientDms *client,
QmiMessageDmsGetBandCapabilitiesOutput *output;
QmiDmsBandCapability band_capability;
QmiDmsLteBandCapability lte_band_capability;
+ GArray *extended_lte_band_capability;
GError *error = NULL;
gchar *str;
@@ -2402,6 +2403,20 @@ get_band_capabilities_ready (QmiClientDms *client,
g_free (str);
}
+ if (qmi_message_dms_get_band_capabilities_output_get_extended_lte_band_capability (
+ output,
+ &extended_lte_band_capability,
+ NULL)) {
+ guint i;
+
+ g_print ("\tLTE bands (extended): '");
+ for (i = 0; i < extended_lte_band_capability->len; i++)
+ g_print ("%s%" G_GUINT16_FORMAT,
+ i == 0 ? "" : ", ",
+ g_array_index (extended_lte_band_capability, guint16, i));
+ g_print ("'\n");
+ }
+
qmi_message_dms_get_band_capabilities_output_unref (output);
operation_shutdown (TRUE);
}