Commit Graph

3500 Commits

Author SHA1 Message Date
Aleksander Morgado
36733aa4de base-modem: allow looking for the QMI port associated to a given data port
QMI and wwan ports come in pairs. Each wwan port has an associated control QMI
port, which is the only port allowed to send the Start|Stop Network QMI requests
to start|stop the connection in the given wwan interface.

Paired QMI and wwan interfaces (should) share the same parent udev device,
quoting Bjørn:

    "If we ignore the unfortunate 3.4 and 3.5 kernels, then a matching wwanX
     and cdc-wdmY set will always share the same parent USB interface on QMI
     devices.

     Having the same parent USB device is *not* sufficient.  You cannot control
     wwan0 using cdc-wdm1 in the above example."
2012-08-30 17:08:23 +02:00
Aleksander Morgado
3132e34dc1 iface-mode-simple: when setting bands or modes, wait some time to settle down
When bands or allowed modes are changed, the modem will very likely reset its
current registration and start from scratch. We will now give it some seconds
to settle down before going on with the connection request, so that the modem
has enough time to report being unregistered. Without this sleep time, the
unsolicited message reporting being unregistered may arrive *after* having
checked registration status in the Simple connect sequence, and therefore we
end up failing the connection request.
2012-08-30 16:36:38 +02:00
Aleksander Morgado
aa51a16f70 port-probe: fix generic icera support check during probing 2012-08-30 14:24:16 +02:00
Aleksander Morgado
35a69d6b8e huawei: enable QMI-powered Huawei modems 2012-08-30 14:18:03 +02:00
Aleksander Morgado
35bece0af3 sierra: enable QMI-powered Sierra modems 2012-08-30 14:17:51 +02:00
Aleksander Morgado
1ca46bb4a7 port-probe: easier check for Icera support over a list of port probes 2012-08-30 13:57:56 +02:00
Aleksander Morgado
a4e5964506 bearer: add roaming connection allowance rules from the broadband bearer
Connection allowance rules need to be applied to every kind of bearer,
regardless of whether it's based on the generic broadband bearer or not.
2012-08-30 13:35:37 +02:00
Aleksander Morgado
58553df9bb bearer-qmi: 'no-effect' errors while disconnecting aren't fatal 2012-08-30 11:26:28 +02:00
Aleksander Morgado
2edbf674e0 bearer-qmi: assume we need the global packet data handle on no-effect errors 2012-08-30 11:26:22 +02:00
Ben Chan
b060bcfc74 novatel-lte: use 'AT+CRSM=176,28423,0,0,9' instead of 'AT+CIMI' to read IMSI
Based on empirical results, 'AT+CRSM=176,28423,0,0,9' is found more reliable
than 'AT+CIMI' for reading IMSI.
2012-08-30 09:29:39 +02:00
Ben Chan
a2aad7d293 novatel-lte: add a 2-second wait after SIM unlock 2012-08-30 09:18:00 +02:00
Aleksander Morgado
1c49e35a8e iface-modem: run after-sim-unlock also when PIN request is not enabled
Whenever we query current unlock required status and we get that we're unlocked,
we'll launch the after-sim-unlock step so that we try to ensure that the SIM is
ready.
2012-08-30 09:17:43 +02:00
Aleksander Morgado
4114eabaa3 plugin-manager: never suggest result to the probe which generated the suggestion 2012-08-30 00:33:30 +02:00
Aleksander Morgado
72602a3951 qmi-bearer: use new enum types for call end reasons
Sync with libqmi:

commit d473f9ab35b85b76ebd6510a69a49ffa141d85f1
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Tue Aug 28 13:18:44 2012 +0200

    wds: implement "Verbose Call End Reason" types

commit d39c997771da9a8037e61f1b4fc5ccfbb34be952
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Mon Aug 27 20:29:16 2012 +0200

    wds: implement "Call End Reason" type
2012-08-29 17:26:47 +02:00
Aleksander Morgado
4cb6c42d6c qmi-bearer: fix IPv6 disconnection logic 2012-08-29 17:26:47 +02:00
Aleksander Morgado
84e69a1abb bearer-qmi: only keep internal state if IP type specific connection succeeds 2012-08-29 17:26:47 +02:00
Aleksander Morgado
c468e5b352 bearer-qmi: if possible, use "WDS Set IP Family" to select IP family preference 2012-08-29 17:26:47 +02:00
Aleksander Morgado
ea7edbbf9e bearer-qmi: only specify IP family preference TLV if one explicitly requested 2012-08-29 17:26:47 +02:00
Aleksander Morgado
fb93226858 bearer-qmi: allocate different WDS clients for IPv4 and IPv6 setups 2012-08-29 17:26:47 +02:00
Aleksander Morgado
28eb5df342 qmi-port: allow allocating more than one client of a given service
We'll uniquely identify each client generated by the service ID and a user
defined flag, so that we then allow to peek/get the specific client.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
a8cf6f6278 bearer-qmi: enable dual IPv4/IPv6 connections
We provide separate steps to connect/disconnect IPv4 and IPv6.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
7c291ab7a3 bearer-qmi: make compiler happy 2012-08-29 17:26:47 +02:00
Aleksander Morgado
26d9538104 bearer-qmi: 'no-effect' errors while starting network aren't fatal 2012-08-29 17:26:47 +02:00
Aleksander Morgado
5fdb820f28 bearer-qmi: pass down APN/username/password/IP-type to `WDS Start Network' 2012-08-29 17:26:47 +02:00
Aleksander Morgado
60b0812d3a bearer-qmi: implement connection/disconnection sequences 2012-08-29 17:26:47 +02:00
Aleksander Morgado
02c049ce7d broadband-modem-qmi: create a `MMBearerQmi' always by default
We still don't consider the case of having all net ports already connected and
falling back to PPP over a serial port.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
b29fcde7e2 bearer-qmi: new `MMBearerQmi' object
This bearer type does not inherit from `MMBroadbandBearer', and therefore it
doesn't need to be async-initable.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
1525c6a154 build: minor reorder of files to build 2012-08-29 17:26:46 +02:00
Aleksander Morgado
c07490887a broadband-bearer: remove obsolete property names 2012-08-29 17:26:46 +02:00
Aleksander Morgado
e2a6be368e iface-modem: max number of bearers equal to the number of available data ports 2012-08-29 17:26:46 +02:00
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