From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Parse +CUSD responses.
Date: Fri, 16 Oct 2009 13:06:07 -0500 [thread overview]
Message-ID: <200910161306.07901.denkenz@gmail.com> (raw)
In-Reply-To: <1255716767-3807-1-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1985 bytes --]
Hi Andrew,
> USSD.Initiate still returns a string, this may be wrong because
> when the network returns data coded in 8-bits we have no information
> on the character set used, everything is "user-specified" for the
> 8-bit coding in the 23.038 and technically we should return an array
Right now we should simply ignore 8bit data and return an error.
> I removed the "TODO: be able to send UCS2 string" because the string
> we send is first checked to be a valid USSD string so we already know
> it can be encoded with GSM 7-bits.
Actually valid_ussd_string will accept just about everything.
> + /* All 7-bit coding schemes - there's no need to distinguish
> + * between the different schemes because the modem is tasked
> + * with presenting us with only raw 7-bit characters.
> + */
> + if ((dcs & 0xf0) == 0x00 || dcs == 0x10 || (dcs & 0xf0) == 0x20 ||
> + (dcs & 0xf0) == 0x30 || (dcs & 0xcc) == 0x40 ||
> + (dcs & 0xfc) == 0x90 || (dcs & 0xf4) == 0xf0)
> + converted = convert_gsm_to_utf8(content, length,
> + NULL, NULL, 0);
> +
What about the evil set of DCSes which indicate a ISO639 2 character code
preceding the message?
> - sprintf(buf, "AT+CUSD=1,\"%*s\",%d", (int) written, converted, dcs);
> + len = sprintf(buf, "AT+CUSD=1,\"");
> + for (i = 0; i < written; i ++)
> + len += sprintf(buf + len, "%02hhx", converted[i]);
> + sprintf(buf + len, "\",%d", dcs);
>
So this part concerns me, see below.
> + dump_response("cssu_notify", TRUE, result);
cssd_notify :)
> +
> + g_at_chat_send(chat, "AT+CSCS=\"HEX\"", NULL, NULL, NULL, NULL);
This part of 27.007 is utterly and completely broken. We have to be extra
careful whenever we mess with CSCS. Does this have any unfortunate side
effects, in particular with +COPS, +CPUC, etc? Also note that since we change
the CSCS during phonebook import, any USSDs sent/received during this time
won't actually work properly :)
Regards,
-Denis
next prev parent reply other threads:[~2009-10-16 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 18:12 [PATCH] Parse +CUSD responses Andrzej Zaborowski
2009-10-16 18:06 ` Denis Kenzior [this message]
2009-10-16 21:12 ` andrzej zaborowski
2009-10-16 22:47 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910161306.07901.denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox