QMI service versions in different devices
Bjørn Mork
bjorn at mork.no
Mon Jul 30 06:01:30 PDT 2012
Aleksander Morgado <aleksander at lanedo.com> writes:
>> I have no idea if that is the correct dependency or not...
>>
>
> It wasn't :-),
I suspected so - brute force quick fixing rarey is correct.
> this one should do it:
> http://cgit.freedesktop.org/libqmi/commit/?id=a254dd1c1cb4ddf65bff47dba0119b8f790b67a8
>
> It's anyway not the perfect one; the dep should be between
> qmi-flags64-types.h and qmi-[service].h; but anyway both qmi-[service].h
> and [qmi-service].c are generated at the same time.
Yup, that fixes it. But I have a whole list of further complaints :-)
I don't think TLV 0x10 is mandatory here:
[30 Jul 2012, 14:37:16] [Debug] [/dev/cdc-wdm1] Sending message...
<<<<<< QMUX:
<<<<<< length = 12
<<<<<< flags = 0x00
<<<<<< service = "nas"
<<<<<< client = 5
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 1
<<<<<< tlv_length = 0
<<<<<< message = "Get Technology Preference" (0x002B)
[30 Jul 2012, 14:37:16] [Debug] KEY: 01:00:05:03:00:00:00:00
[30 Jul 2012, 14:37:16] [Debug] Service: 03
[30 Jul 2012, 14:37:16] [Debug] Client ID: 05
[30 Jul 2012, 14:37:16] [Debug] Transaction ID: 01:00
[30 Jul 2012, 14:37:16] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> QMUX:
>>>>>> length = 25
>>>>>> flags = 0x80
>>>>>> service = "nas"
>>>>>> client = 5
>>>>>> QMI:
>>>>>> flags = "response"
>>>>>> transaction = 1
>>>>>> tlv_length = 13
>>>>>> message = "Get Technology Preference" (0x002B)
>>>>>> TLV:
>>>>>> type = "Active" (0x01)
>>>>>> length = 3
>>>>>> value = 2E:00:00
>>>>>> translated = [ technology_preference = '46' technology_preference_duration = '0' ]
>>>>>> TLV:
>>>>>> type = "Result" (0x02)
>>>>>> length = 4
>>>>>> value = 00:00:00:00
>>>>>> translated = SUCCESS
[30 Jul 2012, 14:37:16] [Debug] KEY: 01:00:05:03:00:00:00:00
[30 Jul 2012, 14:37:16] [Debug] Service: 03
[30 Jul 2012, 14:37:16] [Debug] Client ID: 05
[30 Jul 2012, 14:37:16] [Debug] Transaction ID: 01:00
error: operation failed: Couldn't get the Persistent TLV: TLV not found
And here TLV 0x19 is supposed to be 4 bytes, not 8:
[30 Jul 2012, 14:40:37] [Debug] KEY: 01:00:00:00:00:00:00:00
[30 Jul 2012, 14:40:37] [Debug] Service: 00
[30 Jul 2012, 14:40:37] [Debug] Client ID: 00
[30 Jul 2012, 14:40:37] [Debug] Transaction ID: 01:00
[30 Jul 2012, 14:40:37] [Debug] [/dev/cdc-wdm1] Registered 'nas' (version unknown) client with ID '6'
[30 Jul 2012, 14:40:37] [Debug] Asynchronously getting system selection preference...
[30 Jul 2012, 14:40:37] [Debug] [/dev/cdc-wdm1] Sending message...
<<<<<< QMUX:
<<<<<< length = 12
<<<<<< flags = 0x00
<<<<<< service = "nas"
<<<<<< client = 6
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 1
<<<<<< tlv_length = 0
<<<<<< message = "Get System Selection Preference" (0x0034)
[30 Jul 2012, 14:40:37] [Debug] KEY: 01:00:06:03:00:00:00:00
[30 Jul 2012, 14:40:37] [Debug] Service: 03
[30 Jul 2012, 14:40:37] [Debug] Client ID: 06
[30 Jul 2012, 14:40:37] [Debug] Transaction ID: 01:00
**
ERROR:qmi-utils.c:168:qmi_utils_read_guint64_from_buffer: assertion failed: (*buffer_size >= 8)
Aborted
bjorn at nemi:/usr/local/src/git/libqmi$ git diff
diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json
index 2a0e3c8..0bf2e52 100644
--- a/data/qmi-service-nas.json
+++ b/data/qmi-service-nas.json
@@ -531,7 +531,7 @@
"public-format" : "QmiNasRadioTechnologyPreferenceDuration" } ] },
{ "name" : "Persistent",
"id" : "0x10",
- "mandatory" : "yes",
+ "mandatory" : "no",
"type" : "TLV",
"format" : "guint16",
"public-format" : "QmiNasRadioTechnologyPreference" } ] },
@@ -601,7 +601,7 @@
"id" : "0x19",
"mandatory" : "no",
"type" : "TLV",
- "format" : "guint64",
+ "format" : "guint32",
"public-format" : "QmiNasTdScdmaBandPreference" },
{ "name" : "Manual Network Selection",
"id" : "0x1B",
Things seem to work for me with the diff above:
bjorn at nemi:~$ qmicli -d /dev/cdc-wdm1 --nas-get-technology-preference
[/dev/cdc-wdm1] Successfully got technology preference
Active: '3gpp, analog, digital, lte', duration: 'permanent'
bjorn at nemi:~$ qmicli -d /dev/cdc-wdm1 --nas-get-system-selection-preference
[/dev/cdc-wdm1] Successfully got system selection preference
Emergency mode: 'no'
Mode preference: 'gsm, umts, lte'
Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-pcs-1900, wcdma-2100, wcdma-900'
LTE band preference: '1, 3, 7, 8, 20'
TD-SCDMA band preference: 'b'
Roaming preference: 'any'
Network selection preference: 'automatic'
Service selection preference: 'wcdma'
Bjørn
More information about the libqmi-devel
mailing list