Commit Graph
100 Commits
Author SHA1 Message Date
Aleksander Morgado dbb05afba8 examples: avoid warning in modem-watcher-python example
PyGIWarning: ModemManager was imported without specifying a version first. Use gi.require_version('ModemManager', '1.0') before import to ensure that the right version gets loaded.
2016-07-25 13:17:48 +02:00
Aleksander Morgado 24fd3ef5fb examples: add SMS sender in python 2016-07-25 12:51:45 +02:00
Aleksander Morgado f137268ce1 iface-modem: fix checking for single capabilities
The mm_iface_modem_is_*_only() checks were validating that all the other
capabilities except for the ones being queried were unset, but the check wasn't
explicitly checking that the actual capabilities being queried were set.

This was making the check fail when capabilities == MM_MODEM_CAPABILITY_NONE.

Reported-by: Matthew Stanger <stangerm2@gmail.com>
2016-07-20 08:02:49 +02:00
Aleksander Morgado ddbc219568 bearer-qmi: decide IP method during connection attempt
Deciding the IP method to use based on the underlying QMI port LLP should not be
done when the bearer object is created, because the QMI port in use may not
actually be open or have been opened at that time. During the connection attempt
we do make sure the QMI port is open, so we should check the LLP to use just
after that step.
2016-07-15 19:31:45 +02:00
Aleksander Morgado 46b17908ce broadband-modem-qmi: fix dhcp/static IP setting when kernel data format updated
When the logic decided that we had to update the kernel data format to match the
one configured in the WWAN network interface, we were not flagging the port LLP
with the correct value, what resulted in NetworkManager trying to use dhclient
on the raw-ip interface:

    dhclient[3257]: Unsupported device type 65534 for "wwan1"
    dhclient[3257]:
    dhclient[3257]: If you think you have received this message due to a bug rather
    dhclient[3257]: than a configuration issue please read the section on submitting
    dhclient[3257]: bugs on either our web page at www.isc.org or in the README file
    dhclient[3257]: before submitting a bug.  These pages explain the proper
    dhclient[3257]: process and the information we find helpful for debugging..
    dhclient[3257]:
    dhclient[3257]: exiting.

Fix the internal LLP flag, so that Static IP addressing is requested for all raw-ip
based interfaces.
2016-07-14 14:59:28 +02:00
Aleksander Morgado d757c32b94 release: bump version to 1.5.993 (1.6-rc4) 2016-07-07 20:22:31 +02:00
Aleksander Morgado b09b7dfc2d NEWS: update for 1.6-rc4 2016-07-07 20:22:00 +02:00
Aleksander Morgado f5cd7476f4 broadband-modem-mbim: try to use FCC Auth through QMI-over-MBIM if power up fails 2016-07-07 19:51:28 +02:00
Aleksander Morgado a5baec65be simtech: support QMI devices 2016-05-31 11:22:13 +02:00
Aleksander Morgado ccc148fe9b libmm-glib,common-helpers: fix reading boolean from string
The "0" case wasn't being handled properly:
  $ sudo mmcli -m 0 --create-bearer="apn=,allow-roaming=0"
  Error parsing properties string: 'Cannot get boolean from string '0''
2016-04-19 14:02:13 +02:00
Aleksander Morgado 59f57befa4 release: bump version to 1.5.992 (1.6-rc3) 2016-04-18 08:11:45 +02:00
Aleksander Morgado 5286eaca51 NEWS: include QMI network disconnections 2016-04-18 08:11:00 +02:00
Aleksander Morgado 650f4a2e91 huawei: fix reading IPv4 address in BE systems
Tested by: <than@redhat.com>

https://bugs.freedesktop.org/show_bug.cgi?id=94777
2016-04-13 11:39:24 +02:00
Aleksander Morgado 62805a11f1 port-probe: fix missing task disposals 2016-04-13 09:45:02 +02:00
Aleksander Morgado 276e28fe81 port-probe: make sure stored task pointer is set to NULL before completing
When we were completing tasks in idle, the logic was like this:

 * Schedule task completion in idle
 * self->priv->task = NULL
 * (idle) Task completion callback called

This meant that the self->priv->task was always set to NULL before the
completion callback was called, which is what we wanted as a new task may be
scheduled in the callback itself.

Now, without completing in idle, we were wrongly doing:

 * Task completion callback called
 * self->priv->task = NULL

This commit fixes the logic by making sure self->priv->task = NULL before any
task completion.
2016-04-08 16:38:00 +02:00
Aleksander Morgado 1f13909d9b build: make '--with-suspend-resume' auto by default
If systemd is found, enable suspend resume support.
2016-04-03 21:54:19 +02:00
Aleksander Morgado ae2988da93 build: use 'no' to disable suspend/resume support, instead of 'none' 2016-04-03 21:33:56 +02:00
Aleksander Morgado 0e5fdadcd3 build: use 'no' to disable polkit, instead of 'none' 2016-04-03 21:33:50 +02:00
Aleksander Morgado 55408e8b94 device: port probe may be in the ignored list 2016-03-27 21:53:03 +02:00
Aleksander Morgado f156ec06fb context: use G_OPTION_ARG_FILENAME when a file path is expected 2016-03-27 21:39:11 +02:00
Aleksander Morgado 0f9377686d context: fix --help output
The options that require an argument should explicitly specify so.

Before:
  --log-level=INFO             Log level: one of [ERR, WARN, INFO, DEBUG]
  --log-file                   Path to log file

After:
  --log-level=[LEVEL]          Log level: one of ERR, WARN, INFO, DEBUG
  --log-file=[PATH]            Path to log file
2016-03-27 21:35:55 +02:00
Aleksander Morgado 6ba37aa041 base-modem: remove unused 'mm_base_modem_get_port()' method 2016-03-27 18:52:39 +02:00
Aleksander Morgado 1583452554 base-modem: remove unused 'mm_base_modem_owns_port()' method 2016-03-27 18:52:35 +02:00
Aleksander Morgado 547b9b9d87 base-modem: remove unused 'mm_base_modem_release_port()' method 2016-03-27 18:51:45 +02:00
Aleksander Morgado d6cee7782b release: bump version to 1.5.991 (1.6-rc2) 2016-03-25 11:15:14 +01:00
Aleksander Morgado 2c1230ba7b po: sleep monitor source file was renamed
Reported by: Michael Biebl <biebl@debian.org>
2016-03-23 22:50:34 +01:00
Aleksander Morgado a0e8505156 build: rename sleep monitor source file, only one implementation available 2016-03-21 23:48:46 +01:00
Aleksander Morgado 6512fde74d build: fix missing MMCLI_LIBS variable 2016-03-21 11:14:25 +01:00
Aleksander Morgado 021e57a283 build: run configure script from builddir rather than srcdir
Based on an equivalent patch from Philip Withnall <philip@tecnocode.co.uk>
for libmbim; see:

    https://bugs.freedesktop.org/show_bug.cgi?id=94639
2016-03-21 10:45:25 +01:00
Aleksander Morgado 07f899a9d3 release: bump version to 1.5.900 (1.6-rc1)
Also bump soname of libmm-glib, as the interface has grown since the last tag.
2016-03-18 12:56:08 +01:00
Aleksander Morgado 0c2f98d2a7 NEWS: update for 1.6.0 2016-03-18 12:49:39 +01:00
Aleksander Morgado c6dda5e502 build: require libmbim 1.12 and libqmi 1.14
Preparing for the new ModemManager stable release, we now require the latest
stable series of both libmbim and libqmi.
2016-03-18 11:36:52 +01:00
Aleksander Morgado d7a643b16a libmm-glib,modem-voice: fix unknown methods in documentation
html/MMCallProperties.html:141: warning: no link for: 'mm-modem-voice-create' -> (<code class="function">mm_modem_voice_create()</code>).
    html/MMCallProperties.html:141: warning: no link for: 'mm-modem-voice-create-sync' -> (<code class="function">mm_modem_voice_create_sync()</code>).
    html/MMModemVoice.html:379: warning: no link for: 'mm-modem-voice-delete-finish' -> (<code class="function">mm_modem_voice_delete_finish()</code>).
    html/MMModemVoice.html:380: warning: no link for: 'mm-modem-voice-delete-sync' -> (<code class="function">mm_modem_voice_delete_sync()</code>).
