Commit Graph

3761 Commits

Author SHA1 Message Date
Aleksander Morgado
223db868a8 dbus: no need for systemd and nosystemd setups of the service file
We can just merge them.
2013-06-23 12:08:03 +02:00
Aleksander Morgado
ce6777c53b Revert "systemd: simplify unit file"
This reverts commit 91898aa8b0.

See additional comments in the following bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=701229

Basically, 'mask' and 'unmask' operations are not the ones we should be using
or suggesting; and the Alias= for the DBus file is the correct way to go.
2013-06-23 11:47:41 +02:00
Aleksander Morgado
b8825f79d5 build: remove '--with-tests' from the distcheck configure flags 2013-06-21 10:23:10 +02:00
Aleksander Morgado
3862ed6dfd build: add gtester.make to the dist tarball 2013-06-21 10:22:56 +02:00
Aleksander Morgado
6a01e51a5c tests: avoid printing in stdout by default
Tests had either their own g_print()s or they would enable a _mm_log() method to
get all g_debug()s from the libraries printed. In order to cleanup the result of
the tests run, avoid this stdout dumps by default, and only enable them if
explicitly enabled in CFLAGS, e.g.:

  $> ./configure CFLAGS="-DENABLE_TEST_MESSAGE_TRACES"
2013-06-18 17:15:03 +02:00
Aleksander Morgado
2a922f836d build: remove unneeded GLIB_CHECK_VERSION checks, 2.32 already required 2013-06-18 16:55:29 +02:00
Aleksander Morgado
a33e9671ea build: remove --with-tests option 2013-06-18 16:51:52 +02:00
Aleksander Morgado
2ad39277d2 build: setup gtester based tests 2013-06-18 16:50:47 +02:00
Aleksander Morgado
f3f499fcec test: remove testers of the old interface
Old python tests using the old ModemManager interface are removed, as mmcli
provides already a much nicer way to test the DBus interface.

Also, mm-test.py and the PPPD plugin get removed, which were also using the old
interface, and which were not very useful for testing newer non-PPP based
modems.

https://bugzilla.gnome.org/show_bug.cgi?id=702061
2013-06-18 16:30:26 +02:00
Aleksander Morgado
b582ba58e8 api,introspection: avoid exposing the Contacts interface
There is no implementation of the Contacts interface yet, just avoid exposing it
for now.

https://bugzilla.gnome.org/show_bug.cgi?id=701989
2013-06-18 16:19:19 +02:00
Aleksander Morgado
ce84ea510f bearer-mbim: make packet service attach operation optional
Some modems do require it, but some others won't (e.g. CDMA based ones), so
just make the operation optional, but only if the modem replies NoDeviceSupport.

