[Bug 766] gsmd misbehaves on back-to-back AT+CFUN=1/AT+COPS=0

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Sat Sep 8 23:47:28 CEST 2007


cesarb at cesarb.net changed:

           What    |Removed                     |Added
 Attachment #278 is|0                           |1
           obsolete|                            |

------- Additional Comments From cesarb at cesarb.net  2007-09-08 23:47 -------
Created an attachment (id=280)
 --> (http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=280&action=view)
Fix gsmd getting "stuck"

This last patch fixes the remaining problem: on reset, when receiving the
"AT-Command Interpreter ready", gsmd was getting stuck. The cause was that the
ATZ command was not being removed from g->busy_atcmds, meaning GSMD_FD_WRITE
would not get set again. To compound the problem, in that case it never even
reached the line which set the flag.

This patch does the following:
1. Checks for g->busy_atcmds on atcmd_submit() (same as previous patch, which
this one obsoletes)
2. Shuffles the order of the first few code blocks on ml_parse(), so cmd will
get set before checking for the interpreter ready condition
3. When getting "AT-Command Interpreter ready", generates a fake ERROR response
and goes directly to final_cb; this runs all normal processing for the command
(which can depend on the command's callback), dequeues it, and sets
GSMD_FD_WRITE if needed.

Finding the problem would be much harder without the debugging patch; I would
suggest also applying it (or a less kludgy version of it) too, to help
debugging future problems.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the buglog mailing list