Commit Graph

153 Commits

Author SHA1 Message Date
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
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
2e223b5dbd mmcli,modem: show supported IP families in modem info 2013-06-05 19:15:14 +02:00
Aleksander Morgado
804642adc2 api: let MMBearerIpFamily be flags instead of a enumeration
We want to expose in the Modem interface the list of supported IP families, and
the easiest way to do so is to have the IP family as flags, and provide in the
interface a single enum.

Also, a value of 0 for a MMBearerIpFamily specifies that no flags are set, so
just rename it to 'NONE'.

And add a new 'ANY' value which sets all flags to 1.
2013-06-05 19:15:13 +02:00
Aleksander Morgado
5c8f1fe0f2 mmcli: fix newline prefixing
The last line in a multi-line string was getting lost if it wasn't '\n'
terminated.
2013-05-23 18:00:03 +02:00
Aleksander Morgado
f9105bff87 api,introspection: update 'Validity' property in the SMS interface
We don't want to support only 'relative' validity, so don't assume that the
Validity property will always be a uint32 value.

Instead, we define the Validity propery as '(uv)' tuple, where the first value
(a MMSmsValidityType) specifies the type of validity, and the second value is
a variant formatted accordingly to what the validity type specifies (e.g. a
uint32 value if the type is MM_SMS_VALIDITY_TYPE_RELATIVE).
2013-04-05 17:48:51 +02:00
Aleksander Morgado
215255d325 cli: show CDMA activation state info 2013-03-22 08:12:59 +01:00
Aleksander Morgado
75d20c15d4 api: notify in the interface about the reason why the modem is FAILED
We currently implement 'SIM missing' and 'SIM error', which are probably the
most common ones.
2013-02-22 16:35:56 +01:00
Aleksander Morgado
84adf4e4ef cli: don't autostart the ModemManager service 2013-02-06 19:59:16 +01:00
Aleksander Morgado
695680b2ff cli: show current power state in the modem status information 2013-01-11 10:05:46 +01:00
Aleksander Morgado
669f0928f3 cli: new '--set-power-state-on' and '--set-power-state-low' commands 2013-01-11 10:05:46 +01:00
Aleksander Morgado
b508316a5a cli: new actions to setup or gather CDMA BS location source 2012-11-02 08:23:11 +01:00
Aleksander Morgado
6788f809ea cli,sms: add missing parameter documentation in `--store-in-storage' 2012-10-23 16:31:51 +02:00
Aleksander Morgado
2559dc5baf cli: don't abort when looking for bearers in failed modems 2012-10-22 12:46:34 +02:00
Aleksander Morgado
79fdddccbf api,modem: new 'PrimaryPort' property
We do need to specify which is the primary port being used for controlling the
modem. This allows us to match the device with an already existing bluetooth
device in NetworkManager.
2012-10-19 00:58:36 +02:00
Aleksander Morgado
ae26762d11 cli: avoid segfault when revision info is not given 2012-10-15 13:35:15 +02:00
Aleksander Morgado
2a96592f69 cli: include signal quality information in modem status info 2012-10-05 14:40:28 +02:00
Aleksander Morgado
1ccf89dbb8 api,libmm-glib,cli: handle firmware images of type `MM_FIRMWARE_IMAGE_TYPE_GOBI' 2012-10-04 19:08:03 +02:00
Aleksander Morgado
15a99ebe55 cli,firmware: no need to be enabled to run actions 2012-10-04 18:52:47 +02:00
Aleksander Morgado
0d00ee28be api,libmm-glib: use a 'unique-id' as ID of the firmware image, not a 'name'
Also, make only the 'unique-id' mandatory.
2012-10-04 18:52:39 +02:00
Aleksander Morgado
c250fa3797 libmm-glib: remove the `libmm-common.h' header
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.

We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:

 * Don't include the libmm-glib high level API in the ModemManager daemon, as
   the object names would clash with those in the core.

 * Define some of the methods of helper objects to be included only if compiling
   ModemManager daemon or the mmcli.
2012-10-04 10:17:12 +02:00
Aleksander Morgado
b6d628b3a1 build: merge libmm-common into libmm-glib
It's pointless to have libmm-common around, just merge it into libmm-glib and
make ModemManager depend on libmm-glib directly. At the end, the non-common
stuff in libmm-glib is really minimal.
2012-10-04 10:17:05 +02:00
Aleksander Morgado
c07a3832dd cli: new --firmware-list' and --firmware-select' actions 2012-10-04 10:17:05 +02:00
Aleksander Morgado
d30ec8f5a6 cli: minor text output fixes 2012-09-14 11:57:36 +02:00
Aleksander Morgado
f6832d72cf cli: new `--create-file-with-data' action for SMS objects
This new action allows creating a new file with the binary data stored in the
SMS, if any.

E.g.:

$> sudo mmcli -s 7 \
              --create-file-with-data=output.txt

This action can only be run on SMS object with binary data.
2012-09-14 07:05:26 +02:00
Aleksander Morgado
0156279749 cli: new `--messaging-create-sms-with-data' switch
This switch can be run along with the `--messaging-create-sms' action, in order
to include in the SMS the data as given in the file specified by the new switch.

