Commit Graph
2430 Commits
Author SHA1 Message Date
Nick Stevens eaf65ed98d core: process SMS +CGMR response with regex
Variability in the response style from certain modems causes the parsing
of the +CGMR response to fail. For example, the Telit HE910 inserts an
empty string ("") in the second field of the response, causing the
sscanf implementation to fail.

This patch converts the parsing of the CGMR response to a regex that
allows for more flexibility and robustness, and adds unit tests around
the parsing call.

Signed-off-by: Nick Stevens <Nick.Stevens@digi.com>
2015-09-22 09:24:18 +02:00
Aleksander Morgado 8df7f83278 broadband-modem: minor coding style fixes 2015-09-15 16:34:50 +02:00
Aleksander Morgado 7f47f13673 broadband-modem: don't issue failure setting up messaging in secondary port as a warning 2015-09-15 16:33:48 +02:00
Nick Stevens 48cd903189 core: enable unsolicited messages on secondary
Previously the enable unsolicited messages command (+CNMI) was only
being sent on the primary. This patch adds support for sending the
enable on the secondary as well. If the secondary doesn't exist, or if
setting the enable causes an error, a warning is logged but no error is
propagated up.

This change is needed for proper SMS operation on the Telit HE910, which
requires that +CNMI be sent to both primary and secondary. Since a
failure to send the +CNMI command on the secondary is a non-fatal error,
it is unlikely that this will cause issues with other modems.

Signed-off-by: Nick Stevens <Nick.Stevens@digi.com>
2015-09-15 16:26:03 +02:00
Dan Williams 2034918d7b broadband-modem-mbim: disable CDMA capabilities until we actually support MBIM+CDMA
CDMA-capable modems (like a Sierra EM7355) will fail to even enable,
because the internal CDMA code tries to initialize using AT commands and
that fails because many MBIM modems don't have an AT port.  We should
figure out how to support minimal MBIM + CDMA using MBIM instead of
AT-anything.

[mm-broadband-modem.c:9000] enabling_step(): Modem has CDMA capabilities, enabling the Modem CDMA interface...
[mm-iface-modem-cdma.c:946] mm_iface_modem_cdma_run_registration_checks(): Running registration checks (CDMA1x: 'yes', EV-DO: 'yes')
[mm-broadband-modem.c:7397] setup_registration_checks_context_complete_and_free(): Will skip all QCDM-based registration checks
[mm-broadband-modem.c:7418] setup_registration_checks_context_complete_and_free(): Will skip generic detailed registration check, we don't have Sprint commands
[mm-iface-modem-cdma.c:768] registration_check_step(): Starting QCDM-based registration checks
[mm-iface-modem-cdma.c:780] registration_check_step():   Skipping all QCDM-based checks and falling back to AT-based checks
[mm-iface-modem-cdma.c:823] registration_check_step(): Starting AT-based registration checks
[mm-iface-modem-cdma.c:641] get_service_status_ready(): Could not get service status: No AT port available to run command
[mm-iface-modem.c:1392] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> disabled)
2015-08-31 10:49:16 -05:00
Aleksander Morgado 0e7fc1dff9 blacklist: include MediaTek preloader
https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1473246
2015-08-25 18:53:30 +02:00
Marco Bascetta 74325b547a core,libmm-glib,cli,voice: Replaced 'SendTone' method and 'ToneReceived' signal with 'SendDtmf' and 'DtmfReceived' 2015-08-02 10:39:48 +02:00
Aleksander Morgado 9f3801df3f core,voice: remove explicit "NO CARRIER" response matching
This response is already managed by the generic AT serial port and translates
it into a proper error. This change also avoids the Call.Start() call to report
a timeout in the serial port, instead we get a proper no-carrier error.

Before:

    $ sudo mmcli -m 0 --voice-create-call="number=12345678"
    Successfully created new call:
	    /org/freedesktop/ModemManager1/Call/1 outgoing (unknown)
    $ sudo mmcli -o 1 --start
    error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.ResponseTimeout: Serial command timed out'

After:

    $ sudo mmcli -m 0 --voice-create-call="number=12345678"
    Successfully created new call:
	    /org/freedesktop/ModemManager1/Call/1 outgoing (unknown)
    $ sudo mmcli -o 1 --start
    error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Connection.NoCarrier: No carrier'
