All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/2] ussd: rise up buffer lenght for ussd strings
Date: Tue, 10 Apr 2012 08:55:47 -0500	[thread overview]
Message-ID: <4F843BE3.5030000@gmail.com> (raw)
In-Reply-To: <1334072105-32105-2-git-send-email-nicolas.bertrand@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

Hi Nicolas,

On 04/10/2012 10:35 AM, Nicolas Bertrand wrote:
> Some ZTE modems used to convert any ussd strings in UCS2,
> and so the buffer length is double. Considering the limit of
> 182 characters, 364 will avoid crash.
> ---
>  drivers/atmodem/ussd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
> index 443251a..f5b38e2 100644
> --- a/drivers/atmodem/ussd.c
> +++ b/drivers/atmodem/ussd.c
> @@ -106,7 +106,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd)
>  	const char *content;
>  	int dcs;
>  	enum sms_charset charset;
> -	unsigned char msg[160];
> +	unsigned char msg[364];

Actually I'm not happy with this since the core is still expecting raw
160 byte PDUs.  If ZTE reports all USSDs as unpacked UCS2 data, then we
need to pack that back up into packed GSM 7 bit.  This probably requires
a custom driver for ZTE modems.

Alternatively you can see whether ZTE provides some way to modify the
USSD reporting behavior, similar to what Huawei did with ^USSDMODE.

Regards,
-Denis

  reply	other threads:[~2012-04-10 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 15:35 [PATCH 0/2] ussd fixes Nicolas Bertrand
2012-04-10 15:35 ` [PATCH 1/2] ussd: rise up buffer lenght for ussd strings Nicolas Bertrand
2012-04-10 13:55   ` Denis Kenzior [this message]
2012-04-10 15:35 ` [PATCH 2/2] ussd: Fix speedup ussd encoding Nicolas Bertrand
2012-04-10  7:53   ` Denis Kenzior
2012-04-10 21:22     ` Marcel Holtmann

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=4F843BE3.5030000@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.