summaryrefslogtreecommitdiffstats
path: root/drivers/mbmmodem
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-24 14:55:50 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-24 14:55:50 +0200
commita9ad547535bdd445aa64010dbf24a205c1f692aa (patch)
tree40d7802ca80f76110fabeb2f48f0c31c628d03f3 /drivers/mbmmodem
parent51112871e1535e73c0049ee871989f07b8d30ee7 (diff)
downloadofono-a9ad547535bdd445aa64010dbf24a205c1f692aa.tar.bz2
mbmmodem: Check IP address with AT+CGPADDR for older modems
Diffstat (limited to 'drivers/mbmmodem')
-rw-r--r--drivers/mbmmodem/gprs-context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mbmmodem/gprs-context.c b/drivers/mbmmodem/gprs-context.c
index de8abb94..4cb1097b 100644
--- a/drivers/mbmmodem/gprs-context.c
+++ b/drivers/mbmmodem/gprs-context.c
@@ -148,6 +148,7 @@ static void mbm_get_ip_details(struct ofono_gprs_context *gc)
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
struct ofono_modem *modem;
const char *interface;
+ char buf[64];
if (gcd->have_e2ipcfg) {
g_at_chat_send(gcd->chat, "AT*E2IPCFG?", e2ipcfg_prefix,
@@ -155,6 +156,9 @@ static void mbm_get_ip_details(struct ofono_gprs_context *gc)
return;
}
+ snprintf(buf, sizeof(buf), "AT+CGPADDR=%u", gcd->active_context);
+ g_at_chat_send(gcd->chat, buf, none_prefix, NULL, NULL, NULL);
+
modem = ofono_gprs_context_get_modem(gc);
interface = ofono_modem_get_string(modem, "NetworkInterface");
CALLBACK_WITH_SUCCESS(gcd->up_cb, interface, FALSE, NULL, NULL,