2016-03-16 18:26:33 +01:00
Aleksander Morgado 4055488fd0 libmm-glib,modem-location: fix unknown method in documentation
html/MMModemLocation.html:516: warning: no link for: 'mm-modem-dup-supl-server' -> (<code class="function">mm_modem_dup_supl_server()</code>).
2016-03-16 18:13:18 +01:00
Aleksander Morgado 93bf189fa2 build,libmm-glib: built headers shouldn't be included in dist 2016-03-15 19:15:25 +01:00
Aleksander Morgado eeb9e2bdcc build: end all multiline list variables with $(NULL)
So that appending a new item in the list only inserts one new line (i.e. the
last $(NULL) is the last item always).
2016-03-15 19:15:25 +01:00
Aleksander Morgado f9c63bfa05 build,plugins: update build rules
We try to combine in common envvars the compiler and linker flags shared by the
different components, and where possible, also re-using the implicit AM_CFLAGS
and AM_LDFLAGS variables that automake provides, and which apply to all objects
being built in the same Makefile.am.

The plugins build rules are also updated so that whenever a plugin has some
testable 'helpers', these are compiled into a noinst library and then the new
library included by both the plugin and the tester program. This avoids multiple
recompilations of the same sources for different objects.
2016-03-15 19:15:25 +01:00
Aleksander Morgado 3b8361eb06 build,core: update build rules
We try to combine in common envvars the compiler and linker flags shared by the
different components, and where possible, also re-using the implicit AM_CFLAGS
and AM_LDFLAGS variables that automake provides, and which apply to all objects
being built in the same Makefile.am.

The internal libmodem-helpers.la library is also renamed to libhelpers.la
2016-03-15 19:15:25 +01:00
Aleksander Morgado 3bac0a17f5 build,libmm-glib: fix gdbus-codegen rules
The rule with multiple targets means that for each of the target the command
specified is run; not that a single run of the command generates all the targets
specified.

So, generate the .c file with the command, and make the .h and the .xml files
a side-effect of the .c generation.
2016-03-15 19:15:25 +01:00
Aleksander Morgado 8ac075d768 build: ignore thuraya helpers test 2016-03-13 18:01:16 +01:00
Aleksander Morgado e00fd54a20 build: bump required gettext version to 0.19.3
Otherwise:
    configure.ac:86: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
    configure.ac:86: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
    configure.ac:86: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
2016-03-13 17:39:20 +01:00
Aleksander Morgado 91d343520f huawei: ignore ^LTERSRP unsolicited message
Based on a previous patch from Dan Williams <dcbw@redhat.com>
2016-03-13 13:21:05 +01:00
Aleksander Morgado 1939c5ace5 port-probe: simplify task completion
We no longer need to complete in idle, because the limitation imposed by the
serial port methods no longer exists.
2016-03-11 15:03:07 +01:00
Aleksander Morgado d9596587e2 port-serial: allow completions not in idle
Port serial command completions may be performed in several different places:
  * When a cached response is set during command sending.
  * When errors happen during command sending.
  * When we process a response (i.e. common_input_available())
  * When we process a timeout (i.e. port_serial_timed_out())
  * When cancelled (i.e. port_serial_response_wait_cancelled())

We're currently safe with the previous logic only because the users of the
serial port explicitly complete operations in idle, which means that whenever
we're processing in a internal callback (e.g. during response or timeout
processing) the serial port object is valid for as long as the callback runs.

But, if we ever end up using the serial port with a not-in-idle completion,
it may happen that if the command is completed within a internal signal callback
the serial port object may get fully closed and unref-ed before exiting the
callback.

We could force a valid port reference to exist as long as the internal signal
is scheduled, but then we may lose the ability to automatically close the port
during a full unref(), as the internal signals are set as long as the port is
open.

So, to cope with this possibility of not-in-idle completion, we instead force
references to be valid whenever we see that a command completion may happen,
which is basically whenever port_serial_got_response() is called; but we only
do that if we're going to use the port object after that, otherwise, we ignore
the problem.

