Commit Graph

3126 Commits

Author SHA1 Message Date
Aleksander Morgado
f99ac11cbb libmm-glib,simple-status: improve documentation 2012-10-04 10:17:12 +02:00
Aleksander Morgado
8185f24e64 libmm-glib,simple-connect-properties: improve documentation 2012-10-04 10:17:12 +02:00
Aleksander Morgado
4f5dd8afaa libmm-glib,unlock-retries: improve documentation 2012-10-04 10:17:12 +02:00
Aleksander Morgado
433fdea6d4 libmm-glib: only allow including `libmm-glib.h' directly
Unless when compiling libmm-glib itself, of course.
2012-10-04 10:17:12 +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
8bdcdeecb6 libmm-glib,manager: minor indentation fixes 2012-10-04 10:17:05 +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
624fdb6ab4 docs,libmm-glib: properly order the sections 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
715a775949 libmm-glib,firmware: new `MMModemFirmware' type to handle the Firmware interface 2012-10-04 10:17:05 +02:00
Aleksander Morgado
a795772e3d libmm-common: new `MMFirmwareProperties' to handle firmare image properties 2012-10-04 10:17:05 +02:00
Aleksander Morgado
f198bc4eb0 api,introspection: simplify the Firmware interface
The Firmware interface was highly based on 'slots' to identify the existing
firmware images; but that doesn't fit very well with the initial implementation
of the Firmware interface in QMI-based modems. In these modems the 'storage
index' is a property which is not available in all types of images (e.g. 'PRI'
images don't have it).

Therefore, instead of using a unique 'slot' identifier we'll just use the
'name' of the firmware as unique ID.

Also, currently skip the handling of 'available' images, and the method to
'Install()' new images, at least until we have one implementation defining what
to do with those.
2012-10-04 10:17:05 +02:00
Aleksander Morgado
dda274437c api,introspection: firmware images require a new `image-type' property
Image types of `MM_FIRMWARE_IMAGE_TYPE_GENERIC' will expose only the mandatory
parameters. Other vendor-specific images may expose other properties.
2012-10-04 10:17:05 +02:00
Aleksander Morgado
d148eb6c7d libmm-glib,sms: `MMSms' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusSms'.
2012-10-03 20:45:20 +02:00
Aleksander Morgado
ba075e48f4 libmm-glib,sim: `MMSim' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusSim'.
2012-10-03 20:45:20 +02:00
Aleksander Morgado
41ece5a021 libmm-glib,bearer: `MMBearer' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusBearer'.
2012-10-03 20:45:20 +02:00
Aleksander Morgado
730f69a6d4 libmm-glib,time: `MMModemTime' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModemTime'.
2012-10-02 14:45:37 +02:00
Aleksander Morgado
653582ce17 libmm-glib,simple: `MMModemSimple' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModemSimple'.
2012-10-02 14:45:37 +02:00
Aleksander Morgado
6ac9460543 libmm-glib,messaging: `MMModemMessaging' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModemMessaging'.
2012-10-02 14:45:37 +02:00
Aleksander Morgado
45172e39b4 libmm-glib,location: `MMModemLocation' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModemLocation'.
2012-10-02 14:45:37 +02:00
Aleksander Morgado
2d6bca4b8b libmm-glib,cdma: `MMModemCdma' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModemCdma'.
2012-10-02 14:45:36 +02:00
Aleksander Morgado
9a722de6bb libmm-glib,3gpp-ussd: `MMModem3gppUssd' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModem3gppUssd'.
2012-10-02 14:45:36 +02:00
Aleksander Morgado
f5be23757d libmm-glib,3gpp: `MMModem3gpp' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModem3gpp'.
2012-10-02 14:45:36 +02:00
Aleksander Morgado
8ae0c36ab9 libmm-glib,modem: `MMModem' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModem'.
2012-10-01 23:44:48 +02:00
Aleksander Morgado
d07a138d37 libmm-glib,object: `MMObject' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusObject'.
2012-10-01 23:44:47 +02:00
Aleksander Morgado
2f16ef2278 libmm-glib,manager: cleanup object implementation 2012-10-01 23:44:47 +02:00
Aleksander Morgado
acf2e6d1e0 libmm-glib,manager: allow specifying the generated proxy types ourselves 2012-10-01 23:44:47 +02:00
Aleksander Morgado
ca14de0605 doc: setup gtk-doc generation for libmm-glib 2012-10-01 23:44:47 +02:00
Aleksander Morgado
54f476fe10 sierra: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
e669e4c868 cinterion: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
2ca70365cf wavecom: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
814bb21e9b nokia: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
305f02267e motorola: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
28800018fb gobi: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
668976f4d7 iridium: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
a5870ac3c6 zte: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
a0e19630e4 icera: we won't be implementing power-down during init
Some Icera-based modems (e.g. Samsung/Icera Y3300/Y3400) may take a loong time
to run the power down command (see commit 5f1a1cf8). So, for these modems we
will fully skip the power down command run during initialization.
2012-10-01 16:40:52 +02:00
Aleksander Morgado
77208f66ab iface-modem: ensure we're in low power mode when initializing
The power-down command defined by the plugin will be run *only* after having
checked for current and modem capabilities, as plugins (e.g. Sierra) may have
different commands for that depending on whether they are 3GPP or 3GPP2.

We do not reuse the 'modem_power_down' callback from the disabling sequence, as
some plugins really behave pretty badly with this (e.g. Samsung CFUN=4 may take
up to 30s to complete). So, we let plugins use the power-down command when
disabling but avoid launching it during init.
2012-10-01 16:40:51 +02:00
Aleksander Morgado
b622424d2f broadband-modem: handle unknown errors in AT sequences
When none of the commands in the AT sequence succeeds no error is set.
2012-09-28 20:35:41 +02:00
Aleksander Morgado
00a8ed3af4 iface-modem: ensure the state change is flushed before the detailed notify
In order to ease the life for clients listening to the 'state-changed' signal,
the change in the 'state' property in the DBus interface skeleton is flushed
right away, before emitting 'state-changed'. By doing this we make sure that
the 'state-changed' callbacks in the clients are able to see exactly the same
current state in the modem proxy.
2012-09-28 14:57:25 +02:00
Aleksander Morgado
65c3976cad core: acquire DBus name only after having created the `MMManager'
The `MMManager' is itself also a `GDBusObjectManagerServer'. If we create this
object after having fully acquired the bus name, the client application in the
other side of the bus could be trying to use the ObjectManager interface before
we actually exported it, which is wrong. Therefore, we need to make sure that
the Manager interfaces are all exported before the name is acquired.
2012-09-28 08:42:13 +02:00
Dan Williams
0b059ea9c9 uml290mode: fix log message 2012-09-27 11:13:26 -05:00
Dan Williams
f5c5a455c1 uml290mode: offline and reset modem after making changes 2012-09-27 10:55:48 -05:00
Dan Williams
fb65cba607 qcdm: add qcdm_cmd_control_new() to set operating mode 2012-09-27 10:55:20 -05:00
Aleksander Morgado
1b5804895f build: use $PKG_CONFIG
The build system sets up this variable for us, so use it rather than
hardcoding "pkg-config" which might be the wrong one.

