Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH_v0 2/3] huawei: Add modem type detection
Date: Mon, 09 Jan 2012 02:31:35 -0800	[thread overview]
Message-ID: <1326105095.6454.145.camel@aeonflux> (raw)
In-Reply-To: <4F0AB677.8070508@linux.intel.com>

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

Hi Guillaume,

> >> +static gboolean parse_ati_result(GAtResult *result)
> >> +{
> >> +	GAtResultIter iter;
> >> +	const char *line;
> >> +	int num = g_at_result_num_response_lines(result);
> >> +	int i;
> >> +
> >> +	g_at_result_iter_init(&iter, result);
> >> +
> >> +	for (i = 0; i<  num; i++) {
> >> +		g_at_result_iter_next(&iter, NULL);
> >> +		line = g_at_result_iter_raw_line(&iter);
> >> +		if (g_str_has_prefix(line, "+GCAP"))
> >> +			return (g_strrstr(line, "+CGSM") != NULL);
> > This parsing is more complex than it needs to be. It also parses the
> > string too many times. Especially since GAtChat does that all for you
> > already anyway.
> >
> > Instead of posting an example here, I just pushed a patch so you can see
> > how easily this can be done.
> 
> Right, I see this is easier do to how I you submitted it :)
> However, I have a dongle EC1261 that is bugged because:
>          - when I send ATI, the capabilities line is returned with 
> "+GCAP +GCAP:" prefix
>          - when I send AT+GCAP, the prefix is "+GCAP:"
> 
> Unless the manufacturer fixes this issue, we won't be able to support 
> this dongle...

that is because that modem firmware is like super buggy. I bet they also
prefixed the other ATI responses with their counterparts. Whoever owns
that modem should upgrade the firmware to a proper version.

And precisely because of this, I want this to fail if the modem firmware
is acting up again.

Regards

Marcel



  reply	other threads:[~2012-01-09 10:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 15:28 [PATCH_v0 0/3] Unify huawei and huaweicdma plugins Guillaume Zajac
2012-01-06 15:28 ` [PATCH_v0 1/3] udevng: Simplify vendor_list for Huawei constructor Guillaume Zajac
2012-01-06 21:43   ` Marcel Holtmann
2012-01-06 15:28 ` [PATCH_v0 2/3] huawei: Add modem type detection Guillaume Zajac
2012-01-06 21:43   ` Marcel Holtmann
2012-01-09  9:42     ` Guillaume Zajac
2012-01-09 10:31       ` Marcel Holtmann [this message]
2012-01-09 13:47       ` Deng, Ying An
2012-01-09 15:59         ` Philippe Nunes
2012-01-09 19:31           ` Marcel Holtmann
2012-01-11 13:42       ` Deng, Ying An
2012-01-11 14:46         ` Marcel Holtmann
2012-01-06 15:28 ` [PATCH_v0 3/3] huaweicdma: Delete unused plugin Guillaume Zajac
2012-01-06 21:51   ` 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=1326105095.6454.145.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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