summaryrefslogtreecommitdiff
path: root/src/gsmd/usock.c
Commit message (Collapse)AuthorAgeFilesLines
* gsmd/AT@COPS: don't use cmd before it is allocatedHEADmasterHarald Welte2013-10-141-1/+1
|
* wavecom/sysmocom: use AT@COPS if available, instead of AT+COPSHarald Welte2013-10-131-2/+14
| | | | | | | | | | In certain sysmocom proprietary versions of the wavecom modem, we have a non-blocking operator scan command called AT@COPS=?, which we can use instead of AT+COPS=?. The wavecom vendor plugin checks at start time if the command is available. If yes, iti s used in case a libgsm client is asking for an operator scan, instead of the standard AT+COPS=? variant.
* permit gsmd and libgsm to handle multiple instancesHarald Welte2013-09-291-1/+8
| | | | | By using differntly-named unix domain sockets, we can run multiple gsmd instances in parallel.
* Add run-time changing of gsmd log level via libgsm/libgsmd-toolHarald Welte2013-03-151-0/+10
|
* gsmd: Support Operator Names with parenthesis in their long/short nameHarald Welte2013-03-021-2/+5
| | | | | | | | The previous parser caused parsing errors when recognizing parenthesis '()' inside a network operator name like "O2 (Germany) GmbH" We now keep track if we are inside a quote, and ignore parenthesis until the end of the quote mark.
* use talloc_zero_size instead of talloc_sizeHarald Welte2012-06-011-3/+3
|
* gsmd: Query Antenna Status (Erin Yueh)erin_yueh2008-03-061-0/+14
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4174 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add vibrator at cmd (Sudharshan S)erin_yueh2008-02-261-0/+33
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4115 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: get the operator list 2nd try (Paulius Zaleckas)erin_yueh2008-02-211-1/+10
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4101 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: fix gcc warning (Erin Yueh)erin_yueh2008-02-211-4/+3
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4098 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: get battery status (Sudharshan S)erin_yueh2008-02-211-9/+33
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4091 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: bug fixed for some changes (Sudharshan S, Paulius Zaleckas)erin_yueh2008-02-181-19/+10
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4084 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add retrieving phone info (Erin Yueh)erin_yueh2008-02-151-2/+70
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4067 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: remove dead imsi code and fix bug (Paulius Zaleckas)erin_yueh2008-02-131-9/+1
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4061 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add strlcpy, strlcat functions (Paulius Zaleckas)erin_yueh2008-02-131-20/+23
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4060 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: query network registration 2nd try (Erin Yueh)erin_yueh2008-01-261-1/+1
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3965 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: query network registration status (Erin Yueh)erin_yueh2008-01-241-0/+32
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3943 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: retrieve imsi value before sending at command (Sean Chiang)erin_yueh2008-01-221-1/+2
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3915 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add 'lgsm_open_n_get' to retrieve the current country code (Sean Chiang)erin_yueh2008-01-181-0/+46
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3876 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: eliminate gcc warnings (Erin Yueh)erin_yueh2008-01-101-7/+6
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3807 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: fix segfault for list operator names (Sean Chiang)erin_yueh2008-01-081-50/+75
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3784 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add Call Forwarding function (Sean Chiang)erin_yueh2008-01-031-1/+147
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3760 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: set and get Voicemail number (Erin Yueh)erin_yueh2007-12-191-43/+28
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3684 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: conference call support (Sean Chiang)erin_yueh2007-12-171-0/+56
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3657 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: move PIN name to both gsmd and libgsmd (Erin Yueh)erin_yueh2007-12-131-0/+19
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3647 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: 2nd try for retrieving PIN status (Erin Yueh)erin_yueh2007-12-121-37/+43
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3636 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Bug 1082 - PIN Status Missing (Erin Yueh)erin_yueh2007-12-101-1/+12
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3621 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: add "RING" timeout scheme, for those modem not have %CPI (like) ↵tick2007-12-051-2/+16
| | | | | | supports (Andrzej Zaborowski) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3572 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Provide Current Call status (sean_chiang)tick2007-12-041-3/+95
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3557 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Rewrite read, readrg and find of phonebook. (Sean Chiang)tick2007-12-031-134/+111
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3551 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Severe clean-up (Andrzej Zaborowski)tick2007-12-011-290/+132
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3546 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Submitting a PIN for authentication needs to respond with status ↵tick2007-12-011-14/+13
| | | | | | too.(Andrzej Zaborowski) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3545 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Modem power-up and -down result events.(Andrzej Zaborowski)tick2007-12-011-2/+25
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3544 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Refactorying get_imsi from PHONEBOOK to PHONE (tick)tick2007-11-271-22/+24
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3519 99fdad57-331a-0410-800a-d7fa5415bdb3
* [gsmd] New feature for power on/off GSM modem (Sean Chiang)tick2007-11-201-0/+13
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3449 99fdad57-331a-0410-800a-d7fa5415bdb3
* [gsmd] Adding atcmd_terminate_matching (remove from the queues any command ↵tick2007-11-201-1/+3
| | | | | | whose .ctx matches given)(Andrzej Zaborowski) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3447 99fdad57-331a-0410-800a-d7fa5415bdb3
* [gsmd] Adding timeout scheme, and merge gta01 wakeup scheme as machine ↵tick2007-11-161-32/+32
| | | | | | plug-in with timeout. (L. Sean) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3430 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: cleaning some dummy codes (Tick)tick2007-11-121-368/+0
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3394 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Adding IMSI support (Jim Rayner)tick2007-10-311-0/+25
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3309 99fdad57-331a-0410-800a-d7fa5415bdb3
* gsmd: Fix the bug 928, that user cannot hang up call/cancel_atcmd until a ↵tick2007-10-311-2/+8
| | | | | | call is connected.(Andrzej Zaborowski) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3307 99fdad57-331a-0410-800a-d7fa5415bdb3
* Improvement for find and read phonebooks in gsmd.jserv2007-10-171-22/+166
| | | | | | | | | | | | From: Sean Chiang <sean_chiang@openmoko.com> Subject: [PATCH] Improvement for find and read phonebooks in gsmd This patch is an improvement for find and read phonebooks. After clients make a request to find / read phonebooks, then clients should make a request to retrieve all the records. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3202 99fdad57-331a-0410-800a-d7fa5415bdb3
* Add retrieving phone's own subscriber number. (Andrzej Zaborowski)laforge2007-08-171-0/+49
| | | | git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2733 99fdad57-331a-0410-800a-d7fa5415bdb3
* SIM Phonebook access implementation.laforge2007-08-171-46/+124
| | | | | | | | | | | | | | | | | | | This patch adds primitive-but-working support for SIM phonebook access, including phonebook memory storage and entry read/write/delete. Also, libgsmd-tools shell is modified to perform listing actions. API changes: lgsm_pb_read_entryies -> lgsm_pb_read_entries lgsm_pb_list_storage (new): List of supported phonebook memory storage. lgsm_pb_set_storage (new); Select phonebook memory storage. lgsmd_pb_del_entry -> lgsm_pb_del_entry lgsmd_pb_write_entry -> lgsm_pb_write_entry git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2726 99fdad57-331a-0410-800a-d7fa5415bdb3
* From: Andrzej Zaborowski <balrog@zabor.org>laforge2007-08-171-3/+91
| | | | | | | | | | | | | | | | Date: Tue, 31 Jul 2007 22:26:36 +0200 Subject: [PATCH] Operations on the preferred operators list. This makes use of the AT+CPOL variants to add / delete / list entries in the preferred operators list on the SIM. There's some inconsistency, similarly as with operator selection, in that we return operator names in long alphanumeric format but we take only operators in numeric format as parameters. Either the client will have to convert between the formats or we should always use for example the long alphanumeric format, or maybe do something else. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2725 99fdad57-331a-0410-800a-d7fa5415bdb3
* From: Andrzej Zaborowski <balrog@zabor.org>laforge2007-08-171-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-2/+5
| | | | | | | | | | | | | | | | | Date: Thu, 26 Jul 2007 16:00:52 +0200 Subject: [PATCH] Cell Broadcast messages enabling/disabling and notifications. This adds GSMD_CB_SUBSCRIBE and GSMD_CB_UNSIBSCRIBE commands handling and proper handling of th +CMTI, +CMT, +CBMI, +CBM, +CDSI, +CDS unsolicited codes. It's also an overhaul of sms_cb.c which I first though stood for sms *callbacks* :) rather than "cell broadcast" so all SMS and CB related code now sits in this file. The Neo1973 modem doesn't seem to support storing CB messages and delivery status messages into memory, so the default is now set to output them directly to TE when they're enabled. None of the CB code is tested on real CBs, but I think it's a good start. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2721 99fdad57-331a-0410-800a-d7fa5415bdb3
* From: Andrzej Zaborowski <balrog@zabor.org>laforge2007-08-171-19/+100
| | | | | | | | | | | | | | | | | | | | | | | Date: Thu, 26 Jul 2007 00:32:38 +0200 Subject: [PATCH] SMSC and Preferred Storage operations. This adds setting and retrieval of SMS storage stats (memory type, used entries, all entries), and of the default service centre (SMSC) number for outgoing messages. The operation of setting a new SMSC number is untested because my SIM doesn't seem to allow this (that or I did something wrong). New "libgmsd-tool -m shell" commands for testing are also added. Other changes in this patch: * The third, optional, parameter to +CMGL: is a string, not an integer as I wrongly assumed earlier, this is now corrected. * Rename libgsmd API functions starting with lgsmd_.. to lgsm_.. for consistency with all other identifiers. * Move lgsm_send_simple() to libgsmd.c and add a prototype in lgsm_internals.h, this eliminates some compile-time warnings. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2720 99fdad57-331a-0410-800a-d7fa5415bdb3
* Operator Selection (Andrzej Zaborowski)laforge2007-08-161-25/+103
| | | | | | | | | | | | | | | | | | | | | | | | This adds gsmd/libgsmd/libgmsd-tool commands to: * query available operators, * register to given operator, * register automatically (like gsmd did until now), * deregister, * get current operator name, * query signal quality, * query current connection state (a bit hacky, but it's the only way I found to satisfy the synchronous prototype in misc.h). The operator cache is not used as it wouldn't give any benefit here. Retrieving the list of present operators takes very long but there doesn't seem to exist any way around it and all other phones I used also take that long. The libgmsd call for registration to an automatically chosen operator now takes a parameter of a different type so all libgsmd clients need to be updated (this patch updates libgsmd-tool already, but not libmokogsmd which is not a part of gsmd project). git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2713 99fdad57-331a-0410-800a-d7fa5415bdb3
* From 5b7c50fd08b8f76f761958c8a8243e6c23118fa3 Mon Sep 17 00:00:00 2001laforge2007-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | From: Andrzej Zaborowski <balrog@zabor.org> Date: Thu, 12 Jul 2007 14:26:46 +0200 Subject: [PATCH] Incoming SMS events This is a proposed patch to emit a gsmd event when a new SMS arrives, also modifies libgsmd-tool to display the notification. It makes sms_cb.c compile but only really implements the bits necessary to make it build and for the notifications to work. I chose AT+CNMI mode 1 (i.e. store messages in memory and report the location through +CMTI, rather than print the message right away through +CMT) because the parser doesn't support multiline unsolicited responses - in fact it can't support those because in a situation when a normal command is executing and an unsolicited response comes in (which is the case when sending a message to yourself) it is impossible for the parser to distinguish whether the line after the unsolicited response is part of that response or part of the command's response. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2711 99fdad57-331a-0410-800a-d7fa5415bdb3
* From 294d27e78680d497da22e3a8ad679f50d1ba29e5 Mon Sep 17 00:00:00 2001laforge2007-08-161-80/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | From: Andrzej Zaborowski <balrog@zabor.org> Date: Wed, 11 Jul 2007 16:11:10 +0200 Subject: [PATCH] SMS support in gsmd and in libgsmd. This adds the proper support for sms related calls in libgsmd and their implementation in gsmd. I assumed that conversion between data coding schemes is to be done on the client side because the {packing,unpacking}* calls were exported. TEXT mode support is non-functional, but the code only has to be filled in the right places to make it work, if it is ever needed. I had been lucky to be able to test with the different kinds of messages with exotic formats because I just got a bunch of network messages today (urging to top-up the credit). I tried to not modify the libgsmd api, although I would prefer to have a totally different api, possibly with synchronous calls that just return the result of an operation, for a exmaple a whole list of messages, rather than the client waiting for an unknown number of events each with one message. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2710 99fdad57-331a-0410-800a-d7fa5415bdb3
personal git repositories of Harald Welte. Your mileage may vary