Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
i.e. if AT^SGPSS not supported, we don't even add traces handler to
the GPS data port.
|
|
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).
|
|
|
|
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.
|