Age | Commit message (Collapse) | Author |
|
If none of the specified methods is supported, an error is returned.
|
|
The "NAS Get System Selection Preference" response may come without "Mode
Preference". If that is found, look for "Band Preference" and "LTE Band
Preference" TLVs and try to build capabilities from those.
This makes my UML290 properly report CDMA/EVDO+LTE capabilities:
ModemManager[16586]: [/dev/cdc-wdm0] Received message...
>>>>>> QMUX:
>>>>>> length = 55
>>>>>> flags = 0x80
>>>>>> service = "nas"
>>>>>> client = 1
>>>>>> QMI:
>>>>>> flags = "response"
>>>>>> transaction = 1
>>>>>> tlv_length = 43
>>>>>> message = "Get System Selection Preference" (0x0034)
>>>>>> TLV:
>>>>>> type = "Result" (0x02)
>>>>>> length = 4
>>>>>> value = 00:00:00:00
>>>>>> translated = SUCCESS
>>>>>> TLV:
>>>>>> type = "Emergency mode" (0x10)
>>>>>> length = 1
>>>>>> value = 00
>>>>>> translated = 0
>>>>>> TLV:
>>>>>> type = "Band Preference" (0x12)
>>>>>> length = 8
>>>>>> value = 07:00:00:00:00:00:00:00
>>>>>> translated = 7
>>>>>> TLV:
>>>>>> type = "CDMA PRL Preference" (0x13)
>>>>>> length = 2
>>>>>> value = FF:3F
>>>>>> translated = 16383
>>>>>> TLV:
>>>>>> type = "Roaming Preference" (0x14)
>>>>>> length = 2
>>>>>> value = FF:00
>>>>>> translated = 255
>>>>>> TLV:
>>>>>> type = "LTE Band Preference" (0x15)
>>>>>> length = 8
>>>>>> value = 00:00:00:00:00:00:00:00
>>>>>> translated = 0
ModemManager[16586]: KEY: 01:00:01:03:00:00:00:00
ModemManager[16586]: Service: 03
ModemManager[16586]: Client ID: 01
ModemManager[16586]: Transaction ID: 01:00
ModemManager[16586]: <debug> [1347005734.979115] [mm-broadband-modem-qmi.c:321] load_current_capabilities_get_system_selection_preference_ready(): Mode preference not reported in system selection preference
ModemManager[16586]: <debug> [1347005734.979131] [mm-broadband-modem-qmi.c:333] load_current_capabilities_get_system_selection_preference_ready(): Valid bands reported in system selection preference: 'bc-0-a-system, bc-0-b-system, bc-1-all-blocks'
ModemManager[16586]: <debug> [1347005734.979141] [mm-broadband-modem-qmi.c:341] load_current_capabilities_get_system_selection_preference_ready(): LTE band preference found
ModemManager[16586]: [/dev/cdc-wdm0] Sending message...
<<<<<< QMUX:
<<<<<< length = 12
<<<<<< flags = 0x00
<<<<<< service = "dms"
<<<<<< client = 1
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 1
<<<<<< tlv_length = 0
<<<<<< message = "Get Capabilities" (0x0020)
ModemManager[16586]: KEY: 01:00:01:02:00:00:00:00
ModemManager[16586]: Service: 02
ModemManager[16586]: Client ID: 01
ModemManager[16586]: Transaction ID: 01:00
ModemManager[16586]: <debug> [1347005734.982676] [mm-at-serial-port.c:392] debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>'
ModemManager[16586]: <debug> [1347005734.982751] [mm-serial-port.c:969] mm_serial_port_close(): (ttyACM0) device open count is 2 (close)
ModemManager[16586]: <debug> [1347005734.982797] [mm-at-serial-port.c:392] debug_log(): (ttyACM0): --> 'AT+CMEE=1<CR>'
ModemManager[16586]: [/dev/cdc-wdm0] Received message...
>>>>>> QMUX:
>>>>>> length = 38
>>>>>> flags = 0x80
>>>>>> service = "dms"
>>>>>> client = 1
>>>>>> QMI:
>>>>>> flags = "response"
>>>>>> transaction = 1
>>>>>> tlv_length = 26
>>>>>> message = "Get Capabilities" (0x0020)
>>>>>> TLV:
>>>>>> type = "Result" (0x02)
>>>>>> length = 4
>>>>>> value = 00:00:00:00
>>>>>> translated = SUCCESS
>>>>>> TLV:
>>>>>> type = "Info" (0x01)
>>>>>> length = 16
>>>>>> value = B0:9D:57:00:00:DD:6D:00:03:02:05:01:02:04:05:08
>>>>>> translated = [ max_tx_channel_rate = '5742000' max_rx_channel_rate = '7200000' data_service_capability = '3' sim_capability = '2' radio_interface_list = '{ [0] = '1 ' [1] = '2 ' [2] = '4 ' [3] = '5 ' [4] = '8 '}' ]
ModemManager[16586]: KEY: 01:00:01:02:00:00:00:00
ModemManager[16586]: Service: 02
ModemManager[16586]: Client ID: 01
ModemManager[16586]: Transaction ID: 01:00
ModemManager[16586]: <debug> [1347005734.983353] [mm-broadband-modem-qmi.c:183] modem_load_current_capabilities_finish(): loaded current capabilities: cdma-evdo, lte
|
|
|
|
|
|
|
|
Current capabilities is the set of *active* radios that can be used
right now. Modem capabilities are the set of all radios the modem
could use, if some action were performed to enable them if they are
not enabled already (firmware reload, changing allowed mode, etc).
For QMI devices, the DMS Get Capabilities command represents all
radios, and thus "modem capabilities".
But to read *current* capabilities, ie active radios, we need to
query the NAS System Selection Preference and grab the "mode
preference" TLV. Unfortunately that is only available with NAS
>= 1.1, which means older Gobi devices (1K and 2K) don't support
it. So for older devices, we try to get the Technology Preference
(which takes into account user-requested limitations) and then
mask that with the DMS Get Capabilities result for a best-effort
current capabilities.
For example, the Pantech UML290VW reports DMS Get Capabilities
of "cdma, evdo, gsm, umts, lte", but a more limited SSP mode
preference according to what modes are actually enabled. Gobi
1K devices don't support SSP, and the DMS Get Capabilities
reports cdma/evdo or gsm/umts depending on the currently loaded
firmware. Previous to this patch, ModemManager reported all
modes as available on the UML290, ignoring what modes were
actually enabled.
|
|
Get/Set Technology Preference was introduced in NAS 1.0, so should be always
available (even if we thought it was introduced in NAS 1.7, that's not true).
But the newer System Selection Preference behaves better as it allows more
features like 'preferred' modes; so use it when available (NAS >= 1.1).
|
|
Also, sync with libqmi:
commit b03ca502f45f75541c2b2ccebf44e712ab925456
Author: Aleksander Morgado <aleksander@lanedo.com>
Date: Thu Aug 30 19:17:19 2012 +0200
nas: consolidate `QmiNasActiveBand' names
|
|
|