USSD feature on Android

89 views
Skip to first unread message

Rakesh Kumar

unread,
Jun 26, 2009, 3:35:09 AM6/26/09
to android...@googlegroups.com, omapandroid...@omapzoom.org
Hi,
    I am working on USSD feature on Android. USSD data is coming as Unsolicited response whem I am giving AT+CUSD command. Now , Please help me how to handle these data.


Thanks  & Regards
Rakesh

Henrik Persson

unread,
Jun 26, 2009, 3:43:15 AM6/26/09
to android...@googlegroups.com, omapandroid...@omapzoom.org
Hi there,

>From: android...@googlegroups.com
[mailto:android...@googlegroups.com] On Behalf Of Rakesh Kumar
>Sent: den 26 juni 2009 09:35
>To: android...@googlegroups.com;
omapandroid...@omapzoom.org
>Subject: [android-porting] USSD feature on Android
>
>
>Hi,
> I am working on USSD feature on Android. USSD data is coming as
Unsolicited response whem I am giving AT+CUSD command. Now , Please help
me how to handle these data.

I guess you are trying to implement this in the RIL. It should be as
simple as parsing the +CUSD unsolicited response and sending it to the
android framework as an RIL_UNSOL_ON_USSD unsolicited response.

If you are using the reference ril that could probably be extended to
support this. But if you are referring to something else then you have
to elaborate a bit on what you are trying to do with what. :)

Best regards,
Henrik Persson

Michael Trimarchi

unread,
Jun 26, 2009, 3:47:17 AM6/26/09
to android...@googlegroups.com, omapandroid...@omapzoom.org
Henrik Persson wrote:
> Hi there,
>
>
>> From: android...@googlegroups.com
>>
> [mailto:android...@googlegroups.com] On Behalf Of Rakesh Kumar
>
>> Sent: den 26 juni 2009 09:35
>> To: android...@googlegroups.com;
>>
> omapandroid...@omapzoom.org
>
>> Subject: [android-porting] USSD feature on Android
>>
>>
>> Hi,
>> I am working on USSD feature on Android. USSD data is coming as
>>
> Unsolicited response whem I am giving AT+CUSD command. Now , Please help
> me how to handle these data.
>
> I guess you are trying to implement this in the RIL. It should be as
> simple as parsing the +CUSD unsolicited response and sending it to the
> android framework as an RIL_UNSOL_ON_USSD unsolicited response.
>
I start to work on it, but I don't terminated because, there is
somenthing wrong
in the response. Put in
static void onUnsolicited (const char *s, const char *sms_pdu)
{
...

else if (strStartsWith(s, "+CUSD:")) {
char *response[2] = { NULL, NULL };
char **cur;
char *tmp;

line = strdup(s);
tmp = line;
at_tok_start(&tmp);

err = at_tok_nextstr(&tmp, &(response[0]));
if (err < 0) {
LOGE("Error code not present");
goto out;
}

err = at_tok_nextstr(&tmp, &(response[1]));

RIL_onUnsolicitedResponse(
RIL_UNSOL_ON_USSD,
&response, sizeof(response));
}

Maybe you have time and you can fix
Michael

Reply all
Reply to author
Forward
0 new messages