aboutsummaryrefslogtreecommitdiff
path: root/src/mm-sim.c
AgeCommit message (Collapse)Author
2013-01-08iface-modem,sim: improve lock info update logicAleksander Morgado
The logic to handle the lock information (current lock and unlock retry count) wasn't handling all possible cases properly, e.g.: * When PIN is incorrectly entered too many times, a SIM-PUK error may happen. In this case we need to directly assume SIM-PUK is the current lock (some modems, like Option HSO ones, would incorrectly reply SIM-PIN if CPIN? asked just after the SIM-PUK error). * After every operation acting in SIM locks, we need to update the current unlock retry count. This change tries to cover those cases, by: * The logic to check current lock is extended to also load the unlock retry count when needed. * Whenever a SIM-PUK error happens in the SIM operations, we directly assume that SIM-PUK is required, without re-asking CPIN?. * The overall logic of lock checking is now handled by a state machine, which is much easier to understand.
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
2012-09-14libmm-common: added common utils from coreAleksander Morgado
Moved the utils to play with binary to hex strings into libmm-common.
2012-08-31sim: better handling of IMSI responseAleksander Morgado
This is a port to git master of the following commit: commit 0b051f9c7033143c56f59267794d1cadf4bd3416 Author: Dan Williams <dcbw@redhat.com> Date: Mon Aug 27 10:24:50 2012 -0500 gsm: better handling of IMSI response Moto EZX devices prefix the response with "+CIMI:" while most devices do not.
2012-08-27sim: validate IMSI value in +CIMI responseBen Chan
2012-07-26sim: getting SIM-PIN2 lock doesn't mean PIN sending failedAleksander Morgado
2012-03-28sim: plug memleakAleksander Morgado
2012-03-28sim: fix completion of pin-puk checkAleksander Morgado
2012-03-16core: new `Initializing' state in the global modem state machineAleksander Morgado
We need to define a state to be used while the modem is being initialized, so that we forbid any operation on the modem on already exported interfaces, while there are interfaces pending to get exported. This Initializing state will also cover the state between having the SIM unlocked (which launches re-initialization) and being completely initialized.
2012-03-16sim: don't require the Modem object in the contextAleksander Morgado
It's already easily available in self->priv->modem;
2012-03-16base-modem: implement new modem-wide cancellable, and rework AT commandsAleksander Morgado
Instead of the `_in_port()' variants, we'll provide more generic `_full()' methods. These should be used either if we want to send commands to a specific port, or if we want to use a specific user-provided GCancellable. In addition to this user-provided GCancellable, we keep the internal modem-wide one.
2012-03-16base-modem: new port getters and peekersAleksander Morgado
* mm_base_modem_peek_port_* () will return either a port object (no new reference), or NULL if none available. You would usually peek() a port if you're going to use it just in the current method, as there is no way to that reference to get invalid (we're single threaded). * mm_base_modem_get_port_* () will return either NEW references to valid port objects, or NULL if none available. And, you would usually get() a port, whenever you want the port object to be valid even out of the current method, for example when keeping it in the context of an async operation. Also, we need to consider that the primary AT port MAY BE NULL when you peek() or get() it. This is due to the fact that we may be releasing ports (due to device disconnection) in the middle of async operations.
2012-03-16sim: update unlock retry counts after PIN change/enable operationsAleksander Morgado
2012-03-16sim: signal when the pin lock enabling status changesAleksander Morgado
2012-03-16sim: include policy authorization checksAleksander Morgado
2012-03-15sim: allow subclasses to specify they can't load property valuesAleksander Morgado
2012-03-15sim: leave up to 10s for CRSM queriesAleksander Morgado
2012-03-15sim: avoid passing source of the async object in finishAleksander Morgado
2012-03-15sim: allow subclassing pin change/enablingAleksander Morgado
2012-03-15sim: allow subclassing pin/puk sending operationsAleksander Morgado
2012-03-15sim: allow subclassing the SIM objectAleksander Morgado
Plugins can subclass the MMSim object and provide custom implementations of the actions performed by the object.
2012-03-15sim: export only valid objectsAleksander Morgado
2012-03-15core: use new enums/flags string getters/buildersAleksander Morgado
2012-03-15sim: minor code simplificationAleksander Morgado
2012-03-15sim: handle initialization failures properlyAleksander Morgado
We should't use MM_SIM() on possibly NULL values.
2012-03-15sim: use g_clear_object() before setting new objectsAleksander Morgado
2012-03-15sim: new SIM path getterAleksander Morgado
2012-03-15sim: allow sending PIN code internally, not just via DBusAleksander Morgado
2012-03-15core,libmm-glib: include ony `libmm-common.h'Aleksander Morgado
Don't include one by one all the headers from libmm-common, just include the global `libmm-common.h' which includes all the others.
2012-03-15sim: only unexport object if currently exportedAleksander Morgado
Avoid trying to unexport the object if it was never exported before.
2012-03-15sim: bind connection property right awayAleksander Morgado
2012-03-15sim: make sure we unexport the SIM object when destroying itAleksander Morgado
Usually, if not always, the connection stored in the SIM object never exists when disposing it, as we clear the connection property in the Modem object before destroying it, and both properties are bound. But just in case, in order to avoid ending up with a zombie object in DBus, we make sure we unexport it.
2012-03-15sim: plug memleak, free path on finalize()Aleksander Morgado
2012-03-15core: port to use the new AT command/sequences in the MMBaseModem APIAleksander Morgado
2012-03-15sim: during init, fall down to next states directlyAleksander Morgado
2012-03-15core: start using our newly defined errorsAleksander Morgado
2012-03-15sim: handle SendPin() and SendPuk() callsAleksander Morgado
2012-03-15sim: handle EnablePin() callsAleksander Morgado
2012-03-15sim: handle ChangePin() callsAleksander Morgado
2012-03-15sim: allow re-launching initializationAleksander Morgado
It may happen that we cannot load property values when the SIM is locked, so we need to enable re-launching initialization in the object API.
2012-03-15sim: load OperatorName during initAleksander Morgado
2012-03-15sim: load OperatorIdentifier during initAleksander Morgado
2012-03-15sim: load IMSI during initAleksander Morgado
2012-03-15sim: load SIM Identifier during initAleksander Morgado
2012-03-15core: new MMSim object, inherits from MmGdbusSimAleksander Morgado