Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: gatchat looses UR code if received while waiting a response
Date: Mon, 21 Feb 2011 02:04:52 -0800	[thread overview]
Message-ID: <1298282692.2519.43.camel@aeonflux> (raw)
In-Reply-To: <1298281114.18611.53.camel@lkunnasl-desktop>

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

Hi Lasse,

> I've seen an issue in Unsolicited Result code handling in gatchat. If
> ofono has sent an AT command and is waiting for a response, but modem
> has sent an UR code just before the AT command reached the modem,
> gatchat does not handle that UR code correctly (it drops it). 
> 
> 27.007 does not restrict UR-sending in the time between AT command and
> sending final response.
> 
> Even modem would not send an UR while an active AT command, this may
> happen as a command may be on its way to ofono (e.g. in kernel).

actually GAtChat handles this correctly. Important is what you give as
valid_resp to g_at_chat_send. If this is NULL, then all lines between
the command and OK are consumed by the callback of the send command.

> Real example of this happening:
> ofonod[1388]: Default: > AT+CGMM\r                  
> ofonod[1388]: Default: < \r
> \n*STKI:"D027810301258082028182850A5361756E616C616874698F09013E507265706169641801241F020103"\r\n 
> ofonod[1388]: Default: < \r\nST-Ericsson Mobile Broadband\r\n\r\nOK\r
> \n  
> 
> In this case the call back of *STKI was never called.
> 
> This is not a modem issue as it has been verified the modem has sent
> *STKI before AT+CGMM was received.

I consider this a modem issue. It should not send *STKI during a AT+CGMM
command to avoid any kind of confusion of the parser.

> One way to solve this is to change the sequence in gatchat.c/have_line()
> a bit and check first if this is UR code and then proceeding to response
> handling. Would this be acceptable solution for this issue or would it
> cause some drawbacks? If it is okay I can submit a patch

See my command above. GAtChat is operating just fine.

Regards

Marcel



  reply	other threads:[~2011-02-21 10:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21  9:38 gatchat looses UR code if received while waiting a response Lasse Kunnasluoto
2011-02-21 10:04 ` Marcel Holtmann [this message]
2011-02-21 11:01   ` Lasse Kunnasluoto
2011-02-21 15:14     ` Denis Kenzior
2011-02-22 12:43       ` Lasse Kunnasluoto
2011-02-22 15:44         ` 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=1298282692.2519.43.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