In the generic broadband modem implementation we'll just implement the specific
command to request auto/manual network registration, and we leave all the other
logic (waiting for the new registration status and all that) in the interface,
as it is really common for every possible implementation.
Sync with libqmi:
commit 54e5400f6977ae2036b54c2661c1e5c101e03fe4
Author: Aleksander Morgado <aleksander@lanedo.com>
Date: Mon Aug 6 19:57:06 2012 +0200
nas: fix `QmiNasRadioTechnologyPreference' enum names
'Analog' and 'Digital' are purely 3GPP2 terms, so avoid those and provide a mix
of 3GPP and 3GPP2 names.
Instead of always trying to use the newest commands and falling back to the
deprecated one when found that it is not supported, use the service version
given by the client to determine which is the best command to use.
Still, sometimes we need to handle ourselves the fallback to the deprecated
command, when we don't exactly know in which service version the new behaviour
was added (e.g. the 'Mode Preference' TLV in 'Get/Set System Selection
Preference' was last updated in NAS 1.16, but we don't exactly know when it
was added).
Sync with libqmi:
commit cc97645578d937417bb2d72d22714776a98c549e
Author: Aleksander Morgado <aleksander@lanedo.com>
Date: Thu Aug 2 12:15:05 2012 +0200
nas: don't mistake 'change duration' with 'preference duration'
They actually have POWER_CYCLE and PERMANENT values swapped.
Kudos to the one who decided that.
The logic here involves knowing if we have support for 'Signal Info'
indications. All the 'Signal Info' stuff was included in NAS 1.8, so we're
just using a single flag to indicate support for that.
If we do have 'Signal Info', enabling the signal quality indications involves
two steps: configuring thresholds with "Config Signal Info" and then enabling
them with "Register Indications".
If we don't have 'Signal Info' we fallback to the good old "Set Event Report"
for enabling/disabling the indications.
The "NAS Network Scan" command replies with several optional TLVs. One of the
TLVs gives the status of the network, using MCC/MNC as index; another one gives
the radio access technology, also using MCC/MNC as index. But, several entries
may have the same MCC/MNC, so there is no clear way to mix the results of both
TLVs in the same element. We'll try to do a best guess, trying not to use the
same RAT result twice, but this is really a best guess.
Seems to me that "Get Band Capabilities" just returns the bands 'currently'
allowed to use. E.g. my Pantech UML290 gives me:
'cdma-bc0-cellular-800, cdma-bc1-pcs-1900'
(even if I know the modem can also do LTE and 3GPP)