Commit Graph
4024 Commits
Author SHA1 Message Date
Aleksander Morgado 52d34ce0db bearer-mbim: parse replies on failure
Based on a patch from: Bjørn Mork <bjorn@mork.no>

Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
2013-12-19 18:43:14 +01:00
Ben Chan ab12d17bfb iface-modem: fix crash in wait_for_final_state_context_complete_and_free
When wait_for_final_state_context_complete_and_free is invoked, if the callback
associated with the GSimpleAsyncResult object of the WaitForFinalStateContext
object updates the modem state via mm_iface_modem_update_state, state_changed
is invoked, which causes wait_for_final_state_context_complete_and_free to be
invoked again on the same WaitForFinalStateContext object. That leads to the
following crash, which is observed sometimes when a modem is being disabled.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7fcb7728f202   [libgobject-2.0.so.0.3400.3] - gobject.c:2916              g_object_unref
0x7fcb7743205c   [ModemManager]               - mm-broadband-modem.c:8034   disabling_context_complete_and_free
0x7fcb77434d64   [ModemManager]               - mm-broadband-modem.c:8130   disabling_wait_for_final_state_ready
0x7fcb770c0b86   [libgio-2.0.so.0.3400.3]     - gsimpleasyncresult.c:775    g_simple_async_result_complete
0x7fcb7740cdbc   [ModemManager]               - mm-iface-modem.c:101]       wait_for_final_state_context_complete_and_free
0x7fcb7740ce19   [ModemManager]               - mm-iface-modem.c:128]       state_changed_wait_expired
0x7fcb76f78c33   [libglib-2.0.so.0.3400.3]    - gmain.c:4026]               g_timeout_dispatch
0x7fcb76f78087   [libglib-2.0.so.0.3400.3]    - gmain.c:2715]               g_main_context_dispatch
0x7fcb76f78437   [libglib-2.0.so.0.3400.3]    - gmain.c:3290]               g_main_context_iterate
0x7fcb76f78891   [libglib-2.0.so.0.3400.3]    - gmain.c:3484]               g_main_loop_run
0x7fcb773f4d55   [ModemManager]               - main.c:142]                 main
0x7fcb7698a9c6   [libc-2.15.so]               - libc-start.c:234]           __libc_start_main
0x7fcb773f48b8   [ModemManager]               + 0x000218b8]
2013-12-17 01:37:13 +01:00
Aleksander Morgado 004924b038 broadband-modem-qmi: fix segfault when using AT-fallback mode for messaging
The default broadband modem implementation doesn't have a method to disable
unsolicited messages for SMS.
2013-12-16 12:37:20 +01:00
Aleksander Morgado 5b078edc21 release: bump version to 1.1.900 (1.2-rc1)
Also bump soname of libmm-glib, as the interface has grown since the last tag.
2013-12-10 14:27:35 +01:00
Ben Chan 5aa2f11535 sim-mbim: prevent potential leak when loading SIM idenitifier and IMSI
This patch addresses a potential memory leak when load_sim_identifier or
load_imsi in MMSimMbim is called but the caller does not provide a
GAsyncReadyCallback.
2013-12-10 10:28:06 +01:00
Ben Chan 4c213d460e broadband-modem-mbim: prevent potential leak when scanning networks
This patch addresses a potential memory leak when scan_networks in
MMBroadbandModemMbim is called but the caller does not provide a
GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:26:57 +01:00
Ben Chan ebadb6786a sim-mbim: prevent potential leak when loading operator idenitifier and name
This patch addresses a potential memory leak when
load_operator_identifier or load_operator_name in MMSimMbim is called
but the caller does not provide a GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:24:52 +01:00
Aleksander Morgado fc42b2df8c huawei: handle empty response to AT^SYSCFG=?
Some Huawei modems (e.g. E220) may give an empty response for AT^SYSCFG=?, even
if they do support the command. Handle this case by prividing a default fallback
format string when this happens.
2013-12-09 23:07:19 +01:00
Aleksander Morgado e81fdd07c3 huawei: new current mode setting based on the supported combinations 2013-12-09 23:07:19 +01:00
Aleksander Morgado c337f52e30 huawei: new current mode loading based on the supported combinations 2013-12-09 23:07:19 +01:00
Aleksander Morgado 02839b2e44 huawei: new ^SYSCFGEX? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 9ac136028b huawei: new ^SYSCFG? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 4e5c35a69f huawei: new ^PREFMODE? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 8cc3eff661 huawei: load supported modes, not just assume them 2013-12-09 23:07:19 +01:00
Aleksander Morgado ef526395df huawei: consolidate command support checks 2013-12-09 23:07:19 +01:00
Aleksander Morgado 47640a6507 huawei: new ^SYSCFGEX=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 677dd7da91 huawei: new ^SYSCFG=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado ceb578a824 huawei: new ^PREFMODE=? test parser 2013-12-09 23:07:18 +01:00
Aleksander Morgado 0dcf609dcc huawei,tests: enable log traces in the tests 2013-12-09 23:07:18 +01:00
Dan Williams a1ffe805af broadband-modem-huawei: fix CDMA unsolicited response parsing
On at least the EC168C, various unsolicited responses like RSSILVL,
HRSSILVL, and MODE can include an extra Carriage Return:

