aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-02-01gsm: fix listing SMS messages in text modeDan Williams
Even though we don't parse them correctly yet, at least send the right command for listing them.
2012-02-01gsm: fix setting PDU mode for SMS messagesDan Williams
Stupid signed/unsigned mistake.
2012-02-01core: fix warning about MMModemTime interface initializationDan Williams
The MMModemTime interface was getting initialized more than once.
2012-01-27time: poll for timezoneThomas Tuttle
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
2012-01-27time: implement ModemTime in ModemBaseThomas Tuttle
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
2012-01-25time: implement MMModemTime boilerplateThomas Tuttle
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
2012-01-23core: fix copy & paste errorDan Williams
2012-01-23ussd: ensure coded string is valid before stripping quotesAleksander Morgado
2012-01-23ussd: plug a leakAleksander Morgado
2012-01-18gsm: fix return value of SMS send methodDan Williams
The introspection data specified the Send() method to return an array of unsigned integers, presumably the indexes of the messages just sent. But the code wasn't doing that, leading to a crash when dbus-glib tried to interpret garbage on the return. The problem is that sms_send_auth_cb() gave async_call_done() as the callback for sending the SMS, but that method just calls dbus_g_method_return() with no return arguments. dbus-glib interprets the arguments of dbus_g_method_return() according to the XML introspection data, and thus it was attempting to read the non-existent argument as an 'au' and getting garbage. Fix that by actually returning an array of message indexes from the SMS send code, and propagate that back to the SMS dbus code so it can return something sensible.
2012-01-18gsm: change SMS send validity from 5-minute units to minutesDan Williams
Might as well keep it simple.
2012-01-18gsm: fix CMGS PDU mode length calculationDan Williams
The first byte of the PDU is the SMSC length, but it's not the padded SMSC length. So we need to subtract the actual byte index of the start of the message from length of the PDU, and since the PDU creation function knows all about where the SMSC address stops and the message begins, just have it return that length instead of making the callers calculate it.
2012-01-18gsm: use PDU modem when the modem doesn't support text modeDan Williams
Eventually we should be using PDU mode whenever the modem supports it instead of defaulting to text mode, but there are still some bugs.
2012-01-18tests: add a test for 25-character SMS messagesDan Williams
Tests that the last septet (packed in an octet by itself) doesn't get left off the message like the old code used to do before "core: fix some bugs in GSM7 packing code".
2012-01-18core: fix some bugs in GSM7 packing codeDan Williams
The existing gsm_pack() had a bug where if the last septet should be in an octet by itself, that last octet wouldn't be added. Plus, kinda pointless to use a GByteArray here when we already know what the length will be through simple arithmetic. We can also simplify the function too. Furthermore, there weren't any testcases for starting packing at an offset other than zero, so add one.
2012-01-17gsm: add SMS PDU creation functionDan Williams
Only for basic SMS-SUBMIT PDUs at the moment, and doesn't support large SMSs yet.
2012-01-16core: register SMS errors with dbus-glibDan Williams
2012-01-16serial: handle CMS errors correctlyDan Williams
2012-01-16core: add CMS errorsDan Williams
2012-01-09sms: punt handling of 8-bit encoded SMSs to clientsDan Williams
There's no encoding information about 8-bit SMS messages, and they are often binary things like ringtones or voicemail indicator commands. Since there's no point to our parsing them just let clients deal with it.
2012-01-03cdma: fixes for libqcdm changesDan Williams
2011-12-30modem-helpers: plug a leak when parsing CREG responsesAleksander Morgado
2011-12-30modem-helpers: plug a leak when building device IDAleksander Morgado
2011-12-30serial-parsers: plug small leakAleksander Morgado
2011-12-14gsm: treat "no network" error as zero signal for Simple.GetStatusDan Williams
2011-12-07core: don't crash on error if response is NULLDan Williams
Various bits of the code didn't check if response was valid or not during error conditions, and when an error occurs sometimes it'll be NULL (since not all errors are translated errors from the modem, some are serial or general ones). We have to make sure we don't try to use response->str when response doesn't exist. Found in the generic CDMA code likely as a result of d5d9eec2b52363a7460aeec0c020b1c6a7af6b03 but was a bug long before that commit happened anyway.
2011-12-02gsm: improve scan response regex construction error handlingNathan Williams
Change the error handling to be a bit more like what appears to have been intended: if constructing the regex fails, report an error and return. The existing code looked like it was set up to do this, but wasn't quite wired together, and had process-terminating calls (g_error()) followed by other code. Change-Id: I4a7cee8fe01291976edc2e343fcbeb73e882f20b
2011-12-02sms: fix two bugs with multipart SMS handling: signals and listingNathan Williams
First, arrange for received/complete signals to be sent by calling cmti_received_has_sms() with the message properties even if the message isn't complete yet. Second, make the operation of the List command's multipart message handling independent of message order by doing one pass to insert the messages into the cache and second pass to retrieve the complete messages. Change-Id: I3dcae940d71aec3ddb65c508675f710d1567b0e2
2011-11-30trivial: remove unecessary semicolonsVitaly Gimly
2011-11-30cdma: free one more GErrorJiří Klimeš
2011-11-30gsm/cdma: free up a couple of dangling GErrorsNathan Williams
Change-Id: I4f07e7e08bcbfc116114191c759cc0af4bb8ea23
2011-11-30serial: report port-not-open in queueing commands via callbackNathan Williams
Reporting errors instead of just returning permits routines like mm-generic-gsm.c:simple_get_status() to work again, as their callbacks get the error they are expecting. To make this work, adapt get_csq_done() to handle a NULL response when error is set, and make sure that multiple errors don't step on each other in the mm_callback_info_chain() sequence created by simple_get_status(). Change-Id: Ie3a72b1ce71b7f117e8b1f3da7a406c4d2da9e02
2011-11-16gsm: check facility locks after unlocking PINDan Williams
Some modems don't allow most commands when they are PIN locked, so the initial facility lock check errors out. Check the locks again after the SIM is unlocked.
2011-11-16gsm: add new property to track which facility locks are enabledEric Shienbrood
The property EnabledFacilityLocks on the .Modem.Gsm.Card interface is a bit mask that indicates which of the various personalization codes from 3GPP TS 22.022, plus the SIM PIN lock and SIM PIN2 lock, are enabled. The set of facility locks supported by the modem is determined at the time the modem is initialized, and the state of each supported lock (enabled or disabled) is determined. When the state of a lock changes, a property-change signal is sent out. Note that ModemManager only supports enabling and disabling SIM-PIN, via the EnablePin method on Modem.Gsm.Card.
2011-11-16core: keep track of all PIN retry countsEric Shienbrood
Added a PinRetryCounts property on org.freedesktop.ModemManager.Modem. This is dictionary that records the number of PIN tries remaining for each of the possible PIN code types for which the modem is capable of reporting the count. Also, these counts are kept up to date across ChangePin and EnablePin operations, not just when an unlock is attempted.
2011-11-04serial: reject new commands when the port is closed.Nathan Williams
Otherwise, we can schedule a main loop call to mm_serial_port_queue_process() for an object that's about to disappear, leading to a crash. Change-Id: I433a76855c52536eb2b99a5ecf26ac71afe1f8bb
2011-11-03gsm: finish all disable commands before returningNathan Williams
Rearrange the primary and secondary-port disable operations so that there's a linear chain of callbacks rather than a second dangling callback chain for the secondary port; it's possible for the primary port operations to complete, and for the callback to finish and start tearing down the entire device, before the secondary port commands run. Change-Id: Ia95a7eae574737cdec38b14d39786127be1b3184
2011-11-02gsm: multipart SMS supportNathan Williams
Keep a local cache of SMS message fragments when we perform a List or Get command on the modem; use this cache to reassemble fragments into complete messages, which are then what is returned by the Get and List DBus commands. Similarly, cause Delete to delete all known parts of a multipart message. While here, remove some extra whitespace in the SMS commands we send to the modem.
2011-10-27gsm: fix parsing of unsolicited CREG/CGREG response with RACDan Williams
2011-10-27gsm: add regex for unsolicited CREG/CGREG response with RACDan Williams
2011-10-24serial: use g_value_set_schar() and g_value_get_schar() when glib >= 2.31Aleksander Morgado
2011-10-24core: don't include private headers from glibAleksander Morgado
The "glib/gtypes.h" is now considered private, and only "glib.h" should be included directly.
2011-10-18core: better handle NULL spew from serial ports during probingDan Williams
Observed on a generic ZTE device.
2011-10-17build: mm-modem-gsm.h no longer existsAleksander Morgado
2011-10-14serial: skip NUL bytes coming before real AT responsesAleksander Morgado
Some Cinterion modems send a NUL byte before the "CONNECTED" reply to "ATD" (only during the first ATD try anyway). This fix will ignore any NUL byte leading the real response.
2011-09-27core: ensure that GMatchInfo and GRegex objects are freed properlyNathan Williams
In particular, g_regex_match() and g_regex_match_full() allocate a match_info structure on both success and failure, so calling g_match_info_free() only in the success case is insufficient. BUG=None TEST=Inspection Change-Id: Iea76b5b5dc3ec48120e15601a5e2dd45322133d8
2011-09-27sms: sanitize 8-bit data so that it is UTF8-cleanNathan Williams
When receiving a SMS message with raw 8-bit data, sanitize it by replacing non-ASCII characters with \xNN escape sequences. This prevents a problem further down the line where the body of the message is passed into DBus as a string, and DBus requires strings to be UTF-8. BUG=chrome-os-partner:5953 TEST=Run network_ModemManagerSMS.py with the PDU from this bug. Change-Id: Ic33a365f9a065c49a325e047e4c3f5e81450fa1f Reviewed-on: http://gerrit.chromium.org/gerrit/8232 Reviewed-by: Eric Shienbrood <ers@chromium.org> Tested-by: Nathan J. Williams <njw@chromium.org> Commit-Ready: Nathan J. Williams <njw@chromium.org>
2011-09-08modem: add firmware interfaceThomas Tuttle
2011-08-30gsm/cdma: unsigned integers can't be < 0, so remove unnecessary conditionsAleksander Morgado
It fixes compilation with the llvm/clang compiler as well.
2011-08-21gsm: pass GSM registration errors up to callerEric Shienbrood
Register was appearing to succeed even when it failed.