Commit Graph

5661 Commits

Author SHA1 Message Date
David McCullough
d73b633639 huawei: GPS support for MU609/MU909
Implement GPS support on the MU609 and MU090 Huawei modules.
Its highly likely the commands are the same for other Huawei modems
and it just needs to be activated via udev rules that flag the GPS port
with ID_MM_HUAWEI_GPS_PORT=1.

There are a lot of options that can be tweaked on the Huawei GPS setup,
this code just chooses a simple default for unassisted, standalone GPS
operation.

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-03 16:01:02 +02:00
Aleksander Morgado
09eb87f899 cinterion: allow 'unmanaged' GPS setup 2014-07-02 12:28:56 +02:00
Aleksander Morgado
40cdf3bac4 option,hso: print port type before parsing 2014-07-02 12:28:56 +02:00
Aleksander Morgado
d43363ef14 option,hso: allow 'unmanaged' GPS setup 2014-07-02 12:28:56 +02:00
Aleksander Morgado
ad67d68179 location: new 'unmanaged' GPS setup
Standard GPS setup (raw/nmea) will both enable the GPS module and take full
control of the GPS port. This prevents other processes from reading the NMEA
traces from e.g. a tty. In order to handle this, a new 'unmanaged' GPS location
source is introduced, which will just enable/disable the GPS module, without
reading anything from the GPS port. Of course, both raw/nmea and unmanaged
setups cannot be enabled at the same time.
2014-07-02 12:28:56 +02:00
Dan Williams
915a5beac0 bearer-mbim: ignore empty DNS server addresses 2014-07-01 16:38:34 -05:00
Aleksander Morgado
15a3ebbd35 cinterion: enable GPS location reporting for the PHS8 in QMI-mode
The PHS8 in QMI-mode doesn't support GPS location retrieval via QMI, so we will
fallback to use the AT-based setup and the TTY for reading NMEA traces.
2014-07-01 15:46:57 +02:00
Aleksander Morgado
ce5c3f5af6 ifaces: always include <libmm-glib.h>
As they all use the 'MMSimpleStatus' type.
2014-07-01 15:42:21 +02:00
David McCullough
83c8db8819 huawei: avoid AT^GETPORTMODE in Huawei MU609
The MU609 modems from Huawei have a bug (confirmed by Huawei) that causes
the modem to reset if AT^GETPORTMODE is issued.

I have provided and example udev rule I use to disable this command as a
patch,  feel free to drop that if its not acceptable.  Since I cannot tell
the modem type from within the udev rules this is less specific than my
previous code based patch,  but much simpler ;-)

I have two modems that share the same USB ID,  however,  neither supports the
^GETPORTMODE command (and one of them crashes when it is issued).  Perhaps
someone with a Huawei that supports ^GETPORTMODE can check their USB ID's
and see if they clash.

Here is a comment from the Huawei devs:
> We confirmed this is a issue. This is Qualcomm baseband command at Data
> Card. We didn’t delete and block it. We will fix this issue in next FW.
> Thank you very much.

Sign-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-01 11:08:47 +02:00
Aleksander Morgado
8f837b830d cinterion: enable GPS location reporting for the PHS8 in AT-mode
This enables support for GPS location reporting when the PHS8 is NOT used in QMI
mode.
2014-06-27 13:18:29 +02:00
Aleksander Morgado
e0f3716d26 modem-helpers: don't return any result if an error happens when parsing CPMS=?
We shouldn't rely on the caller to cleanup intermediate results when returning
an error.
2014-06-27 09:20:40 +02:00
Aleksander Morgado
4406b1e6ec modem-helpers: improve +CMTI indication regex
Allow whitespaces added in several places, like between the comma and the index,
which is what the Cinterion PHS8 does:
  <CR><LF>+CMTI: "MT", 5<CR><LF>
2014-06-25 17:40:06 +02:00
Aleksander Morgado
9637c1ed38 cinterion: update default setting for new SMS indications
The setup in Cinterion modems goes as follows:
  AT+CNMI=<mode>[, <mt>[, <bm>[, <ds>[, <bfr>]]]]

For each field, several setups are available, so we could use a default value,
as we were doing until now (+CNMI=2,1,2,2,1).

BUT, not every Cinterion modem allows the same set of settings. For example, the
new PHS8 only allows '0' for the <ds> value:
  AT+CNMI=?
  +CNMI: (0,1,2),(0,1),(0,2),(0),(1)

