Commit Graph

2375 Commits

Author SHA1 Message Date
Aleksander Morgado
14bd267e8e base-modem: allow getting/peeking all data ports 2012-08-29 17:26:46 +02:00
Aleksander Morgado
bc3e77dadf broadband-modem-qmi: assume we don't have messaging support
Just to cleanup the sequence for now, we can develop it later.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
877fbba595 broadband-modem-qmi: assume we don't have USSD support
Just to cleanup the sequence for now, we can develop it later.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
494a70a8ff core: handle the 'usb'->'usbmisc' subsystem rename in the kernel
We'll try to cope with getting devices being reported in either 'usb' or
'usbmisc', trying to avoid the need of checking kernel version during runtime.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
8cb021293c broadband-modem-qmi: don't allocate WDS client during startup
We'll allocate WDS clients only when launching a connection.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
e9aff3ba42 base-modem: allow grabbing multiple 'net' and 'qmi' ports
All grabbed 'net' ports are added to the new list of data ports. It is a task
for the specific plugin to decide how each of the data ports should be
connected. In the case of not having 'net' ports, the list of data ports will
only contain a single AT port.

All grabbed 'qmi' ports are added to the new list of QMI ports. The first port
in the list is to be considered the 'primary' one, and will be the one used
for all services. The remaining QMI ports, if any, will only be used to for WDS,
to manage the associated 'net' ports.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
7369f16759 broadband-modem-qmi: don't rely on the detailed service status to get HDR reg
The 'detailed service status' TLV is either pretty new and not always available,
or given only under some specific circumstances. So, try to gather CDMA1x and
EV-DO registration status with the default info we usually do get.

The logic is the following:
 * If registered and the access technologies contain CDMA1x, then CDMA1x is
registered, otherwise it's not.
 * If registered and the access technologies contain any of the EV-DO revisions,
then EV-DO is registered, otherwise it's not.

An example output in a CDMA network:

[/dev/cdc-wdm0] Successfully got serving system:
	Registration state: 'registered'
	CS: 'attached'
	PS: 'attached'
	Selected network: '3gpp2'
	Radio interfaces: '2'
		[0]: 'cdma-1xevdo'
		[1]: 'cdma-1x'
	Roaming status: 'off'
	Data service capabilities: '2'
		[0]: 'cdma'
		[1]: 'evdo-rev-a'
	Current PLMN:
		MCC: '311'
		MNC: '480'
		Description: 'Verizon Wireless'
	CDMA System ID:
		SID: '26'
		ESN: '1'
	CDMA Base station info:
		Base station ID: '3633'
		Latitude: '44.913333'º
		Longitude: '-93.279722'º
	Roaming indicators: '2'
		[0]: '(null)' (cdma-1x)
		[1]: '(null)' (none)
	Default roaming status: '(null)'
	3GPP2 time zone:
		Leap seconds: '16' seconds
		Local time offset: '-300' minutes
		Daylight saving time: 'no'
	CDMA P_Rev: '6'
2012-08-29 17:26:46 +02:00
Aleksander Morgado
1f82cd1a32 broadband-modem-qmi: handle serving system output when selected network is unknown
Seems that sometimes we get 'selected network' as UNKNOWN, but we still have
proper registration information. Try to handle those cases.

[/dev/cdc-wdm0] Successfully got serving system:
	Registration state: 'registered'
	CS: 'detached'
	PS: 'attached'
	Selected network: 'unknown'
	Radio interfaces: '1'
		[0]: 'lte'
	Roaming status: 'off'
	Data service capabilities: '1'
		[0]: 'lte'
	Current PLMN:
		MCC: '311'
		MNC: '480'
		Description: 'Verizon Wireless'
	Roaming indicators: '1'
		[0]: 'off' (lte)
2012-08-29 17:26:46 +02:00
Aleksander Morgado
12246a8c60 broadband-modem-qmi: use only deprecated commands
The QMI protocol is updated frequently with new commands replacing and
improving some already existing ones, which get marked as deprecated.
Instead of initially try to cover the logic with both the old and the new
commands, we'll default to use only the old deprecated ones, which should be
supported also in the modems with newer services.

