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.
This commit is contained in:
Jesper Larsen 2013-07-18 09:49:57 +02:00 committed by Denis Kenzior
parent f6930db19c
commit ff2051053c
1 changed files with 5 additions and 1 deletions

View File

@ -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;