aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.c
AgeCommit message (Collapse)Author
2017-03-17iface-modem-3gpp: use mm_3gpp_parse_operator_id() instead of custom codeDan Williams
2016-10-123gpp: update registration state enumeration with CSFB related statesAleksander Morgado
Introduce "sms only" and "CSFB not preferred" home/roaming states to be reported for the CS context, while already registered on LTE. Based on 3GPP TS 27.007 v13.5.0.
2015-12-02core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncsAleksander Morgado
2015-10-15iface-modem-3gpp: allow LAC/CID updates reported while registeringAleksander Morgado
When changing from idle to registered we'll load registration info before really reporting that we're registered (so that clients can get the new registration info directly). During this time, we should also allow LAC/CID updates triggered in the location interface. E.g. when receiving this QMI message, we're not processing LAC/CID because when they get reported, the registration state was not yet 'registered': [/dev/cdc-wdm0] Received message (translated)... >>>>>> QMUX: >>>>>> length = 67 >>>>>> flags = 0x80 >>>>>> service = "nas" >>>>>> client = 1 >>>>>> QMI: >>>>>> flags = "indication" >>>>>> transaction = 0 >>>>>> tlv_length = 55 >>>>>> message = "Serving System" (0x0024) >>>>>> TLV: >>>>>> type = "MNC PCS Digit Include Status" (0x29) >>>>>> length = 5 >>>>>> value = D6:00:01:00:00 >>>>>> translated = [ mcc = '214' mnc = '1' includes_pcs_digit = 'no' ] >>>>>> TLV: >>>>>> type = "LTE TAC" (0x25) >>>>>> length = 2 >>>>>> value = 08:01 >>>>>> translated = 264 >>>>>> TLV: >>>>>> type = "Detailed Service Status" (0x22) >>>>>> length = 5 >>>>>> value = 02:03:00:01:00 >>>>>> translated = [ status = 'available' capability = 'cs-ps' hdr_status = 'none' hdr_hybrid = 'yes' forbidden = 'no' ] >>>>>> TLV: >>>>>> type = "CID 3GPP" (0x1e) >>>>>> length = 4 >>>>>> value = 01:A1:4D:04 >>>>>> translated = 72196353 >>>>>> TLV: >>>>>> type = "LAC 3GPP" (0x1d) >>>>>> length = 2 >>>>>> value = FE:FF >>>>>> translated = 65534 >>>>>> TLV: >>>>>> type = "Current PLMN" (0x12) >>>>>> length = 5 >>>>>> value = D6:00:01:00:00 >>>>>> translated = [ mcc = '214' mnc = '1' description = '' ] >>>>>> TLV: >>>>>> type = "Data Service Capability" (0x11) >>>>>> length = 2 >>>>>> value = 01:0B >>>>>> translated = { [0] = 'lte '} >>>>>> TLV: >>>>>> type = "Serving System" (0x01) >>>>>> length = 6 >>>>>> value = 01:01:01:02:01:08 >>>>>> translated = [ registration_state = 'registered' cs_attach_state = 'attached' ps_attach_state = 'attached' selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ] <debug> [1444895382.427216] Processing 3GPP info... <info> [1444895382.433423] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (idle -> registering) [ Here we tried to update LAC/CID ] <debug> [1444895382.439668] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP location updated (MCC: '214', MNC: '1', Location area code: '0', Cell ID: '0') <info> [1444895382.446788] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (registering -> home) <info> [1444895382.452383] Modem /org/freedesktop/ModemManager1/Modem/3: state changed (enabled -> registered)
2015-10-15mm-broadband-modem: trigger registration checks only after enabling all ifacesAleksander Morgado
Given that the Location interface requires 3GPP info reported by the 3GPP interface, we should only trigger registration checks once the Location interface has been already enabled and ready to be used. If we don't do this, we'll end up e.g. getting initial MCCMNC values but never reaching the Location interface properly. So, fix this by triggering all registration checks (CDMA and 3GPP) only after having enabled all interfaces.
2015-02-23iface-modem-3gpp: used DENIED registration state if others are UNKNOWNDan Williams
If all other registration states are UNKNOWN, use a registration state of DENIED as the global modem state.
2014-07-06sim: rename 'MMSim' to 'MMBaseSim'Aleksander Morgado
Just so that we don't have same header names in src/ and /libmm-glib.
2014-02-28iface-modem-3gpp: request access tech update after registration attemptAleksander Morgado
2014-01-18altair-lte: set subscription state using PCOThieu Le
This patch sets the subscription state using Verizon's PCO values.
2013-10-09iface-modem-3gpp: add SubscriptionState propertyThieu Le
2013-05-20iface-modem-3gpp: remove the deferred registration updatesAleksander Morgado
We should really notify registration updates right away in the DBus interface.
2013-03-28iface-modem-3gpp: handle access technology change in operator_loading stateori inbar
This patch fixes a problem of disregarding CEREG/CGREG/CREG reported access technology since we are in "registering" state - meaning we are loading operator name+code. now even in this transition state the ACT is updated.
2013-03-28iface-modem-3gpp: let plugins ignore facility locksAleksander Morgado
Plugins may decide which facility locks can be completely skipped from the list being checked.
2013-03-05iface-modem-3gpp: handle non-deferrable registration state updatesBen Chan
This patch changes MMIfaceModem3gpp to differentiate between deferrable and non-deferrable 3GPP registration state updates. Periodic or unsolicited registration state updates are deferrable, while internal updates, e.g. due to modem being disabled, are non-deferrable.
2013-03-01iface-modem-3gpp: avoid re-setting deferred registration update while disablingAleksander Morgado
Don't clear the current deferred registration update until having disabled and cleaned up unsolicited registrations state messages, or we may end up re-setting the deferred registration update again meanwhile
2013-03-01iface-modem-3gpp: clear deferred registration state update when disablingBen Chan
2013-02-25iface-modem-3gpp: defer registration state update when registration is lostBen Chan
This patch defers the update of 3GPP registration state by 15 seconds when the registration state changes from 'registered' (home / roaming) to 'searching'. This allows a temporary loss of 3GPP registration to recover itself when relying on ModemManager to explicitly disconnect and reconnect to the network.
2013-02-15modem: use +CEREG to determine EPS network registration statusBen Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default.
2013-01-03iface-modem-3gpp,iface-modem-cdma: check for deallocated ↵Ben Chan
RegistrationCheckContext This patch fixes a crash in periodic_registration_checks_ready() due to access of an already deallocated RegistrationCheckContext. Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 ) 0x7fc344d355cd [ModemManager] - mm-iface-modem-cdma.c:1112 periodic_registration_checks_ready 0x7fc3449ea266 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:767 g_simple_async_result_complete 0x7fc3449ea368 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:779 complete_in_idle_cb 0x7fc344851dc4 [libglib-2.0.so.0.3200.4] - gmain.c:2539 g_main_context_dispatch 0x7fc344852147 [libglib-2.0.so.0.3200.4] - gmain.c:3146 g_main_context_iterate 0x7fc3448525a1 [libglib-2.0.so.0.3200.4] - gmain.c:3340 g_main_loop_run 0x7fc344d0f154 [ModemManager] - main.c:158 main 0x7fc34426a474 [libc-2.15.so] - libc-start.c:234 __libc_start_main 0x7fc344d0eb68 [ModemManager] + 0x0001bb68
2012-10-11core: make sure objects retrieved with g_object_get() are valid in the ifacesAleksander Morgado
The interfaces usually retrieve objects (e.g. skeletons) from the Modem object using g_object_get(), but we didn't make sure that these objects were actually valid before using them. This should clean up errors happening when the modem gets unplugged and still some actions are ongoing. Should fix https://bugzilla.gnome.org/show_bug.cgi?id=685933
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-14iface-modem-3gpp: update state to REGISTERED after loading operator code/nameAleksander Morgado
Call managers all want to be able to set the operator ID and/or name as soon as we get registered. We will consider now that whenever we get into registered state we already have operator code and name updated to the proper values. Applications shouldn't, though, just rely on those values to be valid as long as we're registered, as the modem may re-register automatically in some other network (e.g. going from a roaming network to the home network). This change involves not setting the state to REGISTERED until operator name and code loading sequences have been run. We will still signal in the log the change, with a new 'registering' intermediate state indication.
2012-08-29iface-modem-3gpp: provide separate methods to update access tech and locationAleksander Morgado
2012-08-29iface-modem-3gpp: log about which registration check will be runAleksander Morgado
2012-08-29iface-modem-3gpp: implement the network registration request logicAleksander Morgado
In the generic broadband modem implementation we'll just implement the specific command to request auto/manual network registration, and we leave all the other logic (waiting for the new registration status and all that) in the interface, as it is really common for every possible implementation.
2012-08-28iface-modem-3gpp: don't try to update anything if no skeleton availableAleksander Morgado
2012-08-06iface-modem-3gpp: when disabled, cleanup interface propertiesAleksander Morgado
2012-08-06iface-modem-3gpp: refactor registration sequencesAleksander Morgado
Once upon a time it was a good idea to have separate steps for CS and PS related actions, so that plugins could override specific steps with a great detail. That idea turned out to be not very useful, as the only case which requires custom CS/PS registration actions is the QMI-enabled modem, and that one has commands to act on both registration actions at the same time. So, we now consolidate all steps, so that the implementation of the interface needs to provide all the logic to setup/enable/disable/cleanup/check registrations in each mode. Also, we consolidate how the unsolicited registration messages are handled, so that it's equivalent to other unsolicited messages: * 'Setup' will configure ports to process the unsolicited messages. * 'Enable' will tell the modem to send unsolicited messages. * 'Disable' will tell the modem not to send unsolicited messages. * 'Cleanup will configure ports to ignore the unsolicited messages.
2012-08-06iface-modem-3gpp: removed the 'setup indicators' stepAleksander Morgado
The previous logic would first request to check if indicators were supported, and only then allow to setup/enable/cleanup/disable unsolicited events. This behaviour is very specific to the generic 3GPP case, and therefore it shouldn't be handled in the even more generic 3GPP interface. The logic is still kept, but handled within the MMBroadbandModem object.
2012-07-25iface-modem-3gpp: fix variant ref countAleksander Morgado
2012-07-13iface-modem-[3gpp|cdma]: remove contexts with timeouts when shutting downAleksander Morgado
Following the same logic as in commit 9ddcf92a, those contexts in the interface which contain the setup of a timeout are cleared before removing the DBus skeleton objects, so that we make sure they are not fired out once these have been disposed.
2012-03-30core: fatal errors in iface initializations force the modem into a FAILED stateAleksander Morgado
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no capabilities) will be exposed in DBus, but just with the Modem interface and in a FAILED state which allows no actions.
2012-03-293gpp: let operator name/code reloading be requested by implementationsAleksander Morgado
2012-03-293gpp: errors when reloading operator name/code will reset the values in the ↵Aleksander Morgado
interface
2012-03-16iface-modem-3gpp: if already registered as requested, don't try to register ↵Aleksander Morgado
from scratch
2012-03-16iface-modem-3gpp: let initialization and enabling sequences get cancelledAleksander 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-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-16libmm-common: `MMSimpleStatus' won't be considered internal any moreAleksander Morgado
Renamed `MMCommonSimpleProperties' to `MMSimpleStatus', and removed the `MMSimpleStatusProperties' provided in libmm-glib. We'll just use the original one from libmm-common always.
2012-03-16iface-modem-3gpp: update facilities mask when SIM PIN lock enabling status ↵Aleksander Morgado
changes
2012-03-16iface-modem-3gpp: load initial set of enabled facility locksAleksander Morgado
2012-03-16core: remove uses of `MMModemStateReason'Aleksander Morgado
Use `MMModemStateChangeReason' instead.
2012-03-16iface-modem-3gpp: include policy authorization checksAleksander Morgado
2012-03-16iface-modem-3gpp: include in the API the mask of all 3GPP access technologiesAleksander Morgado
2012-03-15core: don't pass primary port to interface initializationsAleksander Morgado
They will all get it themselves.
2012-03-15iface-modem-3gpp: avoid segfault with empty MCCMNCAleksander Morgado
2012-03-15iface-modem-3gpp: update access tech and location even if registration ↵Aleksander Morgado
didn't change
2012-03-15iface-modem: s/access_tech/access_technologiesAleksander Morgado
2012-03-15iface-modem-3gpp: split unsolicited events setup and enablingAleksander Morgado
Configuring unsolicited events involves: * Setup unsolicited events. This handles the setup of the unsolicited message handlers in the AT ports, including the setup of the callback to get called when the unsolicited messages are received. * Enable unsolicited events. This tells the modem to actually send the unsolicited messages. * Disable unsolicited events. This tells the modem to stop sending unsolicited messages. * Cleanup unsolicited events. This removes the unsolicited message handlers in the AT ports.
2012-03-15iface-modem-3gpp: 3GPP bearer creation removedAleksander Morgado