The supported already implemented for the new QMI commands is hidden behind a
`--with-newest-qmi-commands' configure switch.

Once the implementation is fully developed and tested using the deprecated
commands we can then focus in including the support for the new ones.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
0886322cc4 broadband-modem-qmi: implement supported modes loading 2012-08-29 17:26:45 +02:00
Aleksander Morgado
716256595f broadband-modem-qmi: implement CDMA unsolicited registration events for NAS < 1.8 2012-08-29 17:26:45 +02:00
Aleksander Morgado
930235cbb6 broadband-modem-qmi: implement CDMA registration checks for NAS < 1.8 2012-08-29 17:26:45 +02:00
Aleksander Morgado
edf2940c15 iface-modem-cdma: provide separate method to update access tech 2012-08-29 17:26:45 +02:00
Aleksander Morgado
be05543a9a broadband-modem-qmi: build 3GPP access technologies from data service capabilities 2012-08-29 17:26:45 +02:00
Aleksander Morgado
fe4d94788b iface-modem-3gpp: provide separate methods to update access tech and location 2012-08-29 17:26:45 +02:00
Aleksander Morgado
483f59c01d broadband-modem-qmi: include '3gpp' prefix in the 3GPP registration checks 2012-08-29 17:26:45 +02:00
Aleksander Morgado
9baac727fe broadband-modem-qmi: don't keep cs|ps flags when checking registration status
Just report both always.
2012-08-29 17:26:45 +02:00
Aleksander Morgado
f796c6d906 iface-modem-3gpp: log about which registration check will be run 2012-08-29 17:26:45 +02:00
Aleksander Morgado
05f80036d1 iface-modem-cdma: allow implementations to fully override registration checks
Implementations of the CDMA interface can either:
   * Implement run_registration_checks()
or,
   * Implement the sub-steps of the generic registration checks sequence
2012-08-29 17:26:45 +02:00
Aleksander Morgado
421d423777 iface-modem-cdma: minor fix in interface API names 2012-08-29 17:26:45 +02:00
Aleksander Morgado
bccd80058a broadband-modem-qmi: 'no-effect' is not an error during automatic registration 2012-08-29 17:26:45 +02:00
Aleksander Morgado
43315f1121 broadband-modem-qmi: fix signal handlers
User data is always the last parameter
2012-08-29 17:26:44 +02:00
Aleksander Morgado
d31b2ae019 broadband-modem-qmi: implement auto/manual network registration using QMI 2012-08-29 17:26:44 +02:00
Aleksander Morgado
a6ff9b2a17 iface-modem-3gpp: implement the network registration request logic
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.
2012-08-29 17:26:44 +02:00
Aleksander Morgado
7ce6b12962 broadband-modem: validate operator ID before trying to register to it 2012-08-29 17:26:44 +02:00
Aleksander Morgado
51678e141b modem-helpers: new method to validate and/or parse MCC/MNC operator ID string 2012-08-29 17:26:44 +02:00
Aleksander Morgado
02573a5565 broadband-modem-qmi: limit 3GPP registration updates for 3GPP modems 2012-08-29 17:26:44 +02:00
Aleksander Morgado
6b5799ea0f broadband-modem-qmi: consolidate Serving System response/indication processing 2012-08-29 17:26:44 +02:00
Aleksander Morgado
8bcf6dc47d broadband-modem-qmi: implement 3GPP unsolicited registration events for NAS >= 1.8 2012-08-29 17:26:44 +02:00
Aleksander Morgado
a6a34c3b9c broadband-modem-qmi: implement 3GPP registration checks for NAS >= 1.8 2012-08-29 17:26:44 +02:00
Aleksander Morgado
f015bf54db broadband-modem-qmi: fix radio technology preference enum names
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.
2012-08-29 17:26:44 +02:00
Aleksander Morgado
03e1c9348e broadband-modem-qmi: implement operator name/code loading with QMI
Just report the values cached during the 3GPP registration checks
2012-08-29 17:26:44 +02:00
Aleksander Morgado
b708976bd6 broadband-modem-qmi: implement 3GPP unsolicited registration events for NAS < 1.8 2012-08-29 17:26:43 +02:00
Aleksander Morgado
0b52840d15 broadband-modem-qmi: implement 3GPP registration checks for NAS < 1.8 2012-08-29 17:26:43 +02:00
Aleksander Morgado
c97aaba47f broadband-modem-qmi: use version from the client to know supported commands
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).
2012-08-29 17:26:43 +02:00
Aleksander Morgado
ad37b494c4 broadband-modem-qmi: fix radio interface variable name
Sync with libqmi:

commit ebfa80154fad012bb6ea3e964dcea6f5b6cf3f91
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Thu Aug 2 12:06:09 2012 +0200

    nas: consolidate variable names for `QmiNasRadioInterface' types
2012-08-29 17:26:43 +02:00
Aleksander Morgado
e2c6c66d0c broadband-modem-qmi: fix method name
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.
2012-08-29 17:26:43 +02:00
Aleksander Morgado
651d306c28 broadband-modem-qmi: fix missing GSimpleAsyncResult unrefs 2012-08-29 17:26:43 +02:00
Aleksander Morgado
3a29d1b2bc broadband-modem-qmi: setup/cleanup signal quality related unsolicited events
We setup signal handlers for every possible indication, even if they are not
supported.
2012-08-29 17:26:43 +02:00
Aleksander Morgado
0bd9b46b09 broadband-modem-qmi: enable/disable signal quality related unsolicited events
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.
2012-08-29 17:26:43 +02:00
Aleksander Morgado
88053b7342 broadband-modem-qmi: implement allowed mode setting 2012-08-29 17:26:43 +02:00
Aleksander Morgado
da106845ca broadband-modem-qmi: fix flags of supported commands for allowed modes 2012-08-29 17:26:43 +02:00
Aleksander Morgado
e94f197898 broadband-modem-qmi: use 'low-power' mode when disabling
Reported by: Bjørn Mork <bjorn@mork.no>
2012-08-29 17:26:43 +02:00
Aleksander Morgado
bef4fd64d4 broadband-modem-qmi: implement initial allowed mode loading using QMI 2012-08-29 17:26:43 +02:00
Aleksander Morgado
68c32dcf7b broadband-modem-qmi: fix band enum names 2012-08-29 17:26:43 +02:00
Aleksander Morgado
1c9ec829be broadband-modem-qmi: load ESN from the cached info 2012-08-29 17:26:42 +02:00
Aleksander Morgado
bb54ff4fec broadband-modem-qmi: load MEID from the cached info 2012-08-29 17:26:42 +02:00
Aleksander Morgado
b12abb6b97 broadband-modem-qmi: implement the CDMA interface 2012-08-29 17:26:42 +02:00
Aleksander Morgado
9f6250e7a5 broadband-modem-qmi: load IMEI from the cached info 2012-08-29 17:26:42 +02:00
Aleksander Morgado
2fb4080a7e broadband-modem-qmi: cache IMEI, ESN and MEID values when loaded 2012-08-29 17:26:42 +02:00