E.g.:

$> sudo mmcli -m 0 \
              --messaging-create-sms="number='1234567890'" \
              --messaging-create-sms-with-data=file.txt

In this case, the SMS properties string cannot contain a 'text' field.
2012-09-14 07:05:26 +02:00
Aleksander Morgado
f6147e0d6b cli: print new SMS properties in SMS status report 2012-09-14 07:05:25 +02:00
Aleksander Morgado
7c9beae013 cli: print delivery report request information in SMS status 2012-09-14 07:05:24 +02:00
Aleksander Morgado
54178a7959 cli: include default SMS storage info in `--messaging-status'
$> sudo mmcli -m 1 --messaging-status

/org/freedesktop/ModemManager1/Modem/1
  ----------------------------
  Messaging | supported storages: 'sm, mt, me, sr'
            |    default storage: 'me'
2012-09-14 07:05:23 +02:00
Aleksander Morgado
584fc77bb3 cli: include the `--messaging' prefix in all Messaging-related actions
Just for consistency with other interfaces, which also provide interface
specific prefixes in their mmcli actions.
2012-09-14 07:05:23 +02:00
Aleksander Morgado
47b459603a cli: new `--messaging-status' action
Currently shows the list of supported SMS storages.
2012-09-14 07:05:23 +02:00
Aleksander Morgado
f0e873b26e cli: new `--store-in-storage' action to be able to select where to store the SMS
Expects the storage as the enum nickname string, e.g:
   "me" for MM_SMS_STORAGE_ME
or
   "sm" for MM_SMS_STORAGE_SM
2012-09-14 07:05:23 +02:00
Aleksander Morgado
667026f0c8 api: Sms.Store() now requires the specific memory storage where to store the SMS
... or MM_SMS_STORAGE_UNKNOWN to store it in the default storage.
2012-09-14 07:05:23 +02:00
Aleksander Morgado
f2cc69bc7f cli: include both current and modem capabilities in modem report 2012-09-07 11:19:46 +02:00
Aleksander Morgado
0436b3e457 api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').

$ sudo mmcli -m 0 | grep drivers
           |        drivers: 'qcserial, qmi_wwan'
2012-08-24 13:34:51 +02:00
Aleksander Morgado
985f510041 cli: fix output message when storing a SMS 2012-08-24 12:32:29 +02:00
Aleksander Morgado
1ac18a06bb api,dbus: 'ip-type' property now given as a MMBearerIpFamily (u)
Instead of using a predefined set of string values for 'ip-type' in
Modem.CreateBearer() and Simple.Connect(), we'll use an enumeration. The
implementation will then need to convert the requested IP family type to e.g.
the correct PDP type in 3GPP modems.

This change also consolidates the use of enums in dictionary properties when
possible to do so, as with the Rm Protocol.
2012-08-22 09:38:21 +02:00
Aleksander Morgado
737b6c2fc5 cli,libmm-glib: provide mm_manager_(peek|get)_proxy()
peek() doesn't increase the reference count of the proxy object, while get()
does it.
2012-07-31 09:02:58 +02:00
Ben Chan
60405ce4ff cli,libmm-glib: set default timeout on manager DBus proxy
This patch fixes mmcli to set the default timeout on the manager proxy
interface (MmGdbusOrgFreedesktopModemManager1) instead of MMManager
itself. The later is not a GDBusProxy object.
2012-07-31 08:54:45 +02:00
Aleksander Morgado
75d84b7402 cli: get AT command timeout directly from our default operation timeout
We remove the `--command-timeout' option, as the AT command timeout is now
directly computed from our default DBus timeout (modifiable with `--timeout').
2012-07-25 11:44:18 +02:00
Aleksander Morgado
8f8bcd7724 cli: allow modifying default DBus timeout with `--timeout'
By default 30s will be used for every operation.
2012-07-25 11:44:01 +02:00
Aleksander Morgado
8a34e41794 cli: fix showing CDMA related info in sync mode 2012-07-25 11:43:53 +02:00
Aleksander Morgado
001f35234e cli: ensure modem is enabled when performing actions
Don't rely on the lock status, as the modem may say it requires SIM PIN 2, but
we're allowed to run most operations even with that unlock required.
2012-07-25 11:43:45 +02:00
Aleksander Morgado
107c78306e cli: fix showing revision when not multiline 2012-06-29 13:29:13 +02:00
Aleksander Morgado
f1d4e0fb63 mmcli: prefix all NMEA traces in order to get a pretty print 2012-03-29 09:18:04 +02:00
Aleksander Morgado
4bc990ce76 mmcli: new actions to request gps-specific or all available locations 2012-03-29 09:18:04 +02:00
Aleksander Morgado
9116a58eb6 mmcli: allow multiple location source enabling/disabling commands
For example, we do allow:
 mmcli -m 0 --enable-location-gps-nmea --disable-location-gps-raw

All the options get merged into a single Setup() call in the Location interface.
2012-03-29 09:18:04 +02:00