diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-06-06 19:42:14 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-06-06 19:42:14 +0000 |
commit | 3ec5e2150581bebdd3a3ed8530d1adffc8665936 (patch) | |
tree | 0a76833c0c7be9df517b6d7e9b9078e1d244fce3 | |
parent | afdbbbc6242433463cd0f18920aacbbf579306f5 (diff) |
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
-rw-r--r-- | src/gsmd/atcmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
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: ...") |