2015-08-02 10:39:48 +02:00
Aleksander Morgado e75d888b51 core,voice: minor coding style fixes 2015-08-02 10:39:48 +02:00
Marco Bascetta f67cc37956 iface-modem-voice: cleaned error debug messages 2015-08-02 10:39:47 +02:00
Marco Bascetta 9874f10e1f base-call,iface-modem-voice:: handle DTMF 2015-08-02 10:39:47 +02:00
Riccardo Vangelisti 40fae5fcba base-call: refactoring of error handling when call starts 2015-08-02 10:39:47 +02:00
Marco Bascetta bf416045df huawei: acquire incoming DTMF on active call 2015-08-02 10:39:47 +02:00
Marco Bascetta 55ae2c7f2f huawei: handle voice call state changes 2015-08-02 10:39:47 +02:00
Riccardo Vangelisti 5a281dbd34 base-call: created an unique function to switch call's state and reason 2015-08-02 10:39:47 +02:00
Marco Bascetta 65a64c9248 core: set number of incoming call 2015-08-02 10:39:47 +02:00
Riccardo Vangelisti 94c8371076 base-call: fixed bug when hangup call.
Ok, busy and no carrier messages are handled by serial-parser.
2015-08-02 10:39:13 +02:00
Marco Bascetta 6d85146bba core: handle incoming calls (RING/CRING, CLIP, NO CARRIER). 2015-08-02 10:39:13 +02:00
Riccardo Vangelisti c53bc10092 base-call: added deletion of a specified call 2015-08-02 10:39:12 +02:00
Riccardo Vangelisti ecbd146d5a fixes: added voice support in libmm-glib MMManager, also fixed wrong number of parameters in mm-call-list class init 2015-08-02 10:39:12 +02:00
Riccardo Vangelisti 5c9e2488bf build: added voice call include in libmm-glib and modified Makefile.am 2015-08-02 10:39:12 +02:00
Riccardo Vangelisti 5c446c3f43 broadband-modem: added voice call support 2015-08-02 10:39:12 +02:00
Riccardo Vangelisti 886e2963df core: implemented MMIfaceModemVoice interface 2015-08-02 10:39:12 +02:00
Riccardo Vangelisti ec5c539f55 core: implemented new MMBaseCall object 2015-08-02 10:39:12 +02:00
Aleksander Morgado 0337781ba7 base-manager: plug memleak
Don't g_strdup() the physdev string to store it in the hash table; instead store
the original string right away as it is already created with g_strdup_printf().

Reported by: Yunlian Jiang <yunlian@chromium.org>

https://code.google.com/p/chromium/issues/detail?id=515929
2015-08-02 09:03:20 +02:00
Dan Williams 9b051b14ed iface-modem: don't check the cache when asking for required unlocks
When passing known_lock=UNKNOWN to mm_iface_modem_update_lock_info()
we actually do want to ask the modem itself for locks instead of
checking the cache.  For example, when an unknown error is returned
after performing PIN/PUK operations, the cache value may well be
NONE if that was the prior lock state, and that bypasses the modem
which might now be locked.  Thus the state gets messed up.

Reproducer is to send 'ChangePin' with the wrong "old" PIN 3 times,
then send a wrong PUK.  No error was returned from mmcli and
the modem's lock state was shown as 'none'.
2015-07-20 12:24:22 -05:00
Dan Williams ad2c2ad14c blacklist: ignore POSNET POLSKA S.A. devices 2015-07-02 10:30:58 -05:00
Aleksander Morgado e09463dfb2 blacklist: ignore Palm M5xx devices
https://bugs.freedesktop.org/show_bug.cgi?id=91032
2015-06-19 12:20:21 -07:00
Aleksander Morgado 0ac7feb797 broadband-modem-qmi: retry unlock checks on 'UimUninitialized' errors
The Pantech UML290 takes a horribly great time to initialize the SIM, and
therefore we may even be losing the 3GPP capabilities as the SIM is not
detected during the initial checks:

    load_unlock_required_ready(): Couldn't check if unlock required: 'SIM failure: QMI protocol error (37): 'UimUninitialized''
    current_capabilities_internal_load_unlock_required_ready(): Multimode device without SIM, no 3GPP capabilities

To avoid this, let 'UimUninitialized' be a retriable error.
2015-06-05 22:45:53 +02:00
David McCullough d5fb4284e1 qmi: fix '0' prefixed IMEI/ESN/MEID on QMI modems
QMI modems are incorrectly ignoring IMEI/ESN/MEID numbers that start with a
'0'.  Fix this up.  Seen on an AT&T Beam (340u)

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2015-05-28 09:41:42 +02:00
Aleksander Morgado 4fcae938fc build: request to generate the enum types support files before building
Instead of providing explicit dependency rules to generate the enum types
support files before they're first used, just pre-generate them before building
anything. Maintaining the explicit dependency rules is not really worth it.
2015-05-04 09:27:58 +02:00
Aleksander Morgado cc5f731102 blacklist: ignore all devices from Access Interface Solutions 2015-04-10 12:45:33 +02:00
Dan Williams 9293fd2bca base-manager: quiet message about unsupported ports
This message gets printed for all netdevs and ttys, including most
machines normal ethernet/Wi-Fi interfaces.  It seems a bit less critical
than 'warning' level would indicate.

