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 :/
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>
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().
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.
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.
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.
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>
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.
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>
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).
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.
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.
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.
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.
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.
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);
^
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.