In addition to the problems with the references, we also update the
common_input_available() method so that the source isn't kept if the last
response buffer processing ended up closing the port.
2016-03-11 15:03:03 +01:00
Aleksander Morgado 93056fe3f2 plugin-manager: allow early cancel of port tasks when they haven't been run yet 2016-03-09 23:59:46 +01:00
Aleksander Morgado c605b0bc46 port-probe: allow cancellation 2016-03-09 23:59:46 +01:00
Aleksander Morgado d3bf07e7a8 plugin: allow cancellation of the port probe operation 2016-03-09 23:59:46 +01:00
Aleksander Morgado fd4fdbf21b plugin-manager: refactor device/port support checks and allow cancellations 2016-03-09 23:59:46 +01:00
Aleksander Morgado be9b5e0141 plugin-manager: improve logging when loading plugins 2016-03-09 23:59:46 +01:00
Aleksander Morgado 7c2d5b1aa3 helpers: fix check for pid when creating device identifier
https://bugs.freedesktop.org/show_bug.cgi?id=94364
2016-03-02 17:09:33 +01:00
Aleksander Morgado 7652486433 build: ignore telit unit test 2016-02-20 16:26:19 +01:00
Aleksander Morgado a08708c10d huawei: avoid trying to disable parent voice unsolicited events
Which actually segfaults, as MMBroadbandModem doesn't implement the
disable_unsolicited_events() method in the voice interface.
2016-02-15 13:38:54 +01:00
Aleksander Morgado 5d8b26eeeb huawei: ignore ^ECCLIST unsolicited messages
These messages list the emergency numbers reported by the network, we don't use
them yet.

E.g.:

  ^ECCLIST: 112,911\r\n
2016-02-15 13:25:42 +01:00
Aleksander Morgado cffba7e0ee modem-helpers: regex creation should never fail
We should really consider errors if we expect that the regex string may not
compile; but in this case the pattern is fixed, so should never happen.
2016-02-13 14:33:12 +01:00
Aleksander Morgado 18c8dd60a7 qmi: just one InvalidCommand error is enough to avoid all DMS UIM commands
The MMBroadbandModemQmi will not create a MMSimQmi until the unlock status has
been checked, and therefore this means that when the SIM object is being created
we already know whether the modem supports DMS UIM commands or not, so avoid
further fallbacks in the SIM object.
2016-02-11 10:52:09 +01:00
Aleksander Morgado 9cbd0c61b0 sim-qmi: implement SIM verify/unblock/change/enable with UIM service
Newer modems like the MC7455 don't implement the "DMS UIM" commands in the
DMS service, and therefore these modems need to use the UIM service directly.

We include a new flag to detect whether any of the DMS UIM commands is flagged
as invalid, and if so, we'll fallback to the UIM specific implementations for
all.

libqmi version bump to 1.13.7, which includes the new required methods.
2016-02-11 10:51:53 +01:00
Aleksander Morgado 7ded4f3c3b broadband-modem-qmi: implement unlock retries loading with UIM service
Newer modems like the MC7455 don't implement the "DMS UIM" commands in the
DMS service, and therefore these modems need to use the UIM service directly.
2016-02-11 10:51:43 +01:00
Aleksander Morgado aeb6362172 sim-qmi: port to GTask 2016-01-30 18:38:05 -08:00
Aleksander Morgado b23dace6dd broadband-modem-qmi: plug memleak when listing SMS messages 2016-01-30 16:29:29 -08:00
Aleksander Morgado 8c905383b7 broadband-modem-qmi: locked states also indicate readiness of the SIM card
When the card application is flagged as needing PIN or PUK, then the card can be
considered as being ready.
2016-01-30 16:29:29 -08:00
Aleksander Morgado 3911ea5a0f telit: minor coding style fixes 2016-01-25 13:58:57 +01:00
Aleksander Morgado 83868c61b1 broadband-modem-qmi: use "UIM Get Card Status" if "DMS UIM" command unavailable
The newer modules like the MC7455 which support multiple SIM cards won't
implement the legacy "DMS UIM" commands.
2016-01-24 17:23:46 +01:00
Aleksander Morgado cf66d1bcbf bearer-qmi: use static IP if LLP is raw-ip
When using raw-ip we'll default to request static IP setup for now, so that we
don't rely on the DHCP client supporting raw-ip interfaces.
2016-01-24 17:23:46 +01:00
Aleksander Morgado f8ba106a20 port-qmi: support new Qualcomm chipsets working always in raw-ip
The port opening logic is changed completely.

Before this change, the logic would only try 802.3 setting via CTL when the
QmiDevice was being open.

With this new change, instead, we'll use WDA and the new libqmi APIs to query
the link layer protocol expected by both the device and the kernel. If the LLP
matches in both, we assume we're done; if they differ we'll try to update the
LLP expected by the kernel to the one setup in WDA. This change will allow us
to run with the modem using raw-ip if that is what WDA reports by default.

