Commit Graph

1732 Commits

Author SHA1 Message Date
Aleksander Morgado
e3766aef5d dell,dw5821e: also report QMI PDC based update available 2019-01-03 18:53:52 +00:00
Aleksander Morgado
87712c27f5 api,firmware: MMModemFirmwareUpdateMethod as flags, not enum
Devices may require/support more than one update method, so instead of
reporting the method as a single enum value, use a set of flags
instead.
2019-01-03 18:53:52 +00:00
Aleksander Morgado
fc02b1320c quectel: report fastboot-based firmware update method and settings
We'll check for AT+QFASTBOOT support during runtime.
2019-01-03 18:53:52 +00:00
Aleksander Morgado
4b21546f53 dell,dw5821e: report fastboot-based firmware update method and settings
The DW5821e uses the AT^FASTBOOT command to reset the module in
fastboot mode, ready to download new firmware.

Note: we cannot use AT^FASTBOOT=? to query for support, as that
command also triggers the reset :/
2019-01-03 18:53:52 +00:00
Khem Raj
2b18af89b4 Do not pass null string to %s printf formatted string
Here the string is already decided to be NULL and passing
a null pointer to %s will not work

Fixes
error: '%s' directive argument is null

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-18 23:30:10 -08:00
Aleksander Morgado
1a14b687de ublox,tests: avoid using deprecated band symbols 2018-12-16 09:20:35 +01:00
Aleksander Morgado
7d9c7e0bf4 telit: avoid using deprecated band symbols 2018-12-16 09:20:25 +01:00
Ben Chan
0d6e2dc9f5 altair-lte: use mm_autoptr instead of g_autoptr
commit 397faef3c5 ("mm-common-helpers: add mm_autoptr helpers for
GRegex and GMatchInfo") introduces mm_autoptr(), which implements
g_autoptr() that isn't available before glib 2.44. This patch fixes the
code to consistently uses mm_autoptr().
2018-12-13 10:48:21 +01:00
LiuQiFeng
26e269ec70 dell: support XMM-based devices 2018-12-10 13:13:53 +01:00
Aleksander Morgado
f4941ede66 xmm,dell: add defaults for MBIM-derived objects
For subclasses of MMBroadbandModemMbim, also apply the same property
defaults. E.g. we want to avoid peridic signal quality polling and we
also want to report that SIM hot swap is supported.
2018-12-07 16:23:21 +00:00
Dan Williams
397faef3c5 mm-common-helpers: add mm_autoptr helpers for GRegex and GMatchInfo
Alias them to g_autoptr() on glib >= 2.44, otherwise re-implement.
2018-12-04 17:39:15 +00:00
Aleksander Morgado
cc6a286cc4 dell: don't ignore ttyUSB1 in the DW5821e
This port was ignored because it was non-functional in early
development firmware images, and made device probing very slow.

This has been solved in the first production images of the DW5821e
module.
2018-11-12 12:28:41 +01:00
Ben Chan
bf1b396596 tests: use memcmp() instead of g_assert_cmpmem() for now
g_assert_cmpmem() isn't available until glib 2.46, while the minimum
glib version required by ModemManager is 2.36. This patch replaces the
uses of g_assert_cmpmem() with memcmp() instead.
2018-11-08 17:00:59 +01:00
Sven Schwermer
98fbc7a8b3 ublox: Add CDC-ECM support for SARA/LISA-U2xx
The SARA-U2xx and LISA-U20x require the PDP context to be activated via
+UCEDATA instead of +CGACT=1 when using the CDC-ECM USB profile.
Furthermore, they expect the DHCP discover packet from the TE while the
command is running, i.e. while the modem has not replied yet. In order
to achieve that, the bearer is marked as connected as soon as the
command is issued. This makes the NetworkManager start the DHCP process.
If the modem replies with an error, the bearer will be marked
disconnected later on.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2018-10-31 11:07:39 +01:00
Ben Chan
b76db60313 ublox: fix username and password passed to +UAUTHREQ 2018-10-26 10:56:57 -07:00
Ben Chan
408a2a9c6c altair-lte: migrate from SubscriptionState to Pco property
In preparation of deprecating the SubscriptionState property in the
Modem3gpp interface, this CL updates the altair-lte plugin to update the
Pco property in the Modem3gpp interface upon receiving %PCOINFO
notification.
2018-10-26 09:41:44 -07:00
Ben Chan
beb1aab178 sierra: remove unused 'self' variable in scact_periodic_query_ready() 2018-10-22 11:23:29 +02:00
Ben Chan
14ca3efb7f xmm: remove unused 'priv' variable in xact_query_bands_ready() 2018-10-20 13:57:18 +02:00
Ben Chan
7de6b6f2e1 core: remove unnecessary NULL checks for g_match_info_free()
g_match_info_free() already check if the given pointer is NULL and does
nothing on a NULL pointer.
2018-10-18 13:17:36 +02:00
Aleksander Morgado
4156fd2718 xmm: implement A-GPS support 2018-10-17 11:18:36 +02:00
Aleksander Morgado
2ffd0adf05 xmm: implement XLCSLSR based GPS management and report 2018-10-17 11:17:11 +02:00
Aleksander Morgado
c9a56605ca huawei,call: check for ^CVOICE support and enable audio streaming
USB sticks only support voice if ^CVOICE returns 0.  And to enable audio
streaming on the "Application" port (whatever is returned by AT^DDSETEX=?)
we need to send AT^DDSETEX=<port> after starting the call.  After that
the serial port will send and accept signed 16-bit 8000hz PCM audio, or
whatever format is returned by ^CVOICE?.

This patch is a rework of the original implementation by:
Dan Williams <dcbw@redhat.com>
2018-10-16 17:09:21 +00:00
Aleksander Morgado
16162a5033 ublox: implement detailed call state transitions with +UCALLSTAT
Among other things, we now support:
  * Dialing to Ringing Out transition.
  * Ringing Out to Active transition.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
887376fe44 mm-iface-mode: provide direction and number when creating calls
Calls created from property bundles are always outgoing, while calls
created as input events from URCs during runtime are always incoming.

This change makes it mandatory to provide at least direction of the
call when the object is created, leaving the number as an optional
property that may or may not be known in advance (e.g. it would be
optional only for incoming calls).
2018-10-16 17:09:21 +00:00
Aleksander Morgado
fc0feee654 huawei,call: handle in-call URCs in the call object itself
Instead of handling the URCs in the modem object and using the
MMIfaceModem as a bridge to report the status read from the URC to a
call obtained from the MMCallList... just handle the URCs in the call
object itself.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
f71e120fb7 huawei: ignore voice origination info URCs
These are not used for anything, so just simplify code.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
ae917d03fd huawei: if URCs fully ignored always, don't treat them as voice-specific 2018-10-16 17:09:21 +00:00
Aleksander Morgado
65ae18118e huawei,call: remove custom start() method
Totally equivalent to the default one in the MMBaseCall object.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
0478e88b4f base-call: listen for connection error URCs in-call
In order to detect state changes while we're in-call, we have to
monitor the standard connection errors we're used to, but have them
processed as URCs instead of as responses to ATD requests.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
0090124ec0 base-call: ACTIVE after start() if detailed transitions unavailable
The most detailed call state transition flow for a new outgoing call
would be:

  UNKNOWN -> DIALING -> RINGING -> ACTIVE

But, if the modem doesn't support reporting intermediate states
(e.g. DIALING or RINGING) then a successful start() should imply
getting into ACTIVE state right away.

For now, only the Huawei plugin implements the detailed transition
support, so make them configurable via call object properties.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
fa67a4f9bb sierra-legacy: implement connection status monitoring with !SCACT?
Devices like the Netgear AC313U require explicit context monitoring,
otherwise the device may end up disconnected internally and MM would
still think that the connection is ongoing.
2018-10-09 14:34:59 +00:00
Aleksander Morgado
77387cf604 xmm: increase AT command timeout when updating bands/modes
Looks like sometimes it may take a bit more than 3s.
2018-09-13 15:17:54 +02:00
Aleksander Morgado
2f14012399 xmm: minor alignment fixes 2018-09-13 09:30:02 +02:00
Aleksander Morgado
823aa46a14 xmm: ensure outputs in load_values_finish() are always set if success 2018-09-13 09:26:19 +02:00
Paul Bartell
6b30f552a9 xmm: implement signal interface with +XCESQ polling 2018-09-13 07:17:51 +00:00
Paul Bartell
73045e931b xmm: add +XCESQ parser 2018-09-13 07:17:51 +00:00
Aleksander Morgado
6e5ea39cba dell: implement Unmanaged GPS support for the DW5821e
The DW5821E module is managed in MBIM mode by default, and exposes a
NMEA capable tty in USB interface #4.

Enabling/disabling the NMEA output via the TTY is done with AT
commands, so this implementation requires also a valid AT port in the
system.

Given that the AT commands used to enable/disable this feature are
based on modifying non-volatile memory through AT^NV, this
implementation is very specific to the DW5821E. If we're able to do
the same on other Dell modules in the future, we'll just rename the
new object to a more generic one.
2018-09-12 18:48:41 +00:00
Aleksander Morgado
02f9b5b085 dell: port type hints for the Dell DW5821e
Include port type hints to make probing quicker, and ignore the
secondary AT port as it may not be fully functional.
2018-09-12 18:48:41 +00:00
Aleksander Morgado
eb01914bd0 ublox: implement custom ICCID loading
Use AT+CCID to query the SIM ICCID, and fallback to parent's +CRSM
based method otherwise.
2018-09-12 17:17:36 +00:00
Aleksander Morgado
a19be8952f cinterion: report selected RTS/CTS flow control to modem 2018-09-12 17:15:46 +00:00
Aleksander Morgado
5f3c415722 iridium: report selected RTS/CTS flow control to modem 2018-09-12 17:15:46 +00:00
Ben Chan
7c5cfa13a1 xmm: include string.h for strlen()
This patch fixes the following compiler warning:

xmm/mm-modem-helpers-xmm.c:388:38: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
    g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &inner_error);
                                     ^
