base-modem-at: switch to use the MMIfacePortAt by default
The whole codebase is updated to assume the MMBaseModem AT operations require an object implementing the MMIfacePortAt interface, instead of a MMPortSerialAt object. In the places where we know the port is a MMPortSerialAt, e.g. when we query explicitly for the primary or secondary serial AT port, we will use an explicit MM_IFACE_PORT_AT() cast when calling the AT command method. In the places where we get_best_at_port() we're going to assume that we don't know the port type. This method will be updated in a follow up commit to support the MMIfacePortAt interface as well.
This commit is contained in:
committed by
Aleksander Morgado
parent
67a0af3575
commit
480e12c34e
@@ -117,7 +117,7 @@ connect_3gpp_apnsettings_ready (MMBaseModem *modem,
|
||||
ctx = g_task_get_task_data (task);
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"%DPDNACT=1",
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
@@ -200,7 +200,7 @@ connect_3gpp (MMBroadbandBearer *self,
|
||||
command = g_strdup_printf ("%%APNN=%s", apn);
|
||||
g_free (apn);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
10, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
@@ -294,7 +294,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
g_task_set_task_data (task, ctx, (GDestroyNotify)detailed_disconnect_context_free);
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"%DPDNACT=0",
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
|
||||
@@ -359,7 +359,7 @@ handle_cancel_dial (GTask *task)
|
||||
command = g_strdup_printf ("^SWWAN=0,%u,%u",
|
||||
ctx->cid, usb_interface_configs[ctx->usb_interface_config_index].swwan_index);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -409,7 +409,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
/* Send SGAUTH write, if User & Pass are provided.
|
||||
* advance to next state by callback */
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
10,
|
||||
FALSE,
|
||||
@@ -435,7 +435,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
|
||||
if (default_swwan_behavior) {
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -451,7 +451,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
* we'll mark the bearer disconnected later in the callback.
|
||||
*/
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -652,7 +652,7 @@ disconnect_3gpp_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "disconnect step %u/%u: disconnecting PDP CID %u...",
|
||||
ctx->step, DISCONNECT_3GPP_CONTEXT_STEP_LAST, ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
|
||||
@@ -730,7 +730,7 @@ modem_power_off (MMIfaceModem *self,
|
||||
* fires */
|
||||
g_assert (MAX_POWER_OFF_WAIT_TIME_SECS > 5);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^SMSO",
|
||||
5,
|
||||
FALSE, /* allow_cached */
|
||||
|
||||
@@ -988,7 +988,7 @@ run_voice_enable_disable_unsolicited_events (GTask *task)
|
||||
|
||||
if (port) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
ctx->slcc_command,
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -328,7 +328,7 @@ connect_3gpp_context_step (GTask *task)
|
||||
/* If we already sent the connetion command, send the disconnection one */
|
||||
if (ctx->step > CONNECT_3GPP_CONTEXT_STEP_NDISDUP)
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^NDISDUP=1,0",
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -385,7 +385,7 @@ connect_3gpp_context_step (GTask *task)
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -428,7 +428,7 @@ connect_3gpp_context_step (GTask *task)
|
||||
/* Check if connected */
|
||||
ctx->check_count++;
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^NDISSTATQRY?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -440,7 +440,7 @@ connect_3gpp_context_step (GTask *task)
|
||||
|
||||
case CONNECT_3GPP_CONTEXT_STEP_IP_CONFIG:
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^DHCP?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -679,7 +679,7 @@ disconnect_3gpp_context_step (GTask *task)
|
||||
|
||||
case DISCONNECT_3GPP_CONTEXT_STEP_NDISDUP:
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^NDISDUP=1,0",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -717,7 +717,7 @@ disconnect_3gpp_context_step (GTask *task)
|
||||
/* Check if disconnected */
|
||||
ctx->check_count++;
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^NDISSTATQRY?",
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -2382,7 +2382,7 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_enable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -2474,7 +2474,7 @@ modem_3gpp_disable_unsolicited_events (MMIfaceModem3gpp *self,
|
||||
/* Our own disable first */
|
||||
mm_base_modem_at_command_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
"^CURC=0",
|
||||
5,
|
||||
FALSE, /* allow_cached */
|
||||
@@ -3748,7 +3748,7 @@ parent_voice_enable_unsolicited_events_ready (MMIfaceModemVoice *self,
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_voice_enable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -3829,7 +3829,7 @@ parent_voice_disable_unsolicited_events_ready (MMIfaceModemVoice *self,
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_voice_disable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
|
||||
@@ -181,7 +181,7 @@ get_ip_config_3gpp (MMBroadbandBearer *_self,
|
||||
|
||||
command = g_strdup_printf ("%%IPDPADDR=%u", cid);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -362,7 +362,7 @@ disconnect_3gpp (MMBroadbandBearer *bearer,
|
||||
command = g_strdup_printf ("%%IPDPACT=%d,0", cid);
|
||||
mm_base_modem_at_command_full (
|
||||
MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -444,7 +444,7 @@ connect_reset (GTask *task)
|
||||
/* Need to reset the connection attempt */
|
||||
command = g_strdup_printf ("%%IPDPACT=%d,0", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -574,7 +574,7 @@ process_pending_connect_attempt (MMBroadbandBearerIcera *self,
|
||||
/* Try to gather additional info about the connection failure */
|
||||
mm_base_modem_at_command_full (
|
||||
ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"%IER?",
|
||||
60,
|
||||
FALSE,
|
||||
@@ -695,7 +695,7 @@ dial_3gpp (MMBroadbandBearer *_self,
|
||||
|
||||
cmd = g_strdup_printf ("%%IPDPACT=%d,1", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
cmd,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
|
||||
@@ -107,7 +107,7 @@ dial_ready (MMBaseModem *modem,
|
||||
/* Try to get more information why it failed */
|
||||
mm_base_modem_at_command_full (
|
||||
modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CEER",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -163,7 +163,7 @@ service_type_ready (MMBaseModem *modem,
|
||||
* one. */
|
||||
mm_base_modem_at_command_full (
|
||||
modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"ATDT008816000025",
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -209,7 +209,7 @@ connect (MMBaseBearer *self,
|
||||
* default 9600bps (V.32). */
|
||||
mm_base_modem_at_command_full (
|
||||
modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CBST=71,0,1",
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -245,7 +245,7 @@ connect_poll_cb (MMBroadbandBearerMbm *self)
|
||||
self->priv->connect_pending = task;
|
||||
ctx->poll_count++;
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"AT*ENAP?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -316,7 +316,7 @@ activate (GTask *task)
|
||||
/* Activate the PDP context and start the data session */
|
||||
command = g_strdup_printf ("AT*ENAP=1,%d", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
10,
|
||||
FALSE,
|
||||
@@ -389,7 +389,7 @@ authenticate (GTask *task)
|
||||
command = g_strdup_printf ("AT*EIAAUW=%d,1,\"%s\",\"%s\"",
|
||||
ctx->cid, user_enc, password_enc);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -566,7 +566,7 @@ get_ip_config_3gpp (MMBroadbandBearer *self,
|
||||
g_task_set_task_data (task, ctx, (GDestroyNotify)get_ip_config_context_free);
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
"*E2IPCFG?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -707,7 +707,7 @@ disconnect_poll_cb (MMBroadbandBearerMbm *self)
|
||||
self->priv->disconnect_pending = task;
|
||||
ctx->poll_count++;
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"AT*ENAP?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -785,7 +785,7 @@ disconnect_3gpp (MMBroadbandBearer *_self,
|
||||
self->priv->disconnect_pending = task;
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
"*ENAP=0",
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -428,7 +428,7 @@ run_enabling_init_sequence (GTask *task)
|
||||
}
|
||||
|
||||
mm_base_modem_at_sequence_full (self,
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
enabling_modem_init_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -981,7 +981,7 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
|
||||
/* Our own enable now */
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_enable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -1076,7 +1076,7 @@ modem_3gpp_disable_unsolicited_events (MMIfaceModem3gpp *self,
|
||||
/* Our own disable first */
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_disable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
|
||||
@@ -745,7 +745,7 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_enable_sequence,
|
||||
NULL,NULL,NULL,
|
||||
(GAsyncReadyCallback)own_enable_unsolicited_events_ready,
|
||||
@@ -834,7 +834,7 @@ modem_3gpp_disable_unsolicited_events (MMIfaceModem3gpp *self,
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_disable_sequence,
|
||||
NULL, NULL, NULL,
|
||||
(GAsyncReadyCallback)own_disable_unsolicited_events_ready,
|
||||
|
||||
@@ -266,7 +266,7 @@ retry_atz (GTask *task)
|
||||
ctx = g_task_get_task_data (task);
|
||||
|
||||
mm_base_modem_at_command_full (self,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"Z",
|
||||
6,
|
||||
FALSE,
|
||||
|
||||
@@ -251,7 +251,7 @@ connect_3gpp_qmistatus (GTask *task)
|
||||
|
||||
mm_base_modem_at_command_full (
|
||||
ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"$NWQMISTATUS",
|
||||
3, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
@@ -309,7 +309,7 @@ connect_3gpp_authenticate (GTask *task)
|
||||
g_free (password);
|
||||
mm_base_modem_at_command_full (
|
||||
ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
10, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
@@ -450,7 +450,7 @@ disconnect_3gpp_qmistatus (GTask *task)
|
||||
|
||||
mm_base_modem_at_command_full (
|
||||
ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"$NWQMISTATUS",
|
||||
3, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
@@ -505,7 +505,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
|
||||
mm_base_modem_at_command_full (
|
||||
ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"$NWQMIDISCONNECT",
|
||||
10, /* timeout */
|
||||
FALSE, /* allow_cached */
|
||||
|
||||
@@ -201,7 +201,7 @@ get_ip_config_3gpp (MMBroadbandBearer *self,
|
||||
command = g_strdup_printf ("AT_OWANDATA=%d", cid);
|
||||
mm_base_modem_at_command_full (
|
||||
MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -283,7 +283,7 @@ connect_reset (GTask *task)
|
||||
/* Need to reset the connection attempt */
|
||||
command = g_strdup_printf ("AT_OWANCALL=%d,0,1", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -477,7 +477,7 @@ authenticate_ready (MMBaseModem *modem,
|
||||
/* Success, activate the PDP context and start the data session */
|
||||
command = g_strdup_printf ("AT_OWANCALL=%d,1,1", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -570,7 +570,7 @@ authenticate (GTask *task)
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -693,7 +693,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
/* Use specific CID */
|
||||
command = g_strdup_printf ("AT_OWANCALL=%d,0,0", cid);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
|
||||
@@ -525,7 +525,7 @@ disable_location_gathering (MMIfaceModemLocation *self,
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
gps_control,
|
||||
MM_IFACE_PORT_AT (gps_control),
|
||||
"_OGPS=0",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -639,7 +639,7 @@ parent_enable_location_gathering_ready (MMIfaceModemLocation *_self,
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
gps_control,
|
||||
MM_IFACE_PORT_AT (gps_control),
|
||||
"_OGPS=2",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -723,7 +723,7 @@ setup_ports (MMBroadbandModem *self)
|
||||
* maybe ModemManager got rebooted and it was left enabled before. We'll make
|
||||
* sure that it is disabled when we initialize the modem */
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
gps_control_port,
|
||||
MM_IFACE_PORT_AT (gps_control_port),
|
||||
"_OGPS=0",
|
||||
3, FALSE, FALSE, NULL, NULL, NULL);
|
||||
|
||||
|
||||
@@ -1000,7 +1000,7 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
|
||||
/* Our own enable now */
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_enable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -1097,7 +1097,7 @@ modem_3gpp_disable_unsolicited_events (MMIfaceModem3gpp *self,
|
||||
/* Our own disable first */
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
unsolicited_disable_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
|
||||
@@ -116,10 +116,10 @@ load_connection_status (MMBaseBearer *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task;
|
||||
MMBaseModem *modem = NULL;
|
||||
MMPortSerialAt *port;
|
||||
gint profile_id;
|
||||
GTask *task;
|
||||
MMBaseModem *modem = NULL;
|
||||
MMIfacePortAt *port;
|
||||
gint profile_id;
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
|
||||
@@ -138,7 +138,7 @@ load_connection_status (MMBaseBearer *self,
|
||||
g_task_set_task_data (task, GUINT_TO_POINTER ((guint)profile_id), NULL);
|
||||
|
||||
/* If no control port available, error out */
|
||||
port = mm_base_modem_peek_best_at_port (modem, NULL);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (modem, NULL));
|
||||
if (!port) {
|
||||
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
|
||||
"Couldn't load connection status: no control port available");
|
||||
@@ -305,7 +305,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
|
||||
case DIAL_3GPP_STEP_PS_ATTACH:
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CGATT=1",
|
||||
10,
|
||||
FALSE,
|
||||
@@ -382,7 +382,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -405,7 +405,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
|
||||
command = g_strdup_printf ("!SCACT=1,%d", ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -536,7 +536,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
/* Use specific CID */
|
||||
command = g_strdup_printf ("!SCACT=0,%u", cid);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (modem),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
|
||||
@@ -765,7 +765,7 @@ load_current_modes (MMIfaceModem *self,
|
||||
}
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
"!SELRAT?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -883,7 +883,7 @@ set_current_modes (MMIfaceModem *self,
|
||||
|
||||
command = g_strdup_printf ("!SELRAT=%d", idx);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -585,7 +585,7 @@ run_voice_enable_disable_unsolicited_events (GTask *task)
|
||||
|
||||
if (port) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
ctx->clcc_command,
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -620,7 +620,7 @@ qss_setup_step (GTask *task)
|
||||
return;
|
||||
case QSS_SETUP_STEP_ENABLE_PRIMARY_PORT:
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"#QSS=1",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -632,7 +632,7 @@ qss_setup_step (GTask *task)
|
||||
case QSS_SETUP_STEP_ENABLE_SECONDARY_PORT:
|
||||
if (ctx->secondary) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
"#QSS=1",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -1457,7 +1457,7 @@ own_enable_unsolicited_events (GTask *task)
|
||||
/* Our own enable now */
|
||||
mm_base_modem_at_command_full (
|
||||
MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
/* Enable +CIEV only for: signal, service, roam */
|
||||
"AT+CIND=0,1,1,0,0,0,1,0,0",
|
||||
5,
|
||||
|
||||
@@ -973,7 +973,7 @@ voice_unsolicited_events_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "%s extended call status reporting in primary port...",
|
||||
ctx->enable ? "enabling" : "disabling");
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->ucallstat_command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -991,7 +991,7 @@ voice_unsolicited_events_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "%s extended call status reporting in secondary port...",
|
||||
ctx->enable ? "enabling" : "disabling");
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
ctx->ucallstat_command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -1009,7 +1009,7 @@ voice_unsolicited_events_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "%s DTMF detection and reporting in primary port...",
|
||||
ctx->enable ? "enabling" : "disabling");
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->udtmfd_command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -1027,7 +1027,7 @@ voice_unsolicited_events_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "%s DTMF detection and reporting in secondary port...",
|
||||
ctx->enable ? "enabling" : "disabling");
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
ctx->udtmfd_command,
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
@@ -1115,7 +1115,7 @@ gps_engine_start (GTask *task)
|
||||
g_assert (priv->gps_port);
|
||||
cmd = g_strdup_printf ("AT+XLCSLSR=%u,%u,,,,,1,,,1,118,0", transport_protocol, pos_mode);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
priv->gps_port,
|
||||
MM_IFACE_PORT_AT (priv->gps_port),
|
||||
cmd,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -1292,7 +1292,7 @@ gps_engine_stop (GTask *task)
|
||||
NULL);
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
priv->gps_port,
|
||||
MM_IFACE_PORT_AT (priv->gps_port),
|
||||
"+XLSRSTOP",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -1697,7 +1697,7 @@ mm_shared_xmm_setup_ports (MMBroadbandModem *self)
|
||||
|
||||
/* make sure GPS is stopped in case it was left enabled */
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
gps_port,
|
||||
MM_IFACE_PORT_AT (gps_port),
|
||||
"+XLSRSTOP",
|
||||
3, FALSE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user