aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-08-28 20:18:40 -0500
committerDan Williams <dcbw@redhat.com>2012-08-29 10:02:18 -0500
commit94b37c44664de016245d2626f57fc96dfc44ff01 (patch)
tree023fee8678740c919524eb5899ed60ed32e27b89
parentf8455221ec4dc61c7d765bb72f761a20c4068f35 (diff)
sierra: use DHCP for the USB 305 (AT&T Lightning)
For some reason, my AT&T Lightning just doesn't work with static IP (AT%IPDPADDR) any more. No traffic passes even though everything is set up the way it was before. No idea what happened. Using latest firmware 2.0.0.11. But what's interesting is on Windows the generic Sierra Watcher app uses DHCP. But on Linux, when using AT%IPDPACT, DHCP doesn't work. That's odd. But it turns out the modem supports the "standard" Sierra proprietary AT!SCACT commands, and that *does* make DHCP work. Crazy no? So since the Windows app uses DHCP, it's likely that the non-DHCP case (AT%IPDPACT/AT%IPDPADDR) either isn't well tested or isn't well supported. With that in mind, let's just use DHCP for this device in Linux too.
-rw-r--r--plugins/mm-modem-sierra-gsm.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c
index d60411c3..de32b322 100644
--- a/plugins/mm-modem-sierra-gsm.c
+++ b/plugins/mm-modem-sierra-gsm.c
@@ -450,19 +450,10 @@ icera_check_cb (MMModem *modem,
if (mm_callback_info_check_modem_removed (info))
return;
- if (!error) {
- MMModemSierraGsm *self = MM_MODEM_SIERRA_GSM (info->modem);
- MMModemSierraGsmPrivate *priv = MM_MODEM_SIERRA_GSM_GET_PRIVATE (self);
-
- if (result) {
- priv->is_icera = TRUE;
- g_object_set (G_OBJECT (info->modem),
- MM_MODEM_IP_METHOD, MM_MODEM_IP_METHOD_STATIC,
- NULL);
-
- /* Turn on unsolicited network state messages */
- mm_modem_icera_change_unsolicited_messages (MM_MODEM_ICERA (info->modem), TRUE);
- }
+ if (!error && result) {
+ /* Turn on unsolicited network state messages */
+ MM_MODEM_SIERRA_GSM_GET_PRIVATE (modem)->is_icera = TRUE;
+ mm_modem_icera_change_unsolicited_messages (MM_MODEM_ICERA (info->modem), TRUE);
}
if (info->modem)
@@ -914,6 +905,18 @@ get_icera_private (MMModemIcera *icera)
return MM_MODEM_SIERRA_GSM_GET_PRIVATE (icera)->icera;
}
+static char *
+get_icera_call_control_cmd (MMModemIcera *icera, guint32 cid, gboolean activate)
+{
+ /* Sierra devices with Icera chipsets (USB 305/AT&T Lightning) still
+ * support Sierra call control commands, and using these allow DHCP
+ * to be used instead of static addressing. The USB305 sometimes has
+ * problems with addressing when using the Icera commands, but the Sierra
+ * ones work fine.
+ */
+ return g_strdup_printf ("!SCACT=%d,%d", activate ? 1 : 0, cid);
+}
+
/*****************************************************************************/
static void
@@ -928,6 +931,7 @@ static void
modem_icera_init (MMModemIcera *icera)
{
icera->get_private = get_icera_private;
+ icera->get_call_control_cmd = get_icera_call_control_cmd;
}
static void