summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralphaone <alphaone@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-10 11:38:15 +0000
committeralphaone <alphaone@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-10 11:38:15 +0000
commit947e4fa6ccf23a1374ce20d71b5fdf76ec490754 (patch)
treeee8f67a743384f60f361967d392412e3e65c8eaa
parentd5876c34c4b6096479e2165ad21ef524206413a8 (diff)
gsmd.c: Send \r before draining tty so the modem discards any garbage that
was sent before. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2685 99fdad57-331a-0410-800a-d7fa5415bdb3
-rw-r--r--src/gsmd/gsmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
index 519d553..23add29 100644
--- a/src/gsmd/gsmd.c
+++ b/src/gsmd/gsmd.c
@@ -462,6 +462,9 @@ int main(int argc, char **argv)
fprintf(stderr, "can't initialize UART device\n");
exit(1);
}
+
+ write(fd, "\r");
+ sleep(1);
atcmd_drain(fd);
if (usock_init(&g) < 0) {
personal git repositories of Harald Welte. Your mileage may vary