Also bumped the libqmi version to 1.13.6, which has support for the new required
APIs.
2016-01-24 17:23:18 +01:00
Aleksander Morgado 1bdb1a558a build: require GLib 2.36
We now need it for GTask support.
2016-01-24 15:26:12 +01:00
Aleksander Morgado 97962bb65c port-serial: rework response parsing
Response parsing was being done in different places for AT and QCDM subclasses;
in the case of AT it was being done early, before returning the byte array in
the mm_serial_port_command_finish() response. In the case of QCDM, it was being
done after mm_serial_port_command_finish(), and that was forcing every caller to
cleanup the response buffer once the response was processed.

With the new logic in this patch, the response is always parsed (i.e. looked for
a valid response or an error detected) before mm_serial_port_command_finish()
returns, and actually this method now returns a totally different GByteArray,
not the internal response buffer GByteArray, so there's no longer any need for
the caller to explicitly clean it up. The one doing the cleanup is the parser
method itself in every case.

This change also allows us to return serial port responses in idle, but that's
not changed for now as there's no immediate need.
2016-01-23 11:19:19 +01:00
Aleksander Morgado ede17bd41c port-serial: remove response buffer when an error is returned
When valid responses were returned to the caller of the serial command, the
caller itself was responsible for removing from the GByteArray the data that
it was successfully processed (all the data in AT, just 1 message in QCDM). But,
the same logic was missing for the case of errors; we were not explicitly
removing the response and therefore in some cases we would see it propagated
into the next command response. It was common to see this issue when the echo
removal was disabled in the serial port, as in Option/HSO modems:

    <debug> (ttyHS3): --> 'AT+CNUM<CR>'
    <debug> (ttyHS3): <-- '<CR><LF>+CME ERROR: 14<CR><LF>'
    <debug> Got failure code 14: SIM busy
    <debug> (ttyHS3) device open count is 1 (close)
    <warn>  couldn't load list of Own Numbers: 'Failed to parse NV MDN command result: -17'
    <debug> (ttyHS3) device open count is 2 (open)
    <debug> (ttyHS3): --> 'AT_OPSYS?<CR>'
    <debug> (ttyHS3): <-- '<CR><LF>_OPSYS: 1,2<CR><LF><CR><LF>OK<CR><LF>'
    <warn>  couldn't load current allowed/preferred modes: 'Couldn't parse OPSYS response: '+CME ERROR: 14
    _OPSYS: 1,2''
2016-01-23 11:05:42 +01:00
Aleksander Morgado 3b97d7e3d7 broadband-modem: plug memleaks when processing QCDM responses 2016-01-17 15:34:17 +01:00
Aleksander Morgado 884d7bee1b broadband-modem,time: make sure that error is set when operation fails 2016-01-16 17:59:49 +01:00
Aleksander Morgado 6d45976942 tests,generic: rename basic DBus test 2016-01-16 17:59:49 +01:00
Aleksander Morgado 7136c0b321 tests,port-context: explicitly close the socket that is added to the listener
Since GLib 2.42, the sockets that are added to socket listeners may no longer
be closed automatically when the listener is finalized. In order to avoid that,
we will keep our own socket reference and close/unref it ourselves.

This issue was preventing adding new test cases with the same port names.

    $ ./test-service-generic --verbose
    GTest: random seed: R02S889153ee0f2e59c570f4edff9caa4176
    GTest: run: /MM/Service/Generic/enable-disable
    Activating service name='org.freedesktop.ModemManager1'
    Successfully activated service 'org.freedesktop.ModemManager1'
    (MSG: DEBUG: client connection closed)
    (MSG: MESSAGE: Found modem at '/org/freedesktop/ModemManager1/Modem/0')
    ** Message: Found modem at '/org/freedesktop/ModemManager1/Modem/0'
    (MSG: DEBUG: client connection closed)
    GTest: result: OK
    GTest: run: /MM/Service/Generic/cme-error-detected
    Activating service name='org.freedesktop.ModemManager1'
    Successfully activated service 'org.freedesktop.ModemManager1'
    (MSG: FATAL-ERROR: Cannot bind socket: Error binding to address: Address already in use)

    ** (/home/aleksander/Development/foss/ModemManager/plugins/.libs/lt-test-service-generic:32043): ERROR **: Cannot bind socket: Error binding to address: Address already in use