^MODE: 2<CR><CR><LF><CR><CR><LF>
^RSSILVL:60<CR><CR><LF><CR><CR><LF>
2013-12-09 11:27:27 -06:00
Bjørn Mork f721c650d2 qcdm: add utility to display and set the "IPv6 enabled" variable
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:48 -06:00
Bjørn Mork fa0fa1c647 qcdm: add IPv6 nvram setting to test suite
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:12 -06:00
Bjørn Mork 13552aa8b6 qcdm: add IPv6 nvram setting
Some Qualcomm firmwares disable IPv6 unless this flag is set in nvram, at
least for the LTE default bearer. The firmware will happily let you
configure the IPV6 and IPV4V6 PDP types, also including the default
profile, but any attempt to connect will fail.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:09 -06:00
Ben Chan 073163fb0b core: fix some typos in comments 2013-12-05 13:04:18 -06:00
Ben Chan 9a72f90cf7 cli: fix source tag of GSimpleAsyncResult objects 2013-12-05 13:03:29 -06:00
Ben Chan 2db3df9d93 broadband-modem-mbim: implement network scan 2013-12-05 13:01:44 -06:00
Ben Chan 891f55f25c broadband-modem-mbim: fix source tag of GSimpleAsyncResult objects 2013-12-04 08:09:15 -06:00
Ben Chan 1e8baaf7a2 sim-mbim: implement operator identifier and name loading 2013-12-03 10:11:16 -06:00
Dan Williams 1b34fe6c51 broadband-bearer-qmi: ensure errors are cleared before re-using them
If the bearer doesn't have one of IPv4 or IPv6 configuration, then the
qmi_message_wds_get_current_settings_output_get_ip*_address() functions
will return FALSE with a filled error, which was not cleared.

This fixes a glib warning message about overwriting an already-filled
GError.
2013-12-01 14:20:19 -06:00
Aleksander Morgado c30a8f67ef base-modem: also release cdc-wdm ports 2013-11-22 15:00:52 +01:00
Ben Chan 6d251daf47 cli: print 'Bearers' property in Modem interface 2013-11-22 08:35:53 +01:00
Ben Chan e438221258 libmm-glib: add methods to retrieve 'Bearers' property in Modem interface 2013-11-22 08:35:41 +01:00
Aleksander Morgado a787d1bbb8 docs,libmm-glib: add missing methods for the new properties 2013-11-21 12:46:05 +01:00
Aleksander Morgado f7546ad824 introspection,api: new 'Messages' property in the Messaging interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 11:36:21 +01:00
Aleksander Morgado 7f442b777c introspection,api: new 'Bearers' property in the Modem interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 10:50:49 +01:00
Thieu Le c21709b32e altair-lte: add SIMREFRESH support
Register for SIMREFRESH event and reload own numbers and reregister
modem with network when this happens.
2013-11-21 10:48:53 +01:00
Aleksander Morgado 5e7fee1d11 build: use 'g_cclosure_marshal_generic' by default
Avoid custom marshalers, and just use libffi-based 'g_cclosure_marshal_generic'.
2013-11-20 15:17:09 +01:00
Aleksander Morgado fe744b4534 base-modem: fix port validity checks 2013-11-20 15:00:07 +01:00
Aleksander Morgado 974408760c introspection,api: fix Messaging documentation
We don't have a Completed signal.
2013-11-15 19:35:17 +01:00
Aleksander Morgado 85d5d96824 port: remove 'carrier-detect' property
It is no longer used since commit 736aa0d2d.
2013-11-15 17:25:33 +01:00
Prathmesh Prabhu 3d4c143b40 altair-lte: early fail connect/disconnect attempts when out of coverage
A firmware bug in Altair ALT3100 bricks the modem when
 - The modem is out of coverage (Registration state is unknown (CEREG: 4))
 - A disconnect attempt is made using the AT%DPDNACT command.