ModemManager[32097]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by any plugin
ModemManager[32097]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0': not supported by any plugin
2015-03-31 11:25:35 -05:00
Jason Simmons 3ad64c8f5a broadband-modem: default implementation of the network time interface
Add a default implementation that queries the real-time clock using the
AT+CCLK? command.  Also set AT+CTZU=1 in case a modem requires it.
2015-03-23 11:31:32 +01:00
Daniele Palmas 61ced36f83 Adding IMC flashing device in blacklist 2015-03-06 16:23:07 +01:00
Aleksander Morgado 6a8fbf917a iface-modem: don't artificially forbid power updates when in OFF state
If for any reason the modem is in OFF state and still can talk to the modem,
allow running the remaining transition requests to LOW or ON. This can happen
for example for modems that use CFUN:0, i.e. which can still go online with
CFUN=1.

https://bugs.freedesktop.org/show_bug.cgi?id=89368
2015-03-02 14:38:02 +01:00
Aleksander Morgado 28d4bb932c greylist: add Cypress USB<->RS232 adapters
https://bugs.freedesktop.org/show_bug.cgi?id=89362
2015-02-27 17:30:43 +01:00
Aleksander Morgado 0a31a466cb bearer,qmi: also print IPv6 gateway prefix 2015-02-26 12:37:20 +01:00
Aleksander Morgado 2dbebbd0bf bearer-qmi: avoid unref-ing arrays owned by the output bundles
When we get an array from a libqmi output or input bundle, the array is always
owned by the bundle (i.e. transfer-none).
2015-02-26 10:37:23 +01:00
Dan Williams 9186e2aa39 iface-modem-3gpp: used DENIED registration state if others are UNKNOWN
If all other registration states are UNKNOWN, use a registration state
of DENIED as the global modem state.
2015-02-23 10:25:14 -06:00
Aleksander Morgado 37bda21a37 plugin: add implicit QMI and MBIM forbidden drivers check 2015-02-18 20:00:01 +01:00
Aleksander Morgado 3c6a7ed3f3 plugin-manager: make sure there is some wait time before probing the first port
We really do need a wait time to make sure most ports are exposed by the
kernel, so that plugin filters based on "forbidden-drivers" work correctly. E.g.
the "gobi" plugin now flags as forbidden the "qmi_wwan" driver, which means that
modems exposing both TTYs and QMI/WWAN ports should never be handled by the Gobi
plugin.
2015-02-16 17:30:38 +01:00
Aleksander Morgado 07fcb807dd plugin: allow having both 'drivers' and 'forbidden drivers' filters 2015-02-16 17:30:38 +01:00
Aleksander Morgado 51ab292802 plugin: let vendor/product filter be complementary
So that a plugin can specify a full VID and a specific PID subset of another VID
as supported.
2015-02-16 17:30:38 +01:00
Aleksander Morgado 7133d72f69 ports: move serial parsers to the internal libports 2015-02-11 19:39:03 +01:00
Aleksander Morgado 9b2b46e2be broadband-modem-qmi: don't try FCC auth if the first Set Operating Mode succeeds 2015-02-10 18:21:30 +01:00
Aleksander Morgado a83d1c70b1 broadband-modem-qmi: use 'DMS Set FCC Authentication' if online mode fails
Some new devices, like the Dell DW5770, will return an internal error when
trying to bring the power mode to online. We can avoid this by sending the
magic "DMS Set FCC Auth" message before retrying.

Bumping libqmi version to 1.13.4, which is the one that supports this new
message.

https://bugzilla.kernel.org/show_bug.cgi?id=92101
2015-02-07 21:39:15 +01:00
Aleksander Morgado b6f8e5f08d suspend: invalidate and remove modems on suspend, reprobe on resume 2015-02-07 12:57:48 +01:00
Aleksander Morgado 132fbb0a7f suspend: port upower backend to GDBus 2015-02-07 12:57:48 +01:00
Aleksander Morgado a92b6f286b suspend: imported suspend/resume support from NetworkManager
We're going to make this optional during build, not mandatory as was the case
in NM.
2015-02-07 12:57:48 +01:00