https://bugzilla.gnome.org/show_bug.cgi?id=702419
2013-06-17 15:48:07 +02:00
Aleksander Morgado
e65f6ca2af bearer: MMBearerIpFamily is flags, not enum
Fixes the following warning...
    [mm-broadband-modem-mbim.c:1133] modem_create_bearer(): Creating MBIM bearer in MBIM modem
    GLib-GObject-CRITICAL **: g_param_spec_enum: assertion `G_TYPE_IS_ENUM (enum_type)' failed
    GLib-GObject-CRITICAL **: g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)' failed
2013-06-17 08:21:22 +02:00
Aleksander Morgado
fcede1a80a broadband-modem-qmi: fallback to AT if WMS service not available for messaging
It is quite common to have modems handled with QMI but with very limited
services implemented, e.g. without WMS:

    [/dev/cdc-wdm0] QMI Device supports 5 services:
    [/dev/cdc-wdm0]    ctl (1.3)
    [/dev/cdc-wdm0]    wds (1.5)
    [/dev/cdc-wdm0]    dms (1.2)
    [/dev/cdc-wdm0]    nas (1.0)
    [/dev/cdc-wdm0]    cat (0.0)

We'll now fallback to use plain AT commands when no QMI WMS service is found.
2013-06-15 17:19:54 +02:00
Aleksander Morgado
f4c488ea58 docs: reorder version symbols 2013-06-13 12:44:06 +02:00
Aleksander Morgado
0d4cf54cfe api,header: fix MM_MINOR_VERSION definition 2013-06-13 11:43:27 +02:00
Aleksander Morgado
56cce85153 build: use new mailing list as contact address 2013-06-13 11:35:57 +02:00
Aleksander Morgado
2139e394c2 build: setup libtool versioning for libmm-glib
We'll use it once we've released 0.8.
2013-06-13 11:11:02 +02:00
Aleksander Morgado
a43cecb456 api,header: setup and export MM version symbols in the API 2013-06-13 10:04:49 +02:00
Aleksander Morgado
0c7265de29 build: new strict & permissive polkit policies in '--with-polkit'
The '--with-polkit' configure switch now supports more options than just yes
or no:

 * strict: Active user needs to explicitly authenticate when peforming an
   operation defined in the Device.Control, Messaging, Location or Contacts
   interfaces. Polkit policy is set to 'auth_self_keep'.

 * permissive: Active user doesn't need to explicitly authenticate when
   peforming an operation defined in the Device.Control, Messaging, Location or
   Contacts interfaces. Polkit policy is set to 'yes'.

 * none: don't use polkit.

If '--with-polkit' is not given, usage will be automatically decided based on
the presence of the Polkit headers in the system (if headers found, strict
policy will be applied, otherwise none).

Also:
 * '--with-polkit' is equivalent to '--with-polkit=strict'
 * '--with-polkit=yes' is equivalent to '--with-polkit=strict'
 * '--with-polkit=no' is equivalent to '--with-polkit=none'
 * '--without-polkit' is equivalent to '--with-polkit=none'

By default, ModemManager will always apply the strict policy, in order to
protect the user from unwanted operations in the modem (e.g. getting the PIN
locked forever after wrong PIN/PUK unlock attempts).

https://bugzilla.gnome.org/show_bug.cgi?id=701740
2013-06-13 09:21:52 +02:00
Dan Williams
dc81556914 broadband-bearer-qmi: log both IPv4 and IPv6 settings for V4V6 connections
Old code only printed one or the other; but if we have dual-stack
connectivity, print everything we can read.
2013-06-12 09:16:16 -05:00
Aleksander Morgado
c2b2f0eb2b docs,api: new migration reference 2013-06-12 11:52:36 +02:00
Aleksander Morgado
0d4bc8240e NEWS: update, add reference to MBIM devices 2013-06-12 09:41:32 +02:00
Aleksander Morgado
9327b723df AUTHORS: update 2013-06-12 09:40:20 +02:00
Aleksander Morgado
29fb3fad80 README,docs: update basic ModemManager information 2013-06-12 09:05:12 +02:00
Aleksander Morgado
2be7adb5ea api,introspection: update copyright notices 2013-06-11 10:12:33 +02:00
Aleksander Morgado
6920a177d6 manager: require whitelist for devices in the 'pnp' subsystem 2013-06-10 20:30:13 +02:00
Aleksander Morgado
9765790831 build: distribute in .xz format
Up to 30% size reduction:

$ du -hs ModemManager-0.7.991.tar.*
  1.6M	ModemManager-0.7.991.tar.bz2
  1.1M	ModemManager-0.7.991.tar.xz
2013-06-10 16:58:43 +02:00
Dmitry Ivanyushin
6c098dd9f5 manager: handle PNP-connected devices too
I have a modem that is connected to motherboard's built-in serial port. Its
parent is listed in udev as "pnp" so this patch handles that situation.
2013-06-07 16:26:34 -05:00
Aleksander Morgado
8d07040207 man,mmcli: fix minor typo 2013-06-07 16:17:11 +02:00
Aleksander Morgado
a00f1d7428 build: fix distcheck 2013-06-06 10:16:22 +02:00
Aleksander Morgado
91898aa8b0 systemd: simplify unit file
Avoid setting up the Alias rule, which was a helper to let us 'disable' the
systemd service including dbus-activations. Without the Alias, 'disable' will
still let starting ModemManager through dbus-activation. If you really want to
fully disallow starting MM also through dbus-activation, you should 'mask' and
'unmask' the service.

E.g.:
 $ sudo systemctl mask ModemManager
ln -s '/dev/null' '/etc/systemd/system/ModemManager.service'

 $ sudo mmcli -L
error: couldn't find the ModemManager process in the bus

 $ sudo systemctl unmask ModemManager
rm '/etc/systemd/system/ModemManager.service'

 $ sudo mmcli -L
No modems were found

https://bugzilla.gnome.org/show_bug.cgi?id=701229
2013-06-06 10:07:17 +02:00
Aleksander Morgado
81451db1d7 release: bump version to 0.7.991
Tagging to handle the new API updates, so that applications depending on the
libmm-glib library can use the version number to check support.
2013-06-05 19:15:16 +02:00
Aleksander Morgado
4901ee8632 broadband-modem: run *CNTI=2 to when loading supported modes
It sometimes provides a much better view of the supported modes than the WS46=?
command, which is not always properly implemented. E.g.:

Nokia N950:
---------------
at+ws46=?
(12)
OK

at*cnti=2
*CNTI: 2,GSM,GPRS,EDGE,UMTS,HSDPA,HSUPA
OK

Sierra AC313u
---------------
at+ws46=?
ERROR

at*cnti=2
*CNTI: 2,GSM,GPRS,EDGE,UMTS,HSDPA/HSUPA,HSPA+,LTE
OK
2013-06-05 19:15:16 +02:00
Aleksander Morgado
de944262b4 broadband-modem: don't set supported mode defaults based on guesses
We may be asking to load supported modes while in locked state, so the commands
may fail. In order to re-load them properly once we're unlocked, we better just
return an error instead of setting defaults.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
e446db9ca4 huawei: default to IPv4 if no specific IP type to use given in NDISDUP modems 2013-06-05 19:15:15 +02:00
Aleksander Morgado
5b08091520 api,introspection: Simple.Connect() won't change neither bands nor allowed modes
We won't allow changing modes or bands through Simple.Connect(). Applications
should instead look at the corresponding SupportedBands or SupportedModes, and
then use SetCurrentBands() or SetCurrentModes() explicitly.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
b41278c423 iface-modem: allow changing capabilities in every state
Same as done with the firmware switching, we allow capabilities changing even
if the modem is in FAILED state, e.g. to switch from 3GPP to 3GPP2 mode.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
f09eff633c iface-modem: load current modes and bands during initialization
We now load current modes and bands before enabling the modem, and we also allow
mode and bands changes while the modem is disabled.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
0db920b762 mmcli: new '--set-current-capabilities' command
New command to allow changing modem capabilities, if supported. The modem will
power cycle automatically after having changed them.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
da606ef572 broadband-modem-qmi: update current capabilities loading logic
Changes being:

 * Don't rely on the band preference TLVs presence. The band preference TLVs are
   always given, even if the modem doesn't support the specific capability right
   away. E.g. a GSM/UMTS/LTE modem configured with 'gsm-umts' capability (no
   'lte') still shows the LTE band preference TLV in the SSP responses.

 * Don't automatically add LTE as current capability. We needed this when we
   were not able to change capabilities, so that we didn't lose the ability to
   set 4G mode as allowed.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
83a8e08c37 broadband-modem-qmi: implement capabilities setting 2013-06-05 19:15:15 +02:00
Aleksander Morgado
a902e6859e api,introspection: new 'SetCurrentCapabilities' method
For those modems which expose a valid 'SupportedCapabilities' property with more
than one item in the list, we'll allow switching between them.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
700ebc5c07 api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'
And also make it a list of masks, specifying which are the specific combinations
supported, not just one mask with all.

E.g.:
  -------------------------
  Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
           |          model: 'MC7710'
           |       revision: 'SWI9200X_03.05.19.04ap r5475 carmd-en-10527 2012/09/17 17:57:14'
           |      supported: 'gsm-umts
           |                  gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: '358178040668164'
2013-06-05 19:15:15 +02:00
Aleksander Morgado
1c67d050cb api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'
We now have a single 'CurrentModes' property which contains both values in a
tuple with signature "(uu)".

Also, rename 'SetAllowedModes()' to 'SetCurrentModes()', and update the list of
arguments expected to have a single "(uu)" tuple.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
45ceba7692 api,introspection: 'SupportedModes' is now a list of possible combinations
Instead of just a mask of MMModemMode values, we now provide a list of the
allowed and preferred mode combinations supported by the modem. E.g.:

$> sudo mmcli -m 0
  -------------------------
  Modes    |      supported: 'allowed: 2g; preferred: none
           |                  allowed: 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: 2g
           |                  allowed: 2g, 3g; preferred: 3g
           |                  allowed: 4g; preferred: none
           |                  allowed: 2g, 3g, 4g; preferred: none'
2013-06-05 19:15:14 +02:00
Aleksander Morgado
212d00c529 api,instrospection: rename 'Bands' to 'CurrentBands'
... and 'SetBands()' to 'SetCurrentBands()'.

We'll keep the 'Current' keyword in those properties which also have
'Supported' values.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
4dc8d1ff3a broadband-modem-mbim: implement supported IP families loading 2013-06-05 19:15:14 +02:00
Aleksander Morgado
8f3bf6b894 broadband-modem-qmi: implement supported IP families loading
We'll default to IPv4 if the modem is CDMA-only, and IPv4+IPv6 otherwise.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
2e223b5dbd mmcli,modem: show supported IP families in modem info 2013-06-05 19:15:14 +02:00
Aleksander Morgado
44ddbf48e2 broadband-bearer: use the new CGDCONT=? test response parser 2013-06-05 19:15:14 +02:00