Commit Graph

5733 Commits

Author SHA1 Message Date
Christian Persch
b8838b8882 libmm-glib: Generate GObject introspection information
Bug #705641.
2013-08-14 13:30:35 +02:00
Aleksander Morgado
d1d2868785 api: Change error enum nicks
Introspection can't copy with a '.' in the value nicks, so just remove those.

Note: This could be considered an ABI break!

Bug #705641.

Patch based on a previous one from Christian Persch <chpe@gnome.org>.
2013-08-14 13:30:35 +02:00
Christian Persch
0abba497ab libmm-glib: Fix and add introspection annotations
Bug #705641.
2013-08-14 13:30:35 +02:00
Ben Chan
34f6a2b63e huawei: implement modem reset via +CFUN=16 for MU736 2013-08-14 09:30:47 +02:00
Ben Chan
f515cd1d90 iface-modem: add mm_iface_modem_get_model helper to query model 2013-08-14 09:30:41 +02:00
Aleksander Morgado
c94943322b docs: add missing types 2013-08-13 16:05:07 +02:00
Fangxiaozhi (Franko)
e778283f55 huawei: enlarge the checking times for ndisstatqry in disconnecting
In sometimes, the disconnection of NDISDUP will spend more time than 10s.
So it is better to enlarge the checking times, such as up to 60 times.
2013-08-12 09:04:43 +02:00
Ben Chan
a82acb34ec huawei: implement modem reset 2013-08-12 08:57:43 +02:00
Dan Williams
1d3ec932d5 build: install mm-cdma-manual-activation-properties.h to includes dir 2013-08-08 09:45:16 -05:00
Aleksander Morgado
bb1d39cf7c broadband-modem-qmi: check MDN set after manual activation 2013-08-08 09:50:04 +02:00
Aleksander Morgado
512ef6970c broadband-modem-qmi: implement manual CDMA activation
We'll also now require libqmi 1.5 (git master), needed to handle the PRL TLV
in 'DMS Activate Manual'.

TODO: require 1.6 as soon as it is released.
2013-08-08 09:50:04 +02:00
Aleksander Morgado
4e3d0ec3fd mmcli,cdma: new '--cdma-activate-manual' action
Along with a new '--cdma-activate-manual-with-prl'.

These can be used to request CDMA Manual Activation, like:

$> sudo mmcli \
   -m 0 \
   --cdma-activate-manual="spc=123456,sid=ab,mdn=0123456789abcde,min=0123456789abcde"

Or:

$> sudo mmcli \
   -m 0 \
   --cdma-activate-manual="spc=123456,sid=ab,mdn=0123456789abcde,min=0123456789abcde" \
   --cdma-activate-manual-with-prl=/path/to/my/prl.data
2013-08-08 09:50:04 +02:00
Aleksander Morgado
5de526f708 libmm-glib,cdma: implement manual activation methods 2013-08-08 09:50:04 +02:00
Aleksander Morgado
b769d48ed8 iface-modem-cdma: use the new 'MMCdmaManualActivationProperties' 2013-08-08 09:50:04 +02:00
Aleksander Morgado
c0d4f3157a libmm-glib: new 'MMCdmaManualActivationProperties' helper object 2013-08-08 09:50:04 +02:00
Aleksander Morgado
5ba2c1d6cb introspection,api: document the expected parameters in Cdma.ActivateManual() 2013-08-08 09:50:04 +02:00
Ben Chan
ffac6f17b5 modem-helpers: fix parsing of CREG/CGREG/CEREG responses
The format of CREG/CGREG/CEREG responses is not very precisely defined
in or strictly enforced by the 3GPP specifications. That leads to the
fact that some modems put leading zeros in integer type fields (e.g.
<n>, <stat>, <AcT>), and not all modems put double quotes around string
type fields (e.g. <lac>, <ci>) in those C*REG responses.

For example, 0001 can be a valid value for both <stat> and <lac>. The
original C*REG parsing code in ModemManager could potentially interpret
'+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This
patch addresses this issue by refining the regular expressions returned
by mm_3gpp_creg_regex_get() with the following assumptions:

1. If a modem puts leading zeros in integer type fields, it puts double
   quotes around string type fields.
2. If a modem omits double quotes around string type fields, it does not
   put leading zeros in integer type fields.
2013-08-06 16:14:35 -05:00
Ben Chan
755c61a2ff huawei: ignore ^PDPDEACT unsolicited messages 2013-08-06 16:06:01 -05:00
Ben Chan
8ff3f6703a huawei: handle whitespace in RSSI responses
This patch modifies the regular expressions for parsing ^RSSI, ^RSSILVL,
and ^HRSSILVL responses to handle any whitespace that is inserted
between the colon and the RSSI value.

