From 00361c2946aef3975e302d5a5957ae239da21de8 Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 16 Aug 2007 04:16:26 +0000 Subject: From: Andrzej Zaborowski Date: Wed, 11 Jul 2007 16:03:16 +0200 Subject: [PATCH] Multiline commands support. Miscellaneous bugs. This adds support for commands like +CMGS and +CMGW that span mroe than one line and the lines can't be sent to modem as separate commands because every next line has to wait for a "> " prompt from modem before writing (otherwise beginnings of the lines get eaten). This patch also corrects a number of miscellaneous glitches that I have hit. I can split them each out if needed, but they are all quite obvious. The cms_error variable is introduced because there are CME and possibly other errors with the same codes, which resulted in that when I was sending a message and got error 42 ("congestion") on sending, openmoko-dialer asked for PIN because CMS event 42 happens to be PIN inquiry. The change in libgsmd-tool fixes the issue described by Philipp Zabel on the list, with usock locking up. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2709 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/atcmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/atcmd.c b/src/util/atcmd.c index 395f506..f3716d7 100644 --- a/src/util/atcmd.c +++ b/src/util/atcmd.c @@ -91,9 +91,11 @@ int atcmd_main(struct lgsm_handle *lgsmh) continue; } printf("STR=`%s'\n", buf); + + /* this is a synchronous call for a passthrough + * command */ + lgsm_passthrough(lgsmh, buf, rbuf, &rlen); + printf("RSTR=`%s'\n", rbuf); } - /* this is a synchronous call for a passthrough command */ - lgsm_passthrough(lgsmh, buf, rbuf, &rlen); - printf("RSTR=`%s'\n", rbuf); } } -- cgit v1.2.3