Age | Commit message (Collapse) | Author |
|
If the modem requires +COPS re-registration after setting modes,
use the common logic provided by the 3GPP interface, which
already knows e.g. whether the registration was automatic or the
actual requested operator id in case of being manual.
|
|
When using mm_base_modem_at_command_full(), the corresponding
mm_base_modem_at_command_full_finish() should be used.
|
|
The result of these commands may be different before and after SIM-PIN
unlock, so never cache them.
|
|
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
|
|
The debug-level logs won't be printed e.g. during 'make check', but
will be included when running the tester manually.
|
|
|
|
|
|
The GSM supplementary services related changes, as well as the rework
done to manage calls per call id, is copyrighted by Purism SPC.
|
|
We will parse +CTZU URCs, which end up getting in the way of other
commands if we don't process them.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/135
|
|
|
|
Early detect that ^SLCC is supported, and disable the call list
polling in the interface if so.
|
|
|
|
This command will give us URCs whenever the extended list of current
calls changes, which includes information about the actual state of
each call, even for calls in waiting state.
Therefore, as this is a URC that applies to all calls, it's enabled
and disabled as part of the modem voice interface, instead of doing it
as part of the call object itself (i.e. not treated as an in-call URC).
|
|
|
|
The first two ports are AT control ports (application/modem). We rely
on AT^SQPORT to decide which one is which.
The last two ports are unknown and we explicitly ignore them to make
port probing much quicker.
|
|
This CL converts a few g_regex_match_full() expressions to their
equivalent g_regex_match() in order to simplify the code, i.e.
g_regex_match_full (regex, str, strlen (str), 0, 0, &match_info, NULL)
is equivalent to:
g_regex_match_full (regex, str, -1, 0, 0, &match_info, NULL)
or simply:
g_regex_match (regex, str, 0, &match_info)
|
|
The custom +CIEV parser configured for Cinterion modems was
exclusively matching the "psinfo" indicator updates, which were the
ones really used afterwards.
But, in order to avoid having undesired URCs mixed with other command
responses, we should anyway match any +CIEV indicator reported, not
only "psinfo".
The text indicator ids used in +CIEV seem to bee specific to Cinterion
devices when they're configured via AT^SIND, so we do a generic match
for any lowercase ascii text as indicator id.
|
|
g_match_info_free() already check if the given pointer is NULL and does
nothing on a NULL pointer.
|
|
|
|
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.
|
|
And remove all custom logic from all plugins that were doing just that.
|
|
Use the same flag name across all plugins with support for
NMEA-capable TTYs.
|
|
The sort_band() method used in the tester was totally wrong, it was
comparing the addresses of the variables instead of the MMModemBand
values.
Use the common mm_common_bands_garray_sort() instead, which works as
expected.
|
|
The default AT^SCFG="Radio/Band" value for Cinterion PLS8-J devices is
"16819472". Add UMTS band 19 and LTE band 19 entries based on the
information given in the PLS8 datasheet.
|
|
This info comes from PLS8-X/E/J/V/US, HC25 & PHS8 references, the
last two can be found publicly via Google search.
Swapped bit-mask locations for G850 & PCS bands as they may have
changed with FW or where accidently put in the wrong place.
Updated many 3G & 4G bit-mask fields.
|
|
When a new USB device is hotplugged, e.g. a USB<->RS232 converter that
exposes a single ttyUSB0, these udev events happen:
add /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)
add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
bind /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)
Our udev rules in MM only added tags in the 'add' events, and it looks
like the only ones 'persistent' after this sequence are those of the
last event happening on the specific path.
This meant that all TTY subsystem rules (e.g. ID_MM_CANDIDATE) would
be stored for later check (e.g. if ModemManager is started after these
rules have been applied), which was ok. "udevadm info -p ..." would
show these tags correctly always.
But this also meant that the 'bind' udev event happening for the USB
device didn't get any of our device-specific tags, and so we would be
missing them (e.g. ID_MM_DEVICE_MANUAL_SCAN_ONLY) if MM is started
after the last event has happened. "udevadm info -p ..." would
not show these tags.
Modify all our rules to also run at the 'bind' events.
See, for context:
https://github.com/systemd/systemd/issues/8221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Updated to use the non-deprecated MMModemBand values.
|
|
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.
|
|
If the modem supports ^SIND psinfo reporting, we enable the URC and
flag the access technology polling unsupported, so that we only update
access technology via the +CIEV URCs.
E.g.:
(ttyACM1): --> 'AT^SIND="psinfo",1<CR>'
(ttyACM1): <-- '<CR><LF>^SIND: psinfo,1,10<CR><LF><CR><LF>OK<CR><LF>'
Reporting initial access technologies...
Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (unknown -> hsdpa, hsupa)
...
(ttyACM1): <-- '<CR><LF>+CIEV: psinfo,4<CR><LF>'
Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (hsdpa, hsupa -> edge)
...
|
|
We also remove the explicit refresh request from the Cinterion plugin,
as this is a generic action applicable to all modems that require
polling for signal quality and/or access technology.
|
|
Plugins have two ways to update signal quality and access technology
values: via unsolicited messages or via polling periodically.
Instead of keeping separate contexts for polling signal quality and
access technology values, we setup a common timeout to trigger
both. This allows us to simplify in which case the explicit update is
required, whenever one is needed to be explicitly updated, the other
one should also be.
The logic now also allows plugins to return an UNSUPPORTED error in
either load_signal_quality() and/or load_access_technologies() to tell
the interface logic that the polling of the specific item shouldn't be
performed (e.g. if the updates are expected via unsolicited messages).
If both signal quality and access technology polling is flagged as
disabled, we totally disable the polling logic internally.
The new SignalCheckContext is bound to the lifetime of the object so
that we can keep the value of the supported flags until the object is
destroyed.
|
|
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).
|
|
This is now managed directly in the generic plugin.
|