From 947e4fa6ccf23a1374ce20d71b5fdf76ec490754 Mon Sep 17 00:00:00 2001 From: alphaone Date: Fri, 10 Aug 2007 11:38:15 +0000 Subject: 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 --- src/gsmd/gsmd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gsmd') 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) { -- cgit v1.2.3