Equivalent to the one done by
    Mike Frysinger <vapier@gentoo.org>
in libqmi.
2012-09-24 04:36:38 +02:00
Ben Chan
717b16b5b6 broadband-modem: increase timeout for ATZ
Some modem like Novatel LTE can take up to 5 seconds to complete the ATZ
command. Increase the timeout for ATZ from 3 seconds to 6 seconds.
2012-09-22 14:55:50 +02:00
Ben Chan
e60207d6ab broadband-modem: disconnect bearers only if the bearer list still exists
This patch fixes a crash when MMBroadbandModem tries to access an
already cleared bearer list during the disabling steps.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7f6eed4c40a3   [ModemManager]             - mm-bearer-list.c:259       mm_bearer_list_disconnect_all_bearers
0x7f6eed4cd6f8   [ModemManager]             - mm-iface-modem.c:1216      handle_enable_auth_ready
0x7f6eed332676   [libgio-2.0.so.0.3000.2]   - gsimpleasyncresult.c:749   g_simple_async_result_complete
0x7f6eed4c5750   [ModemManager]             - mm-base-modem.c:1015       authorize_ready
0x7f6eed332676   [libgio-2.0.so.0.3000.2]   - gsimpleasyncresult.c:749   g_simple_async_result_complete
0x7f6eed332788   [libgio-2.0.so.0.3000.2]   - gsimpleasyncresult.c:761   complete_in_idle_cb
0x7f6eecf36f44   [libglib-2.0.so.0.3000.2]  - gmain.c:2441               g_main_context_dispatch
0x7f6eecf37597   [libglib-2.0.so.0.3000.2]  - gmain.c:3089               g_main_context_iterate
0x7f6eecf37b51   [libglib-2.0.so.0.3000.2]  - gmain.c:3297               g_main_loop_run
0x7f6eed4b5ad1   [ModemManager]             - main.c:150                 main
0x7f6eec95141c   [libc-2.15.so]             - libc-start.c:234           __libc_start_main
0x7f6eed4b55e8   [ModemManager]             + 0x0001a5e8
2012-09-22 14:55:42 +02:00
Ben Chan
6124022ab3 modem-helpers: handle the case when operator name is "Unknown"
Some modems report "Unknown" as the operator name when failed to obtain
the actual value:

    --> 'AT+COPS=3,0;+COPS?<CR>'
    <-- '<CR><LF>+COPS: 0,0,"Unknown",0<CR><LF><CR><LF>OK<CR><LF>'

This patch prevents "Unknown" from being treated as a valid operator name.
2012-09-20 12:02:06 -05:00
Aleksander Morgado
6995300ecd huawei: if port replies to AT^GETPORTMODE, port is AT
Just skips the additional check for AT support in the port.
2012-09-19 10:37:31 +02:00
Aleksander Morgado
c4b5293669 device: if failed to get VID/PID in first port, try the next one
Don't rely only in the first grabbed port to get VID/PID. Some modems, e.g.
Huawei E367, won't report a proper VID in the cdc-wdm port, which is the first
one probed.
2012-09-19 10:18:44 +02:00