aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion/mm-common-cinterion.c
AgeCommit message (Collapse)Author
2018-08-21cinterion: new 'MMSharedCinterion' interfaceAleksander Morgado
Implement a new interface to keep the code shared between the QMI and non-QMI modem implementations. While doing that, also fix the parent interface pointer handling, so that it isn't a static pointer applicable to all modems, and make it a per-modem specific pointer. Without this fix, ModemManager would crash if e.g. running with both a QMI and non-QMI Cinterion modem at the same time. The new shared Cinterion logic will be in charge of managing all GPS sources not already managed by the parent interface. E.g. if the parent implementation already supports QMI-based GPS location (using the LOC service for example) prefer that to the custom AT-based logic.
2017-07-07cinterion: check error returned by g_task_propagate_error insteadBen Chan
When returning an enum value via g_task_return_int, some code assumes the enum value is always non-negative and thus considers that a negative value implies an error. This assumption could be invalidated if a negative value is later added to the enum. To make it less error prone to future changes, this patch modifies the code to check if the GError argument to g_task_propagate_error is populated instead.
2017-05-30cinterion: retry GPS Engine activation up to 3 timesAleksander Morgado
The default setup with 100ms between GPS commands doesn't seem to be always enough for the Engine activation step: [1495016625.392972] (ttyACM1): --> 'AT^SGPSC="NMEA/Output","on"<CR>' [1495016625.503885] (ttyACM1): <-- '<CR><LF>^SGPSC: "Nmea/Output","on"<CR><LF><CR><LF><CR><LF>OK<CR><LF>' [1495016625.607650] (ttyACM1): --> 'AT^SGPSC="Power/Antenna","on"<CR>' [1495016625.697862] (ttyACM1): <-- '<CR><LF>^SGPSC: "Power/Antenna","on"<CR><LF><CR><LF>OK<CR><LF>' [1495016625.809393] (ttyACM1): --> 'AT^SGPSC="Engine","1"<CR>' [1495016625.895970] (ttyACM1): <-- '<CR><LF>+CME ERROR: 767<CR><LF>' We now setup up to 3 retries for the Engine activation step before returning an error, and we also update to 2000ms the wait time before the Engine activation command is run.
2017-05-30cinterion: support AT^SGPSC capable modemsAleksander Morgado
The AT^SGPSS command provides an easy way to just start/stop GPS, but unfortunately it isn't supported by all Cinterion modems. The AT^SGPSC command instead is more widely available but it requires several steps to start and stop the different elements of the GPS receiver. Implement support for both, preferring AT^SGPSSS if available and falling back to AT^SGPSC otherwise.
2017-05-30cinterion: setup GPS port only if GPS support detectedAleksander Morgado
i.e. if AT^SGPSS not supported, we don't even add traces handler to the GPS data port.
2017-05-30cinterion,location: refactor enable/disable and capabilities checksAleksander Morgado
When checking for location capabilities, we will make sure AT^SGPSS is supported and if it isn't we won't report GPS capabilities. The location enable and disable paths are refactored to make it easier to add possible new GPS commands to use instead of AT^SGPSS, if this isn't supported (e.g. in the PLS8 devices).
2014-07-02cinterion: allow 'unmanaged' GPS setupAleksander Morgado
2014-07-01cinterion: enable GPS location reporting for the PHS8 in QMI-modeAleksander Morgado
The PHS8 in QMI-mode doesn't support GPS location retrieval via QMI, so we will fallback to use the AT-based setup and the TTY for reading NMEA traces.