diff options
author | Dan Williams <dcbw@redhat.com> | 2012-08-28 20:18:40 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-08-29 08:53:36 -0500 |
commit | 44f70121f75d59dbf31a4a9a1a4e87293e509e7a (patch) | |
tree | 668fc85f409a0a7e5cab29625733fefe99940a24 | |
parent | 7605ea7f07035934ef5ccc2282cbe44a65bc3170 (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.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c index 1a9b7351..58e5010e 100644 --- a/plugins/mm-modem-sierra-gsm.c +++ b/plugins/mm-modem-sierra-gsm.c @@ -391,19 +391,10 @@ icera_check_cb (MMModem *modem, GError *error, gpointer user_data) { - if (!error) { - MMModemSierraGsm *self = MM_MODEM_SIERRA_GSM (user_data); - MMModemSierraGsmPrivate *priv = MM_MODEM_SIERRA_GSM_GET_PRIVATE (self); - - if (result) { - priv->is_icera = TRUE; - g_object_set (G_OBJECT (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 (modem), TRUE); - } + if (!error && result) { + /* Turn on unsolicited network state messages */ + MM_MODEM_SIERRA_GSM_GET_PRIVATE (user_data)->is_icera = TRUE; + mm_modem_icera_change_unsolicited_messages (MM_MODEM_ICERA (user_data), TRUE); } } @@ -867,6 +858,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 @@ -882,6 +885,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 |