2016-01-16 17:59:49 +01:00
Aleksander Morgado dfd111f291 tests,test-fixture: don't rely on other threads to update dbus properties
We were wrongly using a main loop in the port context thread to manage the
global main context. That was silently making the DBus property notifications
kind of work, as they were being updated via another thread, so here we could
just sleep() and recheck the property values.

Given that having that unrelated thread updating the dbus properties of our
MMManager object is not a good thing, we'll instead totally ignore that and
fully re-create the MMManager in each iteration with the sync() method, which
has its own internal thread.
2016-01-16 17:59:49 +01:00
Aleksander Morgado 87bafa33dc tests,port-context: properly setup per-thread main context
Instead of creating a new main context to be used in the thread, we were using
the global context. So, fix that, and create a totally new pair of main context
and main loop to be used within the thread.
2016-01-16 17:59:49 +01:00
Aleksander Morgado 6a60090d68 broadband-modem,voice: fix regex leak 2016-01-12 16:37:28 +01:00
Aleksander Morgado 0ebf6d5da5 mbm: query supported modes to the modem with +CFUN=?
We were trying to load the generic modes supported reported by either *CNTI=2 or
AT+WS46=?, so that then we could filter out the MBM-specific modes unsupported.

But, this may not be ideal, as both these two commands may fail:

    [mm-broadband-modem.c:1612] modem_load_supported_modes(): loading supported modes...
    [mm-port-serial.c:1237] mm_port_serial_open(): (ttyACM1) device open count is 3 (open)
    [mm-port-serial.c:1294] _close_internal(): (ttyACM1) device open count is 2 (close)
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'AT*CNTI=2<CR>'
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
    [mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
    [mm-broadband-modem.c:1546] supported_modes_cnti_ready(): Generic query of supported 3GPP networks with *CNTI failed: 'Unknown error'
    [mm-port-serial.c:1237] mm_port_serial_open(): (ttyACM1) device open count is 3 (open)
    [mm-port-serial.c:1294] _close_internal(): (ttyACM1) device open count is 2 (close)
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'AT+WS46=?<CR>'
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
    [mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
    [mm-broadband-modem.c:1494] supported_modes_ws46_test_ready(): Generic query of supported 3GPP networks with WS46=? failed: 'Unknown error'
    [mm-iface-modem.c:3974] load_supported_modes_ready(): couldn't load Supported Modes: 'Couldn't retrieve supported modes'

Instead, we'll ask the modem for the list of modes supported, and return that
directly.
2016-01-10 17:46:12 +01:00
Aleksander Morgado 138b3dabc2 cli: validate SUPL server before showing it 2015-12-19 14:09:03 +01:00
Aleksander Morgado 9123c7bd93 cli: allow enabling/disabling location signaling via DBus
Not making them '--location-enable|disable-signal' because that's the pattern
used to enable/disable location sources. Instead, use the '--location-set-*'
pattern, as that is what we're already using for the other location setup
update.
2015-12-19 14:07:45 +01:00
Aleksander Morgado 6c35878f12 location: support updating the GPS refresh time
The default setup uses a refresh time of 30s, which means that even if the GPS
location updates are received at a higher frequency, the DBus interface will
still expose at most one update every 30s.

This patch includes a new "SetGpsRefreshTime()" method in the Location
interface, which takes a single 'u' parameter, specifying the refresh rate to
use, in seconds. This method also allows 0 being passed, which will make the
implementation to publish the GPS location updates are soon as ModemManager
detects them.

Along with the new method, a "GpsRefreshTime" read-only property is exposed
to specify the refresh time in effect.

The new method and property will only be applicable if the device has GPS
capabilities.

https://bugs.freedesktop.org/show_bug.cgi?id=89924
2015-12-19 12:22:30 +01:00
Aleksander Morgado aae96778c5 build: don't redefine test_modem_helpers_telit_LDADD 2015-12-19 11:56:07 +01:00
Aleksander Morgado 0a88ae2d6d telit: use explicit FIRST step name 2015-12-19 11:51:11 +01:00
Aleksander Morgado 46f601edf6 telit: don't talk to the user in a GError 2015-12-19 11:50:22 +01:00
Aleksander Morgado a74edab57f telit: prefix helper methods with 'mm_telit' 2015-12-19 11:45:32 +01:00
Aleksander Morgado 740e1b5461 telit: fix minor coding style issues 2015-12-19 11:44:00 +01:00
Aleksander Morgado ae04c4179f bearer-mbim: implement stats loading 2015-12-07 14:20:54 +01:00
Aleksander Morgado cb59c6d93e bearer-qmi: implement stats loading
Use the "WDS Get Packet Statistics" method to query for the ongoing number
of bytes transmitted or received. The QMI implementation uses different WDS
clients for IPv4 and IPv6; the stats reported are a combination of the values
retrieved from both WDS clients.
2015-12-07 14:20:54 +01:00
Aleksander Morgado 3bf118d01a base-bearer: setup periodic stats loading
If the bearer implementation supports it, load stats periodically. By default
every 30s for now.
2015-12-07 14:20:54 +01:00
Aleksander Morgado 810e52c6db cli: print stats if bearer reports them 2015-12-07 14:20:54 +01:00
Aleksander Morgado 730123598a libmm-glib: retrieve stats from the bearer
The MMBearer object is updated to provide getter methods to retrieve the new
MMBearerStats object.
2015-12-07 14:20:54 +01:00
Aleksander Morgado 27c6f15873 libmm-glib: new helper object to handle bearer stats
The new MMBearerStats object provides a simple API to interact with the new
dictionary containing the bearer connection stats.
2015-12-07 14:20:54 +01:00
Aleksander Morgado 03ead02686 introspection: new 'Stats' property in the bearer object
The new property is a dictionary which may include different parameters,
depending on what is actually supported by the underlying modem. For now,
just bytes RX/TX.

Note that this object will expose the stats *as reported by the modem*. These
values may differ from e.g. what is seen in the network interface stats.
2015-12-07 14:20:54 +01:00
Aleksander Morgado ee85a463cf license: mmcli is GPLv2+, not GPLv3+
mmcli is GPLv2+; that's what --version has always said and that's what the
README in ModemManager sources specifies:
  License.
  The ModemManager and mmcli binaries are both GPLv2+.
  The libmm-glib library is LGPLv2+.
2015-12-07 13:16:24 +01:00
Aleksander Morgado 4c036eb8f9 iface-modem: explicitly disconnect bearer before removing it
https://bugs.freedesktop.org/show_bug.cgi?id=90408
2015-12-03 12:01:14 +01:00
Aleksander Morgado ea3cb005b8 bearer-list: rename bearer find method to specify properties are compared 2015-12-03 12:00:22 +01:00
Aleksander Morgado 75c2347990 bearer-list: no need for the method to remove all bearers 2015-12-03 11:43:21 +01:00
Aleksander Morgado 508a37a891 modem-helpers: fix parsing CPMS=? responses without groups
The CPMS test parser was expecting 3 groups (parenthesis enclosed lists) of
memory IDs, e.g.:

   +CPMS: ("SM","ME"),("SM","ME"),("SM","ME")

But some modems like the Huawei MU609 may just report single elements, not
groups, e.g.:

   +CPMS: "SM","SM","SM"

This patch avoids using g_strsplit() to split the groups, as that is unaware
of the possible replies without groups. Instead, a new helper method is
implemented which does the group/item split itself, considering also the
possibility of a reply with mixed groups and non-groups, like e.g.:

   +CPMS: ("SM","ME"),"SM","SM"

Additionally, we also now support the case where the groups are empty, e.g.:

   +CPMS: (),(),()

https://bugs.freedesktop.org/show_bug.cgi?id=92243
2015-12-02 22:34:37 +01:00
Aleksander Morgado ffde429843 core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncs 2015-12-02 17:07:39 +01:00
Aleksander Morgado 30cbf7202c build: on configure errors, show the specific libqmi or libmbim version required 2015-10-25 15:48:42 +01:00
Aleksander Morgado 35ab3dedd6 sim-qmi: try to gather from the optional TLV whether MNC is 2 or 3 digits
We bump libqmi requiremetn to 1.13.5, which is the one with support for the new TLV.
2015-10-25 15:48:42 +01:00
Aleksander Morgado 77b6b02fd3 sim-qmi: fix building MCCMNC string
For now, use 2 digits for MNC if < 100 and 3 digits otherwise.
2015-10-25 15:15:33 +01:00
Aleksander Morgado a89dadcbc6 bearer-qmi: don't add auth settings if no user/pass/auth given
Auth settings will be added in a QMI message only if at least one of these is
requested:
 * An explicit auth preference is requested.
 * User string is given and isn't empty.
 * Password string is given and isn't empty.
2015-10-21 17:24:24 +02:00