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
+2
-2
@@ -1048,11 +1048,11 @@ call_start (MMBaseCall *self,
|
||||
GError *error = NULL;
|
||||
GTask *task;
|
||||
gchar *cmd;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
|
||||
port = mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self->priv->modem), &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self->priv->modem), &error));
|
||||
if (!port) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
|
||||
+12
-13
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "mm-base-modem-at.h"
|
||||
#include "mm-errors-types.h"
|
||||
#include "mm-iface-port-at.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Port setup/teardown logic, to prepare a port to be able to run an
|
||||
@@ -255,7 +254,7 @@ at_sequence_parse_response (MMIfacePortAt *port,
|
||||
|
||||
void
|
||||
mm_base_modem_at_sequence_full (MMBaseModem *self,
|
||||
MMPortSerialAt *port,
|
||||
MMIfacePortAt *port,
|
||||
const MMBaseModemAtCommand *sequence,
|
||||
gpointer response_processor_context,
|
||||
GDestroyNotify response_processor_context_free,
|
||||
@@ -276,12 +275,12 @@ mm_base_modem_at_sequence_full (MMBaseModem *self,
|
||||
task = g_task_new (self, task_cancellable, callback, user_data);
|
||||
|
||||
/* Ensure that we have the port ready */
|
||||
if (!setup_port (MM_IFACE_PORT_AT (port), task))
|
||||
if (!setup_port (port, task))
|
||||
return;
|
||||
|
||||
/* Setup context */
|
||||
ctx = g_slice_new0 (AtSequenceContext);
|
||||
ctx->port = MM_IFACE_PORT_AT (g_object_ref (port));
|
||||
ctx->port = g_object_ref (port);
|
||||
ctx->current = ctx->sequence = sequence;
|
||||
ctx->response_processor_context = response_processor_context;
|
||||
ctx->response_processor_context_free = response_processor_context_free;
|
||||
@@ -320,11 +319,11 @@ mm_base_modem_at_sequence (MMBaseModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MMPortSerialAt *port;
|
||||
GError *error = NULL;
|
||||
MMIfacePortAt *port;
|
||||
GError *error = NULL;
|
||||
|
||||
/* No port given, so we'll try to guess which is best */
|
||||
port = mm_base_modem_peek_best_at_port (self, &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (self, &error));
|
||||
if (!port) {
|
||||
g_task_report_error (self, callback, user_data, mm_base_modem_at_sequence, error);
|
||||
return;
|
||||
@@ -534,7 +533,7 @@ at_command_ready (MMIfacePortAt *port,
|
||||
|
||||
void
|
||||
mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
MMPortSerialAt *port,
|
||||
MMIfacePortAt *port,
|
||||
const gchar *command,
|
||||
guint timeout,
|
||||
gboolean allow_cached,
|
||||
@@ -556,11 +555,11 @@ mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
task = g_task_new (self, task_cancellable, callback, user_data);
|
||||
|
||||
/* Ensure that we have the port ready */
|
||||
if (!setup_port (MM_IFACE_PORT_AT (port), task))
|
||||
if (!setup_port (port, task))
|
||||
return;
|
||||
|
||||
ctx = g_slice_new0 (AtCommandContext);
|
||||
ctx->port = MM_IFACE_PORT_AT (g_object_ref (port));
|
||||
ctx->port = g_object_ref (port);
|
||||
|
||||
/* Ensure the user-provided cancellable will also get cancelled if the modem
|
||||
* wide-one gets cancelled */
|
||||
@@ -596,11 +595,11 @@ mm_base_modem_at_command (MMBaseModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MMPortSerialAt *port;
|
||||
GError *error = NULL;
|
||||
MMIfacePortAt *port;
|
||||
GError *error = NULL;
|
||||
|
||||
/* No port given, so we'll try to guess which is best */
|
||||
port = mm_base_modem_peek_best_at_port (self, &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (self, &error));
|
||||
if (!port) {
|
||||
g_task_report_error (self, callback, user_data, mm_base_modem_at_command, error);
|
||||
return;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "mm-base-modem.h"
|
||||
#include "mm-port-serial-at.h"
|
||||
#include "mm-iface-port-at.h"
|
||||
|
||||
typedef enum {
|
||||
MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE,
|
||||
@@ -87,7 +87,7 @@ GVariant *mm_base_modem_at_sequence_finish (MMBaseModem *self,
|
||||
/* Fully detailed AT sequence handling, when specific AT port and/or explicit
|
||||
* cancellations need to be used. */
|
||||
void mm_base_modem_at_sequence_full (MMBaseModem *self,
|
||||
MMPortSerialAt *port,
|
||||
MMIfacePortAt *port,
|
||||
const MMBaseModemAtCommand *sequence,
|
||||
gpointer response_processor_context,
|
||||
GDestroyNotify response_processor_context_free,
|
||||
@@ -193,7 +193,7 @@ const gchar *mm_base_modem_at_command_finish (MMBaseModem *self,
|
||||
/* Fully detailed AT command handling, when specific AT port and/or explicit
|
||||
* cancellations need to be used. */
|
||||
void mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
MMPortSerialAt *port,
|
||||
MMIfacePortAt *port,
|
||||
const gchar *command,
|
||||
guint timeout,
|
||||
gboolean allow_cached,
|
||||
|
||||
+12
-12
@@ -840,7 +840,7 @@ sms_get_store_or_send_command (MMBaseSms *self,
|
||||
|
||||
typedef struct {
|
||||
MMBaseModem *modem;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
MMSmsStorage storage;
|
||||
gboolean need_unlock;
|
||||
gboolean use_pdu_mode;
|
||||
@@ -1024,13 +1024,13 @@ sms_store (MMBaseSms *self,
|
||||
{
|
||||
SmsStoreContext *ctx;
|
||||
GTask *task;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
GError *error = NULL;
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
|
||||
/* Select port for the operation */
|
||||
port = mm_base_modem_peek_best_at_port (self->priv->modem, &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (self->priv->modem, &error));
|
||||
if (!port) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
@@ -1063,13 +1063,13 @@ sms_store (MMBaseSms *self,
|
||||
/* Send the SMS */
|
||||
|
||||
typedef struct {
|
||||
MMBaseModem *modem;
|
||||
MMPortSerialAt *port;
|
||||
gboolean need_unlock;
|
||||
gboolean from_storage;
|
||||
gboolean use_pdu_mode;
|
||||
GList *current;
|
||||
gchar *msg_data;
|
||||
MMBaseModem *modem;
|
||||
MMIfacePortAt *port;
|
||||
gboolean need_unlock;
|
||||
gboolean from_storage;
|
||||
gboolean use_pdu_mode;
|
||||
GList *current;
|
||||
gchar *msg_data;
|
||||
} SmsSendContext;
|
||||
|
||||
static void
|
||||
@@ -1327,13 +1327,13 @@ sms_send (MMBaseSms *self,
|
||||
{
|
||||
SmsSendContext *ctx;
|
||||
GTask *task;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
GError *error = NULL;
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
|
||||
/* Select port for the operation */
|
||||
port = mm_base_modem_peek_best_at_port (self->priv->modem, &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (self->priv->modem, &error));
|
||||
if (!port) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
|
||||
+20
-20
@@ -247,7 +247,7 @@ cdma_connect_context_dial (GTask *task)
|
||||
ctx = g_task_get_task_data (task);
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
MM_PORT_SERIAL_AT (ctx->data),
|
||||
MM_IFACE_PORT_AT (ctx->data),
|
||||
"DT#777",
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -336,7 +336,7 @@ current_rm_protocol_ready (MMBaseModem *self,
|
||||
ctx = g_task_get_task_data (task);
|
||||
command = g_strdup_printf ("+CRM=%u", new_index);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -374,7 +374,7 @@ connect_cdma (MMBroadbandBearer *self,
|
||||
|
||||
/* Grab dial port. This gets a reference to the dial port and OPENs it.
|
||||
* If we fail, we'll need to close it ourselves. */
|
||||
ctx->data = (MMPort *)common_get_at_data_port (self, ctx->modem, &error);
|
||||
ctx->data = MM_PORT (common_get_at_data_port (self, ctx->modem, &error));
|
||||
if (!ctx->data) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
@@ -388,7 +388,7 @@ connect_cdma (MMBroadbandBearer *self,
|
||||
/* Need to query current RM protocol */
|
||||
mm_obj_dbg (self, "querying current RM protocol set...");
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CRM?",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -492,7 +492,7 @@ atd_ready (MMBaseModem *modem,
|
||||
if (ctx->saved_error) {
|
||||
/* Try to get more information why it failed */
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CEER",
|
||||
3,
|
||||
FALSE,
|
||||
@@ -564,7 +564,7 @@ dial_3gpp (MMBroadbandBearer *self,
|
||||
/* Use default *99 to connect */
|
||||
command = g_strdup_printf ("ATD*99***%d#", cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->dial_port,
|
||||
MM_IFACE_PORT_AT (ctx->dial_port),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -1321,7 +1321,7 @@ data_flash_3gpp_ready (MMPortSerial *data,
|
||||
mm_obj_dbg (self, "sending PDP context deactivation in primary port again...");
|
||||
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->cgact_command,
|
||||
10,
|
||||
FALSE,
|
||||
@@ -1438,7 +1438,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
if (!mm_port_get_connected (MM_PORT (ctx->primary))) {
|
||||
mm_obj_dbg (self, "sending PDP context deactivation in primary port...");
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->cgact_command,
|
||||
45,
|
||||
FALSE,
|
||||
@@ -1457,7 +1457,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
if (ctx->secondary) {
|
||||
mm_obj_dbg (self, "sending PDP context deactivation in secondary port...");
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
ctx->cgact_command,
|
||||
45,
|
||||
FALSE,
|
||||
@@ -1682,7 +1682,7 @@ load_connection_status (MMBaseBearer *self,
|
||||
{
|
||||
GTask *task;
|
||||
g_autoptr(MMBaseModem) modem = NULL;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
|
||||
@@ -1707,7 +1707,7 @@ load_connection_status (MMBaseBearer *self,
|
||||
}
|
||||
|
||||
/* 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");
|
||||
@@ -1758,15 +1758,15 @@ typedef enum {
|
||||
struct _InitAsyncContext {
|
||||
MMBaseModem *modem;
|
||||
InitializationStep step;
|
||||
MMPortSerialAt *port;
|
||||
MMPortSerialAt *primary;
|
||||
};
|
||||
|
||||
static void
|
||||
init_async_context_free (InitAsyncContext *ctx)
|
||||
{
|
||||
if (ctx->port) {
|
||||
mm_port_serial_close (MM_PORT_SERIAL (ctx->port));
|
||||
g_object_unref (ctx->port);
|
||||
if (ctx->primary) {
|
||||
mm_port_serial_close (MM_PORT_SERIAL (ctx->primary));
|
||||
g_object_unref (ctx->primary);
|
||||
}
|
||||
g_object_unref (ctx->modem);
|
||||
g_free (ctx);
|
||||
@@ -1870,7 +1870,7 @@ interface_initialization_step (GTask *task)
|
||||
mm_bearer_properties_get_rm_protocol (
|
||||
mm_base_bearer_peek_config (MM_BASE_BEARER (self))) != MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN) {
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->port,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"+CRM=?",
|
||||
3,
|
||||
TRUE, /* getting range, so reply can be cached */
|
||||
@@ -1919,8 +1919,8 @@ initable_init_async (GAsyncInitable *initable,
|
||||
user_data);
|
||||
g_task_set_task_data (task, ctx, (GDestroyNotify)init_async_context_free);
|
||||
|
||||
ctx->port = mm_base_modem_get_port_primary (ctx->modem);
|
||||
if (!ctx->port) {
|
||||
ctx->primary = mm_base_modem_get_port_primary (ctx->modem);
|
||||
if (!ctx->primary) {
|
||||
g_task_return_new_error (task,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_FAILED,
|
||||
@@ -1929,8 +1929,8 @@ initable_init_async (GAsyncInitable *initable,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mm_port_serial_open (MM_PORT_SERIAL (ctx->port), &error)) {
|
||||
g_clear_object (&ctx->port);
|
||||
if (!mm_port_serial_open (MM_PORT_SERIAL (ctx->primary), &error)) {
|
||||
g_clear_object (&ctx->primary);
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
return;
|
||||
|
||||
+19
-19
@@ -2118,8 +2118,8 @@ qcdm_evdo_pilot_sets_log_handle (MMPortSerialQcdm *port,
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
MMPortSerial *at_port;
|
||||
MMPortSerial *qcdm_port;
|
||||
MMIfacePortAt *at_port;
|
||||
MMPortSerial *qcdm_port;
|
||||
} SignalQualityContext;
|
||||
|
||||
static void
|
||||
@@ -2224,7 +2224,7 @@ signal_quality_csq (GTask *task)
|
||||
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
MM_PORT_SERIAL_AT (ctx->at_port),
|
||||
ctx->at_port,
|
||||
signal_quality_csq_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -2319,7 +2319,7 @@ signal_quality_cind (GTask *task)
|
||||
ctx = g_task_get_task_data (task);
|
||||
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
MM_PORT_SERIAL_AT (ctx->at_port),
|
||||
ctx->at_port,
|
||||
"+CIND?",
|
||||
5,
|
||||
FALSE,
|
||||
@@ -2444,7 +2444,7 @@ modem_load_signal_quality (MMIfaceModem *_self,
|
||||
g_task_set_task_data (task, ctx, (GDestroyNotify)signal_quality_context_free);
|
||||
|
||||
/* Check whether we can get a non-connected AT port */
|
||||
ctx->at_port = (MMPortSerial *)mm_base_modem_get_best_at_port (MM_BASE_MODEM (self), &error);
|
||||
ctx->at_port = MM_IFACE_PORT_AT (mm_base_modem_get_best_at_port (MM_BASE_MODEM (self), &error));
|
||||
if (ctx->at_port) {
|
||||
if (!self->priv->modem_cind_disabled &&
|
||||
self->priv->modem_cind_supported &&
|
||||
@@ -3646,7 +3646,7 @@ run_unsolicited_events_setup (GTask *task)
|
||||
/* Enable unsolicited events in given port */
|
||||
if (port && command) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -5004,8 +5004,8 @@ modem_3gpp_scan_networks (MMIfaceModem3gpp *self,
|
||||
/* Register in network (3GPP interface) */
|
||||
|
||||
typedef struct {
|
||||
gchar *operator_id;
|
||||
MMPortSerialAt *port;
|
||||
gchar *operator_id;
|
||||
MMIfacePortAt *port;
|
||||
} RegisterInNetworkContext;
|
||||
|
||||
static void
|
||||
@@ -5101,13 +5101,13 @@ modem_3gpp_register_in_network (MMIfaceModem3gpp *self,
|
||||
{
|
||||
RegisterInNetworkContext *ctx;
|
||||
GTask *task;
|
||||
MMPortSerialAt *port;
|
||||
MMIfacePortAt *port;
|
||||
GError *error = NULL;
|
||||
g_autofree gchar *command = NULL;
|
||||
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
|
||||
port = mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self), &error);
|
||||
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self), &error));
|
||||
if (!port) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
@@ -5697,7 +5697,7 @@ unsolicited_registration_events_sequence_ready (MMBroadbandModem *self,
|
||||
if (command) {
|
||||
mm_base_modem_at_command_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
g_variant_get_string (command, NULL),
|
||||
3,
|
||||
FALSE,
|
||||
@@ -5718,7 +5718,7 @@ unsolicited_registration_events_sequence_ready (MMBroadbandModem *self,
|
||||
registration_sequence = ctx->enable ? eps_registration_sequence : eps_unregistration_sequence;
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
registration_sequence,
|
||||
NULL, /* response processor context */
|
||||
NULL, /* response processor context free */
|
||||
@@ -5751,7 +5751,7 @@ unsolicited_registration_events_context_step (GTask *task)
|
||||
ctx->run_cs = FALSE;
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->enable ? cs_registration_sequence : cs_unregistration_sequence,
|
||||
NULL, /* response processor context */
|
||||
NULL, /* response processor context free */
|
||||
@@ -5766,7 +5766,7 @@ unsolicited_registration_events_context_step (GTask *task)
|
||||
ctx->run_ps = FALSE;
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->enable ? ps_registration_sequence : ps_unregistration_sequence,
|
||||
NULL, /* response processor context */
|
||||
NULL, /* response processor context free */
|
||||
@@ -5781,7 +5781,7 @@ unsolicited_registration_events_context_step (GTask *task)
|
||||
ctx->run_eps = FALSE;
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
ctx->enable ? eps_registration_sequence : eps_unregistration_sequence,
|
||||
NULL, /* response processor context */
|
||||
NULL, /* response processor context free */
|
||||
@@ -7435,7 +7435,7 @@ modem_messaging_enable_unsolicited_events_primary_ready (MMBaseModem *self,
|
||||
mm_port_get_device (MM_PORT (ctx->secondary)));
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->secondary,
|
||||
MM_IFACE_PORT_AT (ctx->secondary),
|
||||
cnmi_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -7478,7 +7478,7 @@ modem_messaging_enable_unsolicited_events (MMIfaceModemMessaging *self,
|
||||
mm_port_get_device (MM_PORT (ctx->primary)));
|
||||
mm_base_modem_at_sequence_full (
|
||||
MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
cnmi_sequence,
|
||||
NULL, /* response_processor_context */
|
||||
NULL, /* response_processor_context_free */
|
||||
@@ -8379,7 +8379,7 @@ run_voice_unsolicited_events_setup (GTask *task)
|
||||
/* Enable/Disable unsolicited events in given port */
|
||||
if (port && command) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -11052,7 +11052,7 @@ enabling_modem_init (MMBroadbandModem *self,
|
||||
* So run ATZ alone.
|
||||
*/
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
primary,
|
||||
MM_IFACE_PORT_AT (primary),
|
||||
"Z",
|
||||
6,
|
||||
FALSE,
|
||||
|
||||
@@ -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