Commit Graph

1157 Commits

Author SHA1 Message Date
Aleksander Morgado
4a0a10c795 haier: new Haier plugin to handle port type hints in the CE81B
https://bugzilla.gnome.org/show_bug.cgi?id=685011
https://bugs.freedesktop.org/show_bug.cgi?id=85001
2015-01-15 10:28:46 +01:00
Jakub Sitnicki
7552030ef9 build: add code coverage support
Build all targets, except for CLI tools (mmcli, uml290), with special
flags needed for collecting code coverage information when the build has
been configured with --enable-code-coverage.

Three new targets are available in the top build directory:

 - `check-code-coverage' runs the test suite and generates a code
   coverage report,

 - `code-coverage-capture' generates a code coverage report from already
   collected data, which can come in handy when one wants to see code
   paths touched by a particular test,

 - `code-coverage-clean' removes the collected coverage data and the
   generated reports.
2015-01-11 19:32:43 +01:00
Roshan Pius
470b02e8c8 port-probe: Increase AT probe command timeout to 7 seconds for altair.
This patch increases the response timeout for the probe AT commands for
altair modems.

We've been noticing some altair modems taking upto 6 seconds to respond to the
initial probe command after a reset which results in modem-manager
timing out and sending a second probe command. The modem sends a response
after about 6 seconds for the initial probe command which modem-manager
treats as response to second probe command and this results in the
modem-manager and modem going out of sync because the modem's second
probe response is treated as response to the next initialization AT command
sent by modem-manager and so on.

Change-Id: Iad8b0786327b153fd95c8ee4516f352325a42cf7
2015-01-09 21:26:01 +01:00
Aleksander Morgado
fd28a4d5cd icera: IPv6 '::' is a placeholder for 'no IPv6', so don't error out if found
Also, allow IPDPADDR returns where only DNS IPv6 is given (i.e. no IPv6 address
to set), and in that case default to DHCP method in the bearer.

https://bugs.freedesktop.org/show_bug.cgi?id=85012
2014-12-03 19:02:00 +01:00
Aleksander Morgado
71a1b64b3b huawei: expect 'modem' and 'pcui' in ^GETPORTMODE responses
Newer huawei modems, like the E3372, use the following ^GETPORTMODE response
format:
  ^GETPORTMODE: TYPE: WCDMA: ,pcui:1,modem:2,ncm:3,mass:4,mass_two:5,

This patch updates the parser that looks for the control TTY (pcui) and data TTY
(modem).

https://bugs.freedesktop.org/show_bug.cgi?id=86658
2014-12-03 19:02:00 +01:00
Aleksander Morgado
692e6d344a tests,port-context: joining thread takes the reference already 2014-11-14 12:13:10 +01:00
Aleksander Morgado
a72b120798 tests,fixture: fix comment 2014-10-17 15:55:12 +02:00
Ben Chan
1e5ec7e1b1 tests: increase timeout for starting ModemManager on test bus
The timeout for starting ModemManager on the test bus was 3s, which is
sufficient under normal conditions. However, when running ModemManager
tests on a build infrastructure under a heavy load, we've observed that
the timeout isn't always sufficient and that becomes the source of false
test failures. This patch increases the timeout to 30s, which shouldn't
introduce any unexpected behavior under normnal conditions while
addressing the timeout issue on heavily loaded systems.
2014-10-05 15:37:47 -05:00
Aleksander Morgado
50ec0907de zte: blacklist QMI and net interface in the MF60
The MF60 exposes a QMI+net pair, but they are unusable as the WDS service
returns error when e.g. launching a connection.

So, fallback to AT+PPP in this device.
2014-09-05 10:06:03 +02:00
Ben Chan
4669611412 broadband-modem,plugins: fix GMatchInfo leaks 2014-08-12 09:45:50 +02:00
Aleksander Morgado
da933468c8 huawei: minor style fixes 2014-08-11 18:31:47 +02:00
David McCullough
bd0ffd24f1 huawei: improve support for network time on Huawei modules
Third revision of Huawei nwtime support.  Takes on feedback from the
mailing list including helpers,  some basic tests and use of the ^NTCT
command to determine network time support (^NWTIME).  Expanded test cases,
more use of g_assert and more logical helper return values/errors.

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-08-11 18:31:46 +02:00
Aleksander Morgado
5358d6fea0 sim: rename 'MMSim' to 'MMBaseSim'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Aleksander Morgado
3ca267b01f bearer: rename 'MMBearer' to 'MMBaseBearer'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
David McCullough
07fd7faea5 huawei: enable GPS_UNMANAGED for Huawei modems
Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-04 19:51:56 +02:00
Aleksander Morgado
054c77224d option,hso: add missing GPS unamanged capability 2014-07-04 09:52:19 +02:00
Aleksander Morgado
b7cf21dc24 huawei: close GPS port once GPS has been disabled 2014-07-04 09:47:49 +02:00
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
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
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
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
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
Ben Chan
9e50209019 icera: fix 'sometimes-uninitialized' variable issues 2014-06-18 08:14:53 -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
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
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
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
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
Thieu Le
cdb334649d altair-lte: fix memory leak in PCO parsing code
This patch fixes memory leaks in PCO parsing code detected by LeakSanitizer.
2014-05-31 18:55:13 +02:00
Ben Chan
c8f62fb4de altair-lte: ignore invalid bands in %BANDCAP / %GETCFG="BAND" responses
Due to a firmware issue, the modem may reply an invalid band value, such
as 0, for the %BANDCAP or %GETCFG="BAND" command. This patch moves
parse_bands_response() to mm-modem-helpers-altair-lte.c, modifies the
function to ignore any invalid band outside the range of E-UTRAN
operating bands, and add unit tests for the function.
2014-05-29 10:06:37 +02:00
Thieu Le
08d8524b17 altair-lte: prevent connect while processing sim refresh
This patch modifies the Altair LTE plugin to fail connect requests while the
modem has detached from the network when processing sim refresh.
2014-05-28 16:01:56 -05:00
Ben Chan
551197b4e5 plugins: remove unnecessary MM_BASE_MODEM() casts 2014-05-21 11:59:49 +02:00
Ben Chan
3d378bef5d tests: consistently use spaces for indentation 2014-05-21 11:58:03 +02:00
Ben Chan
7c656cce47 mbm: minor coding style fixes 2014-05-20 09:31:42 +02:00
Ben Chan
bdab75d0b8 option,hso: minor coding style fixes 2014-05-20 09:31:31 +02:00
Ben Chan
f5d7213a3c icera: minor coding style fixes 2014-05-20 09:31:18 +02:00
Ben Chan
a0d15f23c9 huawei: minor coding style fixes 2014-05-19 12:47:28 +02:00
Aleksander Morgado
0126eb6311 sierra: PCSTATE=0 needs to be treated as low-power mode
OFF only applies to a real shutdown, where the modem no longer replies.
2014-05-05 20:30:45 +02:00