This patch prevents this situation by failing the connect/disconnect attempts in
the altair plugin when registration state is unknown, without attempting to
connect/disconnect the modem.
2013-11-08 08:48:58 +01:00
Prathmesh Prabhu 3c6428fa58 bearer: notify final disconnect status using mm_bearer_report_connection_status
Some MMBearer methods to disconnect the bearer assume that the bearer is
disconnected even if the operation fails in a subclass. This leaves MMBearer
and MMBroadbandBearer states out of sync.

This patch notifies the bearer object of the final disconnection using
mm_bearer_report_connection_status. This gives the subclasses a chance to update
their state even when the disconnection attempt fails.
2013-11-08 08:45:38 +01:00
Aleksander Morgado 1b3114a0f9 modem-helpers: handle +CGDCONT=? replies with single context
https://bugzilla.gnome.org/show_bug.cgi?id=708983
2013-11-01 15:50:12 +01:00
Aleksander Morgado 04b52d590f tests: enable logging if 'ENABLE_TEST_MESSAGE_TRACES' is defined 2013-11-01 15:50:09 +01:00
Aleksander Morgado deaeeec367 x22x: handle QMI modems
With some bits and pieces developed by Dan Williams <dcbw@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710439
2013-10-31 17:12:24 +01:00
Aleksander Morgado fcc2b1be2c altair-lte: fix LDFLAGS in the helper tests 2013-10-31 11:33:26 +01:00
Aleksander Morgado e9523a6abd huawei: clear only once the timeout to wait for the first interface
As soon as we get a match between the current interface being probed, and the
first expected interface to probe, clear the timeout. But this doesn't mean that
this interface being probed will be the correct one, so it may be the case that
we end up expecting a new first interface and probing another one.

With an example probably seen better...

Modem appears with interfaces 2, 3 and 4.

1. We first try to look for interface 0, which is not in the set:
  1.1. Probing interfaces 2, 3 and 4 get deferred.

2. First-interface timeout happens because interface 0 doesn't appear, so we
switch to wait for interface 1:
  2.1 Probing interfaces 2, 3 and 4 get deferred.

3. First-interface timeout happens because interface 1 doesn't appear, so we
switch to wait for interface 2:
  3.1. We get a match on interface 2, which exists. We now remove the
       first-interface timeout and start running the init sequence there.
  3.2. Probing interfaces 3 and 4 get deferred.

4. Init sequence in interface 2 fails, because it is not an AT port, so we
switch to wait for interface 3:
  3.1. We get a match on interface 3, which exists. We do *not* need to remove
now the first-interface timeout because this interface we are testing is
actually the second one which we tried.

So, just check whether the timeout exists or not, and if it exists remove it.
Yeah, this commit just fixes a warning at the end.
2013-10-30 20:18:11 +01:00
Aleksander Morgado 6a26ad7b53 blacklist: include the whole Openmoko VID 2013-10-30 16:12:06 +01:00
Aleksander Morgado b09044bcb3 plugin: for non-AT ports, don't expect vendor/product string probing
When running the pre-probing VID/PID filters, the ports were not filtered out if
the plugin had configured post-probing vendor/product string filters. But, these
post-probing filters are only applicable to AT ports.

From now on, this logic will not be applied to non-serial ports. In other words,
pre-probing VID/PID filters applied to non-serial ports will always result in
the port being filtered out or being allowed, regardless of any additional
vendor/product string post-probing filter configured by the plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=710437
2013-10-28 18:13:14 +01:00
Aleksander Morgado 9c2be510f6 build: ignore built translation files 2013-10-28 17:57:43 +01:00