The issue is identified by Dan Williams <dcbw@redhat.com>
2013-08-06 16:05:37 -05:00
Ben Chan
f2fd4d8de0 huawei: implement modem power up and down
This patch is originally developed by:
  Franko Fang <fangxiaozhi@huawei.com>

And then reviewed and updated by:
  Ben Chan <benchan@chromium.org>
2013-08-05 22:51:22 -05:00
Ben Chan
48fbe1a242 huawei: reset disconnect_pending to NULL when ^NDISSTATQRY fails 2013-07-31 16:59:27 +02:00
Dan Williams
965ef76547 serial: add logging to serial port open failures 2013-07-23 10:03:27 -05:00
Aleksander Morgado
74056e02ce build: fix dbus activation file generation
https://bugzilla.gnome.org/show_bug.cgi?id=704711
2013-07-23 11:04:29 +02:00
Aleksander Morgado
599b3dd830 build: post release version bump to 1.1.0 (development) 2013-07-19 11:14:09 +02:00
Aleksander Morgado
5c68a3686d release: bump version to 1.0.0 2013-07-19 10:00:01 +02:00
Aleksander Morgado
953b7df70c release: update NEWS 2013-07-19 09:59:50 +02:00
Aleksander Morgado
184c5a925a docs: update migration reference version number 2013-07-19 09:59:41 +02:00
Aleksander Morgado
1e69874e59 api,introspection: update interface version number 2013-07-19 09:59:21 +02:00
Aleksander Morgado
d90a6309fb broadband-modem-qmi: plug memleak when listing SMS messages 2013-07-18 22:44:49 +02:00
Aleksander Morgado
0245b6256a libmm-glib,firmware-properties: allow NULL when building dictionary 2013-07-18 20:08:36 +02:00
Aleksander Morgado
abce098cfe sms: initialize 'validity' property always to a default
When we're exposing not-yet-completed multipart messages, we need to provide a
correct value for the validity property, or gdbus may crash, see e.g.:

https://bugzilla.gnome.org/show_bug.cgi?id=704319
2013-07-17 09:03:16 +02:00
Aleksander Morgado
022f5bb490 mmcli,messaging: plug memleak 2013-07-15 13:42:00 +02:00
Ben Chan
48d35ee610 altair-lte: set serial port send delay to 0
With a non-zero send delay, the communication over the ttyACM port of
the modem is not very stable when USB auto-suspend is enabled for the
modem. The send delay is not necessary and thus removed by this patch.

Ori Inbar <ori.inbar@altair-semi.com> reported the issue and suggested
this fix.
2013-07-14 21:03:37 -05:00
Aleksander Morgado
5b3392e84b build: require libmbim by default, and explicitly log about --without-mbim 2013-07-14 17:13:07 +02:00
Aleksander Morgado
ac588e9d0e build: explicitly log about --without-qmi when looking for libqmi fails 2013-07-14 17:13:07 +02:00
Aleksander Morgado
19f07c12a1 sms-properties: fix introspection comment 2013-07-12 13:36:36 +02:00
Dan Williams
f3d9c35e9b build: fix multiply defined EXTRA_DIST
plugins/Makefile.am:375: warning: EXTRA_DIST multiply defined in condition TRUE ...
gtester.make:6: ... 'EXTRA_DIST' previously defined here
plugins/Makefile.am:1:   'gtester.make' included from here
2013-07-11 09:07:12 -05:00
Aleksander Morgado
0b2e04ed14 huawei: use ^NDISSTATQRY to check for connection status
Patch based on changes from Franko Fang <fangxiaozhi@huawei.com>.
2013-07-11 09:39:21 +02:00
Aleksander Morgado
8d0ec0fc24 huawei: new helper to parse ^NDISSTATQRY responses 2013-07-11 09:39:21 +02:00
Ben Chan
5e82707b3f broadband-modem-qmi: fix incorrect conversions from double to gint32
This patch fixes the following incorrect conversions from double to gint32:

mm-broadband-modem-qmi.c:4785:27: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_longitude = MM_LOCATION_LONGITUDE_UNKNOWN;
           ~~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mm-broadband-modem-qmi.c:4786:26: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_latitude = MM_LOCATION_LATITUDE_UNKNOWN;
           ~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-07-11 08:33:37 +02:00