2018-08-21 23:11:29 +02:00
Aleksander Morgado
59e79c996b cinterion: new 'MMSharedCinterion' interface
Implement a new interface to keep the code shared between the QMI and
non-QMI modem implementations.

While doing that, also fix the parent interface pointer handling, so
that it isn't a static pointer applicable to all modems, and make it a
per-modem specific pointer. Without this fix, ModemManager would crash
if e.g. running with both a QMI and non-QMI Cinterion modem at the
same time.

The new shared Cinterion logic will be in charge of managing all GPS
sources not already managed by the parent interface. E.g. if the
parent implementation already supports QMI-based GPS location (using
the LOC service for example) prefer that to the custom AT-based
logic.
2018-08-21 17:06:55 +00:00
Aleksander Morgado
6e9bf39ecf xmm: implement power management operations 2018-08-21 17:02:39 +00:00
Aleksander Morgado
36e09ef441 fibocom: include udev rules tests 2018-08-21 17:02:39 +00:00
Aleksander Morgado
475e182819 fibocom: support XMM-based devices 2018-08-21 17:02:39 +00:00
Aleksander Morgado
f2c508f8b9 xmm: new 'MMBroadbandModemMbimXmm' modem object 2018-08-21 17:02:39 +00:00
Aleksander Morgado
656102633c xmm: new 'MMBroadbandModemXmm' modem object 2018-08-21 17:02:39 +00:00
Aleksander Morgado
917b23bbc7 xmm: new 'MMSharedXmm' modem interface
With support for managing bands and modes.
2018-08-21 17:02:39 +00:00
Aleksander Morgado
6262e844f5 xmm: new helper to get 'any' allowed mode combination 2018-08-21 17:02:39 +00:00