summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Larsen <jesper.larsen@ixonos.com>2013-07-18 09:49:57 +0200
committerDenis Kenzior <denkenz@gmail.com>2013-07-18 14:10:38 -0500
commitff2051053cf977cee77d7b7d817dc835663a4f1c (patch)
tree49d5185a8428a3ca5b1b0ca1026646ef0f2679bf
parentf6930db19cde77289682c218dc2ff03c626373a2 (diff)
atmodem: Add gprs-context quirk for SIM900
The SIM900 module from SIMCOM does have a AT+CGDATA command. However, it is not possible to make a ppp connection when CGDATA has been used to bring up the gprs context. This patch adds a quirk that uses the alternative ATD*99***<cid># command instead.
-rw-r--r--drivers/atmodem/gprs-context.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index 3694c27d..2217097a 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
return;
}
- sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+ if (gcd->vendor == OFONO_VENDOR_SIMCOM_SIM900)
+ sprintf(buf, "ATD*99***%u#", gcd->active_context);
+ else
+ sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+
if (g_at_chat_send(gcd->chat, buf, none_prefix,
at_cgdata_cb, gc, NULL) > 0)
return;