So, instead of hardcoding the setup, try to find the best suitable one for each
modem. We'll parse the +CNMI=? test response to know which values are supported
during the messaging support check, which is run once during initialization.
2014-06-25 15:39:45 +02:00
Aleksander Morgado
58d2806f4c cinterion: new 'AT+CNMI=?' parser helper 2014-06-25 15:04:09 +02:00
Aleksander Morgado
08ecc14722 base-modem: quicker find matching cdc-wdm QMI or MBIM ports 2014-06-23 18:12:27 +02:00
Aleksander Morgado
b520503686 huawei: quicker find matching cdc-wdm AT port
Without using a new GUdevClient.

Based on a patch from Dan Williams <dcbw@redhat.com>
2014-06-23 18:12:27 +02:00
Aleksander Morgado
7c347aa3ec port: store parent sysfs path in each MMPort 2014-06-23 18:12:27 +02:00
Aleksander Morgado
7752c9920d huawei: flag /dev/cdc-wdm as primary if no primary found already 2014-06-23 18:12:27 +02:00
Aleksander Morgado
e9d016f088 huawei: setup unsolicited message handlers also in the AT cdc-wdm ports 2014-06-23 18:12:27 +02:00
Aleksander Morgado
75a5c48345 huawei: use the cdc-wdm port dialing if available
With the new 'huawei-cdc-ncm' driver in the kernel, we now may get a
/dev/cdc-wdm AT-capable port exposed by the Huawei device. If so, we must use
this port for NDISDUP dialling in order to get the network interface connected.
2014-06-23 18:12:27 +02:00
Aleksander Morgado
293b032149 build: ignore test files 2014-06-22 18:24:38 +02:00
Aleksander Morgado
a691eec6ca build: avoid using 'INCLUDES' in Makefile.am
Avoids warnings during build; e.g.:
    warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-22 18:24:21 +02:00
