mirror of git://git.sysmocom.de/ofono
mbmmodem: Check IP address with AT+CGPADDR for older modems
This commit is contained in:
parent
51112871e1
commit
a9ad547535
|
@ -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 gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||||
struct ofono_modem *modem;
|
struct ofono_modem *modem;
|
||||||
const char *interface;
|
const char *interface;
|
||||||
|
char buf[64];
|
||||||
|
|
||||||
if (gcd->have_e2ipcfg) {
|
if (gcd->have_e2ipcfg) {
|
||||||
g_at_chat_send(gcd->chat, "AT*E2IPCFG?", e2ipcfg_prefix,
|
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;
|
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);
|
modem = ofono_gprs_context_get_modem(gc);
|
||||||
interface = ofono_modem_get_string(modem, "NetworkInterface");
|
interface = ofono_modem_get_string(modem, "NetworkInterface");
|
||||||
CALLBACK_WITH_SUCCESS(gcd->up_cb, interface, FALSE, NULL, NULL,
|
CALLBACK_WITH_SUCCESS(gcd->up_cb, interface, FALSE, NULL, NULL,
|
||||||
|
|
Loading…
Reference in New Issue