Ben Chan
d366b28650 modem-helpers-qmi: fix enumeration type mismatches
This patch fixes the following enumeration type mismatches:

mm-modem-helpers-qmi.c:980:12: error: implicit conversion from
enumeration type 'QmiNasRatModePreference' to different
enumeration type 'QmiNasRadioTechnologyPreference' [-Werror,-Wenum-conversion]
    return qmi;
    ~~~~~~ ^~~

mm-modem-helpers-qmi.c:1082:12: error: implicit conversion from
enumeration type 'MMModemMode' to different
enumeration type 'QmiNasGsmWcdmaAcquisitionOrderPreference' [-Werror,-Wenum-conversion]
    return MM_MODEM_MODE_NONE;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~

mm-modem-helpers-qmi.c:1096:16: error: implicit conversion from
enumeration type 'QmiNasRegistrationState' to different
enumeration type 'MMModem3gppRegistrationState' [-Werror,-Wenum-conversion]
    return QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-07-11 07:53:33 +02:00
Dan Williams
8660be8f39 x22x: add support for Olivetti Olicard 200 2013-07-10 10:56:45 -05:00
Aleksander Morgado
1bd60c7dac docs,libmm-glib: update type information 2013-07-08 13:10:51 +02:00
Ben Chan
dd2b467262 serial-port: warn if ioctl(TIOCSSERIAL) fails to set closing_wait
Prints out a warning if ioctl(TIOCSSERIAL) fails to set closing_wait to
none. This helps debug issues when a serial driver does not support or
properly handle closing_wait, which may cause closing of the serial port
to block.
2013-07-08 08:46:21 +02:00
Ben Chan
f0490b4fff altair-lte: support load_power_state in MMIfaceModem
Being able to determine the current power state of the modem is
necessary to ensure reliable modem operations.
2013-07-04 07:27:27 +02:00
Ben Chan
989210bfd8 altair-lte: propagate error when load_{supported,current}_bands fails
This patch fixes a potential crash when
MMIfaceModem::load_current_bands_ready() dereferences a NULL GError
pointer, which happens when the altair-lte plugin fails to load the
current bands but does not propagate the error. It also fixes a similar
issue with the plugin fails to load the supported bands, even though
MMIfaceModem::load_supported_bands_ready() checks for a NULL GError
pointer.
2013-06-28 07:35:59 +02:00
Ben Chan
5be1ce6ee1 novatel-lte: propagate error when load_current_bands fails
This patch fixes the following crash when
MMIfaceModem::load_current_bands_ready() dereferences a NULL GError
pointer, which happens when the novatel-lte plugin fails to load the
current bands but does not propagate the error.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7f04d6c89c36   [ModemManager]            - mm-iface-modem.c:3886      load_current_bands_ready
0x7f04d6942236   [libgio-2.0.so.0.3200.4]  - gsimpleasyncresult.c:767   g_simple_async_result_complete
0x7f04d6942338   [libgio-2.0.so.0.3200.4]  - gsimpleasyncresult.c:779   complete_in_idle_cb
0x7f04d67fad74   [libglib-2.0.so.0.3200.4] - gmain.c:2539               g_main_context_dispatch
0x7f04d67fb0f7   [libglib-2.0.so.0.3200.4] - gmain.c:3146               g_main_context_iterate
0x7f04d67fb551   [libglib-2.0.so.0.3200.4] - gmain.c:3340               g_main_loop_run
0x7f04d6c68795   [ModemManager]            - main.c:142]                main
0x7f04d6213464   [libc-2.15.so]            - libc-start.c:234]          __libc_start_main
0x7f04d6c68318   [ModemManager]            + 0x0001d318]
2013-06-28 07:35:53 +02:00
Aleksander Morgado
49f017abff man,mmcli: changing modes and bands no longer allowed in '--simple-connect' 2013-06-27 10:17:20 +02:00
Ben Chan
6f3d9e5dac altair-lte: avoid sending ATZ when enabling the modem
This patch prevents an ATZ command, which causes the modem to reboot,
from being sent to the modem when the modem is being enabled.
2013-06-27 09:12:56 +02:00
Aleksander Morgado
a9ebec949e plugin-manager: handle modems where only some ports report being Icera
Icera-based Nokia modems may reply correctly to the Icera probing only in some
AT ports, not in all. In order to handle this situation we override the final
plugin selected to be the Icera-based one if we find that the mismatched plugins
have the 'icera-allowed' and 'icera-forbidden' filters.

https://bugzilla.gnome.org/show_bug.cgi?id=703022
2013-06-26 11:07:40 +02:00