From 3ec5e2150581bebdd3a3ed8530d1adffc8665936 Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 6 Jun 2007 19:42:14 +0000 Subject: 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) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2180 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/atcmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 4df12dc..44e215c 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -194,6 +194,11 @@ static int ml_parse(const char *buf, int len, void *ctx) 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: ...") -- cgit v1.2.3