Commit Graph

839 Commits

Author SHA1 Message Date
Aleksander Morgado 18694ee79a wms: implement 'Get Supported Messages' 2015-02-25 15:47:15 +01:00
Aleksander Morgado f864133f8e wds: implement 'Get Supported Messages' 2015-02-25 15:47:15 +01:00
Aleksander Morgado 0625feef4d voice: implement 'Get Supported Messages' 2015-02-25 15:47:14 +01:00
Aleksander Morgado f1a6924fe3 uim: implement 'Get Supported Messages' 2015-02-25 15:47:14 +01:00
Aleksander Morgado 10f88c69ce nas: implement 'Get Supported Messages' 2015-02-25 15:47:14 +01:00
Aleksander Morgado ba1abb2cec wda: implement 'Get Supported Messages' 2015-02-25 15:47:14 +01:00
Aleksander Morgado 5dfa2198d0 dms: implement 'Get Supported Messages' 2015-02-25 15:47:14 +01:00
Aleksander Morgado 52a660aec9 qmicli: new WMS action group
Currently just supporting '--wms-reset' and '--wms-noop'.
2015-02-25 15:47:14 +01:00
Aleksander Morgado 2c8d6adaef docs: add missing reference to the WMS SMSC address indication 2015-02-25 15:47:14 +01:00
Aleksander Morgado 33df1d40d0 libqmi-glib,message: fix big-endian handling of tlv->length (debian #778346)
tlv->length is little-endian, so access to it must be protected
with GUINT16_FROM_LE/GUINT16_TO_LE.  Fixes testcase failures
on PPC32.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778346
2015-02-24 14:45:15 -06:00
Aleksander Morgado 656b5d17d9 qmicli,dms: avoid shadowing global 'timezone' variable
qmicli-dms.c: In function ‘get_time_ready’:
    qmicli-dms.c:1585: error: declaration of ‘timezone’ shadows a global declaration
    /usr/include/time.h:292: error: shadowed declaration is here
    make[4]: *** [qmicli-qmicli-dms.o] Error 1
    make[4]: Leaving directory `/usr/src/libqmi-1.13.4/src/qmicli'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/usr/src/libqmi-1.13.4/src/qmicli'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/src/libqmi-1.13.4/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/libqmi-1.13.4'
    make: *** [all] Error 2
2015-02-24 01:26:06 +01:00
Aleksander Morgado f8ccc6b973 data: add missing voice json database 2015-02-23 20:52:57 +01:00
Aleksander Morgado 575aec009e qmi-proxy: new '--no-exit' option
This new option will make the proxy to avoid exiting when no connected clients
were found. Without this option, the proxy will end up exiting after 30s without
a valid QmiDevice connected to the proxy, e.g.:

  $ sudo /usr/libexec/qmi-proxy --verbose
  [23 feb 2015, 20:48:35] [Debug] creating UNIX socket service...
  [23 feb 2015, 20:48:35] [Debug] starting UNIX socket service at 'qmi-proxy'...
  [23 feb 2015, 20:49:05] [Debug] UNIX socket service at 'qmi-proxy' stopped
  [23 feb 2015, 20:49:05] [Debug] exiting 'qmi-proxy'...
2015-02-23 20:51:25 +01:00
Aleksander Morgado e02d9a35b6 qmi-network: allow running with the qmi-proxy
The qmi-proxy setup will be used by default if the profile has the following
setting:

    PROXY=yes
2015-02-23 20:22:11 +01:00
Aleksander Morgado 8a5ba606b1 qmi-network: improved --help output with more detailed information 2015-02-23 20:01:00 +01:00
Aleksander Morgado 721457bc19 qmi-proxy: fix program name in --version 2015-02-23 19:30:59 +01:00
Aleksander Morgado fed9226cc9 build: bump micro version to 1.13.4
Not an official release, just a way to flag the availability of the new "DMS
Set FCC Authentication" command.
2015-02-07 21:34:43 +01:00
Aleksander Morgado c26a795a6d qmicli: new '--voice-get-config' action 2015-02-07 20:42:44 +01:00
Aleksander Morgado 350cd9a06c voice: initial support for the Voice service 2015-02-07 20:42:44 +01:00
Aleksander Morgado 22628a69da dms: new 'DMS Set FCC Authentication' message
Dell-branded Sierra modems, like the Dell DW5570 (Sierra Wireless MC8805) need
this specific command before they can be put in 'online' mode:

$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
	Mode: 'low-power'
	HW restricted: 'no'

$ sudo qmicli -d /dev/cdc-wdm1 --dms-set-fcc-authentication
[/dev/cdc-wdm1] Successfully set FCC authentication

$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
	Mode: 'online'
	HW restricted: 'no'

https://bugzilla.kernel.org/show_bug.cgi?id=92101
2015-02-07 19:07:47 +01:00
Aleksander Morgado 45ab1a6d81 wds: last call TX/RX stats in 'Get Packet Statistics' don't have prerequisite
These values may be given along with a QMI error (e.g. out-of-call), so don't
assume that a success operation is a prerequisite to read them.

    [04 Feb 2015, 20:55:07] [Debug]   [/dev/cdc-wdm1] Received message...
    >>>>>> RAW:
    >>>>>>   length = 42
    >>>>>>   data   = 01:29:00:80:01:08:02:0D:00:24:00:1D:00:02:04:00:01:00:0F:00:1C:08:00:2B:17:00:00:00:00:00:00:1B:08:00:87:28:00:00:00:00:00:00

    [04 Feb 2015, 20:55:07] [Debug]   [/dev/cdc-wdm1] Received message (translated)...
    >>>>>> QMUX:
    >>>>>>   length  = 41
    >>>>>>   flags   = 0x80
    >>>>>>   service = "wds"
    >>>>>>   client  = 8
    >>>>>> QMI:
    >>>>>>   flags       = "response"
    >>>>>>   transaction = 13
    >>>>>>   tlv_length  = 29
    >>>>>>   message     = "Get Packet Statistics" (0x0024)
    >>>>>> TLV:
    >>>>>>   type       = "Result" (0x02)
    >>>>>>   length     = 4
    >>>>>>   value      = 01:00:0F:00
    >>>>>>   translated = FAILURE: OutOfCall
    >>>>>> TLV:
    >>>>>>   type       = "Last Call Rx Bytes Ok" (0x1c)
    >>>>>>   length     = 8
    >>>>>>   value      = 2B:17:00:00:00:00:00:00
    >>>>>>   translated = 5931
    >>>>>> TLV:
    >>>>>>   type       = "Last Call Tx Bytes Ok" (0x1b)
    >>>>>>   length     = 8
    >>>>>>   value      = 87:28:00:00:00:00:00:00
    >>>>>>   translated = 10375
2015-02-04 20:57:06 +01:00
Aleksander Morgado 7c5965baab qmicli: in '--dms-get-time' print date/time along with the gpstime epoch 2015-02-04 18:54:45 +01:00
Aleksander Morgado 9f7cd9f9b2 qmicli: new '--get-wwan-iface' command line option to print WWAN iface name 2015-01-28 20:25:06 +01:00
Aleksander Morgado f962c45e43 libqmi-glib,device: new property and getter to load the WWAN interface name
Each QMI control port has one and only one associated WWAN net port. This new
"device-wwan-iface" property and the qmi_device_get_wwan_iface() getter allow
to load the WWAN net port name by looking directly at sysfs.
2015-01-28 20:25:06 +01:00
Aleksander Morgado e02abb054b qmicli,wda: error out early if parsing the --set-data-format value fails 2015-01-27 18:18:21 +01:00
Aleksander Morgado 041c4b62e8 NEWS: update to include the QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE api break 2015-01-26 22:03:36 +01:00
Aleksander Morgado 7fe12389a9 nas: fix QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE enum name (api break)
Just a enum value rename, but breaks API.

Also, version bump to 0.13.3 to flag the exact version in which the change
was introduced.
2015-01-26 22:00:28 +01:00
Aleksander Morgado e97b1f3c91 qmicli: add command completion
https://bugs.freedesktop.org/show_bug.cgi?id=87900
2015-01-25 21:10:42 +01:00
Aleksander Morgado 83dd5e2974 nas: fix ECIO List TLV array element type (api break)
ECIO List TLV (0x12) in the NAS Get Signal Strength response message is given as an
unsigned byte, representing negative 0.5dB increments.

This is an API break; added to NEWS already not to forget about it.

Also, version bump to 0.13.2 to flag the exact version in which the change
was introduced.

https://bugs.freedesktop.org/show_bug.cgi?id=85052
2015-01-25 19:34:26 +01:00
Aleksander Morgado 9b5957ae4a nas: fix ECIO TLV field type (api break)
ECIO TLV (0x14) in the NAS Event Report Indication message is given as an
unsigned byte, representing negative 0.5dB increments.

This is an API break; added to NEWS already not to forget about it.

Also, version bump to 0.13.1 to flag the exact version in which the change
was introduced.

https://bugs.freedesktop.org/show_bug.cgi?id=85052
2015-01-25 19:19:25 +01:00
Aleksander Morgado 89c7b0fc54 qmi-codegen: require Service set for a correct Client definition 2015-01-25 18:38:33 +01:00
Aleksander Morgado 844cd725ff libqmi-glib,message: add missing services in get_printable() and get_version_introduced() 2015-01-25 18:36:10 +01:00
Aleksander Morgado 657ddf3330 wms: new 'SMSC Address' indication
E.g.:
    >>>>>> QMUX:
    >>>>>>   length  = 31
    >>>>>>   flags   = 0x80
    >>>>>>   service = "wms"
    >>>>>>   client  = 1
    >>>>>> QMI:
    >>>>>>   flags       = "indication"
    >>>>>>   transaction = 0
    >>>>>>   tlv_length  = 19
    >>>>>>   message     = "SMSC Address" (0x0046)
    >>>>>> TLV:
    >>>>>>   type       = "Address" (0x01)
    >>>>>>   length     = 16
    >>>>>>   value      = 31:34:35:0C:2B:33:34:36:34:34:31:30:39:30:33:30
    >>>>>>   translated = [ type = '145' digits = '+34644109030' ]

https://bugs.freedesktop.org/show_bug.cgi?id=88756
2015-01-24 18:24:52 +01:00
Aleksander Morgado 17e841d028 pds: new 'GPS Ready' indication 2015-01-24 17:31:59 +01:00
Aleksander Morgado 4b3eeee8d3 libqmi-glib,wds: support 'UMTS Granted QoS' TLV in 'Get Current Settings' 2015-01-24 17:16:12 +01:00
Aleksander Morgado 2864b83961 libqmi-glib,wds: add missing 'underscore_name' in QmiWdsProfileType 2015-01-24 16:53:13 +01:00
Aleksander Morgado 022aad7633 libqmi-glib,test: unit test for the 'DMS Get Time' operation messages
'DMS Get Time' is the only message where we have a sized-guint: the 0x01
mandatory response TLV is 8-byte long (6 bytes for the time value, 2 bytes for
the source value).

This unit test uses the generic library APIs to check the correct parsing of
the 'DMS Get Time' response.
2015-01-22 20:36:09 +01:00
Aleksander Morgado 81c6ef7ca4 libqmi-glib: fix read/write sized uints when the size is not multiple of 2 2015-01-22 11:41:34 +01:00
Aleksander Morgado b5018159ee qmicli,pbm: better output when no capabilities are reported
Old output:
  $ sudo qmicli -d /dev/cdc-wdm1 --pbm-get-all-capabilities
  [/dev/cdc-wdm1] Phonebook capabilities:

New output:
  $ sudo qmicli -d /dev/cdc-wdm1 --pbm-get-all-capabilities
  [/dev/cdc-wdm1] Phonebook capabilities: none
2015-01-20 00:42:21 +01:00
Aleksander Morgado 11ba04935b libqmi-glib,test: fix compilation warnings in 32bit systems
CC       test_message-test-message.o
cc1: warnings being treated as errors
test-message.c: In function 'test_message_tlv_rw_64':
test-message.c:702: error: integer constant is too large for 'long' type
test-message.c:707: error: integer constant is too large for 'long' type
test-message.c:712: error: integer constant is too large for 'long' type
test-message.c:717: error: integer constant is too large for 'long' type
test-message.c:745: error: integer constant is too large for 'long' type
test-message.c:750: error: integer constant is too large for 'long' type
test-message.c:755: error: integer constant is too large for 'long' type
test-message.c:760: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_sized':
test-message.c:790: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_mixed':
test-message.c:1037: error: integer constant is too large for 'long' type
test-message.c:1042: error: integer constant is too large for 'long' type
test-message.c:1106: error: integer constant is too large for 'long' type
test-message.c:1111: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_write_overflow':
test-message.c:1169: error: integer constant is too large for 'long' type
test-message.c:1174: error: integer constant is too large for 'long' type
make[4]: *** [test_message-test-message.o] Error 1
2015-01-13 21:23:43 +01:00
Aleksander Morgado a233c0d5ac build: post release version bump to 1.13.0 2015-01-13 17:12:50 +01:00
Aleksander Morgado d4ff3fdafa release: bump version to 1.12.0 2015-01-13 14:21:00 +01:00
Aleksander Morgado 6bc72b9b3e build: use absolute paths for the ignored files in subdirs 2015-01-13 14:19:09 +01:00
Aleksander Morgado 5d934fc96f build: ignore built device owner rules file 2015-01-13 14:17:46 +01:00
Aleksander Morgado 6d6060780a libqmi-glib,proxy: root user always allowed
Even if QMI_USERNAME is defined to a non-root user, root should always be able
to access the proxy. E.g. ModemManager (run as root) must be able to launch and
access the proxy even if QMI_USERNAME was set to a non-root user.
2015-01-13 09:38:03 +01:00
Aleksander Morgado 5160fcfcfc qmi-codegen: update copyright of built files 2015-01-11 21:25:26 +01:00
Aleksander Morgado 010286ba2b qmi-codegen: avoid breaking API when defining strings in public structs
Commit b9c3701e33 introduced an API break, where we would change a pointer
to a heap allocated string and instead use a fixed size char array. This commit
will instead recover the pointer to the string when used in a public struct, so
that API isn't broken w.r.t. previous stable libqmi versions.

The string is now properly allocated before reading and deallocated as part of
the struct deallocation.
2015-01-11 21:25:26 +01:00
Aleksander Morgado f96f36ed50 qmicli: update copyright dates 2015-01-11 21:19:06 +01:00
Roshan Pius 8ddd37c2ac libqmi-glib,utils: avoid getpwnam() call if --enable-qmi-username not used
If --enable-qmi-username isn't explicitly used, we should just check
for the root user UID, without using getpwnam(). See e.g. these SELinux warnings:

SELinux is preventing /usr/bin/bash from read access on the file /etc/passwd.

    *****  Plugin catchall (100. confidence) suggests **************************

    If you believe that bash should be allowed read access on the passwd file by default.
    Then you should report this as a bug.
    You can generate a local policy module to allow this access.
    Do allow this access for now by executing:
    # grep qmi-proxy /var/log/audit/audit.log | audit2allow -M mypol
    # semodule -i mypol.pp
2015-01-09 13:13:31 +01:00
Aleksander Morgado 4c4b16d3f9 build: update NEWS 2014-12-30 12:24:15 +01:00