r2180 - trunk/src/target/gsm/src/gsmd

laforge at sita.openmoko.org laforge at sita.openmoko.org
Wed Jun 6 21:43:00 CEST 2007


Author: laforge
Date: 2007-06-06 21:42:14 +0200 (Wed, 06 Jun 2007)
New Revision: 2180

Modified:
   trunk/src/target/gsm/src/gsmd/atcmd.c
Log:
Ignore 1:1 echos of commands sent.  This is mainly to work around modems that
are initially in 'E1' state, i.e. have echo enabled.  This means that our first
ATE0V1 command will get echoed before we receive OK. (Philipp Zabel)


Modified: trunk/src/target/gsm/src/gsmd/atcmd.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/atcmd.c	2007-06-06 19:30:04 UTC (rev 2179)
+++ trunk/src/target/gsm/src/gsmd/atcmd.c	2007-06-06 19:42:14 UTC (rev 2180)
@@ -194,6 +194,11 @@
 		cmd = llist_entry(g->busy_atcmds.next,
 				  struct gsmd_atcmd, list);
 
+	if (cmd && !strcmp(buf, cmd->buf)) {
+		DEBUGP("ignoring echo\n");
+		return 0;
+	}
+
 	/* we have to differentiate between the following cases:
 	 *
 	 * A) an information response ("+whatever: ...")





More information about the commitlog mailing list