Prathmesh Prabhu
9e93e22482 bearer-mbim: fix disconnect error handling case split
The first case, with no error, needs to check that there was no original error.
Currently, if an error occurs and the resulting NwError is parsed correctly, the
case split treats it as a no-error case.
2014-06-20 12:54:39 -05:00
Prathmesh Prabhu
699a25b802 modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError
Commit 55e40ea b1ae81a in libmbim ("libmbim-glib: add additional GMM
cause codes to MbimNwError") added one more GMM cause code to
MbimNwError. This patch maps that to MMMobileEquipmentError.

This patch requires libmbim >= 1.9.0
2014-06-19 18:05:48 +02:00
Prathmesh Prabhu
6491d82655 bearer-mbim: disconnect attempt should succeed if bearer is already disconnected
When trying to disconnect bearer, if the modem responds with
MBIM_STATUS_ERROR_CONTEXT_NOT_ACTIVATED, take it to mean that the bearer has
already been disconnected.
2014-06-18 10:05:39 -05:00
Ben Chan
9e50209019 icera: fix 'sometimes-uninitialized' variable issues 2014-06-18 08:14:53 -05:00
Aleksander Morgado
ed623f6628 iface-modem-messaging: don't skip MT storage when reading if it's the only one 2014-06-16 18:03:38 +02:00
Dan Williams
6e490944d0 merge: fix IPv6 support and operation
Notable changes include reporting all available IP configruation
information in the bearer IP details, even if the method is DHCP,
in which case the client should apply the given configuration and
then proceed with DHCP/PPP/SLAAC/etc addressing mechanisms.

QMI, MBIM, and some other plugins have been switched to the "STATIC"
configuration method from DHCP when the firmware supplies all the
necessary details.
2014-06-13 14:57:08 -05:00
Dan Williams
02f9b926cd broadband-bearer-mbm: support IPv6 DNS and use static IPv4 configuration 2014-06-13 11:30:49 -05:00
Dan Williams
ca0a567f74 broadband-bearer-qmi: support IPv6 configuration and use static for IPv4 2014-06-13 11:30:49 -05:00
Dan Williams
8017628353 cli: print IP details for all valid bearer types
Even DHCP or PPP may have some IP details, like the link-local
address for IPv6 bearers.
2014-06-13 11:30:49 -05:00
Dan Williams
7673a1d3a3 bearer-mbim: use DHCP method when only an IPv6 link-local address is found
When only given a link-local address, then SLAAC must be used to
retrieve the real prefix.
2014-06-13 11:30:49 -05:00
Dan Williams
33eba0393d api: update documentation about IPv6 bearer methods
Even if the IPv6 bearer method is DHCP, the client should use SLAAC
(eg, IPv6 Router Solicitations, Router Adverisements, and possibly
DHCPv6) to determine the correct prefix and DNS information.  In
some cases, even with the DHCP method, and IPv6 "address" will be
given which should be assigned to the data port before beginning
an IP addressing as the mobile network may expect this address
to be used.
2014-06-13 11:30:49 -05:00
Dan Williams
6e5d013eb1 broadband-bearer-sierra: use Icera authentication for Icera devices
Devices with Icera chipsets (USB305) don't support the Qualcomm
proprietary $QCPDPP command, and we must use the Icera command
instead.  Otherwise authenticated bearer creation will fail.
2014-06-13 11:30:49 -05:00
Dan Williams
a416d8056c broadband-bearer-icera: add IPv6 support
Split out the %IPDPADDR parsing into a helper and add testcases for it,
and add support for IPv6 handling.  If the returned IPv6 is link-local,
the address should be assigned to the interface and SLAAC performed to
retrieve the actual IPv6 prefix and RDNSS/DNSSD information.
2014-06-13 11:30:49 -05:00
Dan Williams
e68d51f439 broadband-bearer: also return IPv6 config if IPv6 context is used
If the subclass doesn't override IP config retrieval, and IPv6 was
used when connecting the bearer, return IPv6 config too.
2014-06-13 11:30:49 -05:00
Dan Williams
e9395d83e3 broadband-bearer: pass the IP family to subclasses when getting IP config
Subclasses may need to know which IP families were used for the setup
so they can return the correct IP configuration.  We can't just use
the MMBearer default_ip_family becuase that isn't the family that
was actually used during the connection.
2014-06-13 11:30:49 -05:00
Dan Williams
502a5dbaf5 broadband-bearer-sierra: use correct modem type when creating bearer
MMBroadbandModemSierraIcera is not a subclass of
MMBroadbandModemSierra, so we cannot cast it to that type when
passing it to bearer creation.  Luckily the bearer doesn't
care, so just downgrade the type to MMBroadbandModem.
2014-06-13 11:30:49 -05:00
Dan Williams
1e30bad174 libmm-glib: always return all bearer properties
IPv6 may have addresses and other information even if the bearer's
method is DHCP.
2014-06-13 11:30:48 -05:00
Aleksander Morgado
ff4e45791d build: use the correct pkg-config in checks 2014-06-13 16:54:06 +02:00
Aleksander Morgado
6313f5707e build: look for gdbus-codegen through pkg-config 2014-06-11 17:14:18 +02:00
Aleksander Morgado
8ca6c6cbad build: glib-genmarshal no longer needed 2014-06-11 17:12:52 +02:00
Ben Chan
235fb874c9 modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError
Commit b1ae81a in libmim ("libmbim-glib: add additional GMM cause codes
to MbimNwError") added additional GMM cause codes to MbimNwError. This
patch maps some of those MbimNwError to MMMobileEquipmentError.

This patch requires libmbim >= 1.9.0
2014-06-10 10:18:28 +02:00
Thieu Le
0b975f2266 altair-lte: update PCO to handle latest VZW deployment
Update PCO handling code such that it conforms to the latest VZW network
behavior. This includes updating the way we mark a SIM as provisioned.
In the old network, only provisioned SIMs can attach to the network.
Now, unprovisioned SIMs can attach and connect to the network.

Change-Id: Ie454f6fb6d8764161f167e93a4235bb93fbde59a
2014-06-09 16:55:12 +02:00
Ben Chan
af810a0a87 bearer-mbim: pass the right GError pointer to response parsers 2014-06-09 12:28:19 +02:00
Dan Williams
aedcb376a8 iface-modem: make "signal quality updated" log message debug not info
Otherwise your logs fill up if the signal quality changes, which is
pretty frequently for many devices.
2014-06-04 14:11:16 -05:00
Yegor Yefremov
dcb627a61f trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-06-04 14:11:16 -05:00
Thieu Le
a038ff172b altair-lte: handle optional quotes around sim refresh
Some firmware version sends quotes around SIMREFRESH, this patch adds support
for those versions.
2014-06-03 10:52:13 +02:00
Ben Chan
8680e066b5 cinterion: fix memory leaks in tests 2014-06-03 10:52:01 +02:00
Ben Chan
7c389511d8 tests: fix more memory leaks 2014-06-03 10:51:51 +02:00