cinterion: Configure the PLAS9 to correctly send Unsolicited Result Codes.

The PLS8 and PLAS9 modems (and likely many others modems supported by
this driver) have two AT capable serial ports: The 'MODEM' AT port
(default for PPP) and the 'APPLICATION' AT port (used for general
control).

The PLS8 modem sends URCs to the APPLICATION port by default, while he
PLAS9 defaults sending URCs to the MODEM port. To get URCs to behave
on both modems, it is necessary to explicitly set the URC reporting
port to APPLICATION.
This commit is contained in:
Jessy Diamond Exum
2020-08-26 13:52:04 -07:00
committed by Aleksander Morgado
parent af5c242e92
commit b1679b5893

View File

@@ -805,17 +805,17 @@ sind_psinfo_enable_ready (MMBaseModem *_self,
}
static void
parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *_self,
GAsyncResult *res,
GTask *task)
set_urc_dest_port_ready (MMBaseModem *_self,
GAsyncResult *res,
GTask *task)
{
MMBroadbandModemCinterion *self;
g_autoptr(GError) error = NULL;
self = MM_BROADBAND_MODEM_CINTERION (_self);
if (!iface_modem_3gpp_parent->enable_unsolicited_events_finish (_self, res, &error))
mm_obj_warn (self, "couldn't enable parent 3GPP unsolicited events: %s", error->message);
if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (_self), res, &error))
mm_obj_dbg (self, "couldn't guarantee unsolicited events are sent to the correct port: %s", error->message);
if (self->priv->sind_psinfo_support == FEATURE_SUPPORTED) {
/* Enable access technology update reporting */
@@ -832,6 +832,25 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *_self,
g_object_unref (task);
}
static void
parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
GAsyncResult *res,
GTask *task)
{
g_autoptr(GError) error = NULL;
if (!iface_modem_3gpp_parent->enable_unsolicited_events_finish (self, res, &error))
mm_obj_warn (self, "couldn't enable parent 3GPP unsolicited events: %s", error->message);
/* Make sure unsolicited events are sent to an AT port (PLS9 can default to DATA port) */
mm_base_modem_at_command (MM_BASE_MODEM (self),
"^SCFG=\"URC/DstIfc\",\"app\"",
5,
FALSE,
(GAsyncReadyCallback)set_urc_dest_port_ready,
task);
}
static void
modem_3gpp_enable_unsolicited_events (MMIfaceModem3gpp *self,
GAsyncReadyCallback callback,