summaryrefslogtreecommitdiff
path: root/src/gsmd/atcmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a flag to allow LFCR as a valid linebreak. (Alex Osborne)laforge2007-08-171-6/+16
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2736 99fdad57-331a-0410-800a-d7fa5415bdb3
* mlbuf in gsmd struct (Andrzej Zaborowski)laforge2007-08-171-26/+27
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2732 99fdad57-331a-0410-800a-d7fa5415bdb3
* Use vendor specific ext_chars.laforge2007-08-171-2/+2
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2728 99fdad57-331a-0410-800a-d7fa5415bdb3
* From: Andrzej Zaborowski <balrog@zabor.org>laforge2007-08-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Date: Fri, 27 Jul 2007 14:29:44 +0200 Subject: [PATCH] Multiline unsolicited responses parsing. +CMT, +CBM and +CDS responses two lines long in PDU mode and the parser has problem with them. As it was mentioned earlier there's no way for the parser to know if a new line is part of the most recent command response or unsolicited response, or a completely new unsolicited response, without looking at the contents of the first line. My idea is that the parser for the particular response decides if the response is too short, and returns -EAGAIN in which case the AT parser will append the following line to the response and resubmit it to the response parser. The disadvantage is that the generic parser gets one more special case to remember about, but it works quite well, hopefully there are no more cases where we will need to modify the parser. (We may need to use a separate multiline buffer (like the current mlbuf variable) to account for situations when a multiline unsolicited response comes in the middle of receiving a different response, which is also possible. Also, mlbuf should probably be moved into the parser state struct instead of being a global). This patch also moves initialisation of SMS options to after we are registered to the network, so that we don't get errors from the modem. Perhaps we want to have a dynamic list of callbacks to call on succesfull registration. Among other changes also prevents setting dev_state.on if the radio powering-on fails. --- include/gsmd/event.h | 8 +++++ include/gsmd/sms.h | 1 + src/gsmd/atcmd.c | 26 +++++++++++++++++ src/gsmd/sms_cb.c | 73 ++++++++++++++++++++++++------------------------ src/gsmd/unsolicited.c | 8 +++++ src/gsmd/usock.c | 21 ++++++++++++-- src/util/event.c | 10 +++---- 7 files changed, 103 insertions(+), 44 deletions(-) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2722 99fdad57-331a-0410-800a-d7fa5415bdb3
* From: Andrzej Zaborowski <balrog@zabor.org>laforge2007-08-161-52/+81
| | | | | | | | | | | | | | | | | | | | | 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
* Add '2nd try' of the multiline parser:laforge2007-07-311-20/+50
| | | | | | | | | | | | | | Every extended response causes a flush of the previous mlbuf and starts collecting new response lines. Also, final_cb is now really only reached for final responses and the code for case 'A' won't overwrite the command buffer with the response anymore. I throw in '\n' as a separator for multi-line responses, and the callback is called for each response this way. (Philipp Zabel) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2581 99fdad57-331a-0410-800a-d7fa5415bdb3
* the latest gsmd sends the alive detector's ATE0 to the GSM modem, evenlaforge2007-07-311-0/+1
| | | | | | | | | if interpreter_ready == 0. The attached patch sees to it that if interpreter_ready is zero, gsmd_alive_start is only called once the "AT-Command Interpreter ready" message was seen. (Philipp Zabel) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2578 99fdad57-331a-0410-800a-d7fa5415bdb3
* Ignore 1:1 echos of commands sent. This is mainly to work around modems thatlaforge2007-06-061-0/+5
| | | | | | | | 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
* add machine / vendor plugin infrastructure (Philip Zabel)laforge2007-06-021-1/+2
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2123 99fdad57-331a-0410-800a-d7fa5415bdb3
* parse numeric responses for RING, NO CARRIER and BUSY (Philip Zabel)laforge2007-04-151-5/+8
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1766 99fdad57-331a-0410-800a-d7fa5415bdb3
* add parsing of +CMS errors according to GSM 07.05 (Philipp Zabel)laforge2007-03-281-1/+13
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1529 99fdad57-331a-0410-800a-d7fa5415bdb3
* * deal correctly with 'gsm power cycling'laforge2007-03-101-3/+6
| | | | | | | * consider % as prefix for extended response, even though non-standard git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1313 99fdad57-331a-0410-800a-d7fa5415bdb3
* - Add copyright / license notice to all source code fileslaforge2007-01-131-6/+22
| | | | | | | - Add some 'get operator name' skeleton git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@546 99fdad57-331a-0410-800a-d7fa5415bdb3
* - use talloc (of samba project) to debug memory allocations and simplify codelaforge2007-01-121-22/+36
| | | | | | | | | | | - introduce new ucmd_alloc() function - add DTMF support to gsmd, libgsmd and gsmd-util - fix crash of libgsmd when events don't have handlers registered - implement call progress for TI modem - split modem init string in separate commands to fit our parser git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@544 99fdad57-331a-0410-800a-d7fa5415bdb3
* - clean up header files (all in include/gmsd now)laforge2006-10-241-4/+6
| | | | | | | | - finish vendor plugin support - add call progress indicator and signal quality unsolicited support to vendor_ti.c git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@120 99fdad57-331a-0410-800a-d7fa5415bdb3
* first working revision of gsmd, libgsmd and libgsmd-toollaforge2006-10-231-1/+10
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@115 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd passthrough mode now workinglaforge2006-10-221-17/+58
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@109 99fdad57-331a-0410-800a-d7fa5415bdb3
* - fix parsing of unsolicited codes laforge2006-10-221-10/+19
| | | | | | | - fix segfault due to missing zero-filled option in 'struct option' array git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@102 99fdad57-331a-0410-800a-d7fa5415bdb3
* add logging infrastructure to gsm daemonlaforge2006-10-221-10/+10
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@98 99fdad57-331a-0410-800a-d7fa5415bdb3
* - some more gsmd / libgsmd codelaforge2006-10-201-8/+57
| | | | | | | - use autotools for build process git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@94 99fdad57-331a-0410-800a-d7fa5415bdb3
* first compiling (unfinished, not-working) version of userspace gsm ↵laforge2006-09-021-0/+332
infrastructure git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@40 99fdad57-331a-0410-800a-d7fa5415bdb3
personal git repositories of Harald Welte. Your mileage may vary