xmm7360_byte_array_read_asn_int() would keep bit-shifting a gint into
oblivion if the int's size was > 32-bit. It also didn't handle size 0
ints at all, and while size 24 ints would get stuffed into a 32-bit
variable those probably aren't a thing and if they actually are they
should get specifically handled.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
So we can unit-test all the parsing and building code more easily
without having to link to a bunch of serial port stuff.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
If the error matches, then a `+CIMI` command is sent to the device and
processing continues. However, the current error (for the `+CPIN?` command)
is not freed or propagated, fix that.
Fixes: 5c1fcbfe4a ("mtk-legacy: read IMSI if CPIN response is an error")
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
The MTK specific modem object should be included in the 'mtk' shared
utils, so that they're available to other plugins.
Signed-off-by: Aleksander Morgado <aleksandermj@google.com>
Current cell broadcast messages from missile warnings in Israel
have an addition `00` at the end to pad for an even byte number.
This breaks conversion making the whole message fail conversion. As this
is a 15 part message in 3 languages the whole notification is lost in
this case.
Try harder to convert the message and recover even partial bits.
Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/1042
Signed-off-by: Guido Günther <agx@sigxcpu.org>
The port type hints for the RW101-cat6 and RW101-cat12 have been
updated, with USB interface #2 now designated as both the AT primary
port and fastboot port.
Signed-off-by: Wenbin <ywbjob@163.com>
only GGA NMEA sentences are supported by current implementation of
MMLocationGpsRaw. RMC and GLL messages are added, but currently test
are negative.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To be able to have quick position fix GNSS engine needs to know
- predicted orbits data,
- current time,
- approximate position.
Modem sends indications with requests, when it needs corresponding
information. Predicted orbits can be injected using
'mmcli -m any --location-inject-assistance-data=<file>'. But to
accelerate time to first fix after cold start extra information is
needed like time and coarse position.
Inject position requests are received, when GPS session is initiated
using QMI_LOC_START. In inject position request modem sends
information about its last known position. If last known position is
zero, when this is a cold start and inject position is needed to
improve TTFF.
Last position from the modem is cached in ModemManager and is injected
next time, when modem requests it. For example, if modem is restarted.
When timestamp on injected position is too old, than position is
ignored and location engine does cold start. Therefore current time is
used for injected position.
When injected position is far away the actual one (for example, after
flight), after some time location engine falls back to cold start.
Tested on Quectel EG25-G.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
This class allows to preserve cached position across ModemManager restarts.
Cached location can be used to improve time to first fix after device
start by injecting coarse position into location engine. Since there
wasn't any fix yet, position in ModemManager is unknown. To fix this
cached location is saved on disk (/var/lib/ModemManager/location.ini)
when location session is stopped or ModemManager is stopped and loaded
on the next start from the file.
install_emptydir is introduced in meson 0.60.
Distributions has to create directory to store cached location in
packaging, because ModemManager runs under systemd isolation with
limited rights and it can't create this directory by itself.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To be able to have quick position fix GNSS engine needs to know
- predicted orbits data,
- current time,
- approximate position.
Modem sends indications with requests, when it needs corresponding
information. Predicted orbits can be injected using
'mmcli -m any --location-inject-assistance-data=<file>'. But to
accelerate time to first fix after cold start extra information is
needed like time and coarse position. This commit injects UTC time.
UTC time inject requests are received, when GPS session is initiated
using QMI_LOC_START.
Tested on Quectel EG25-G.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
UML290 with firmware L0290VWBB12F.248 doesn't support QMI network
time and crashes when asked for AT network time too quickly after
being plugged in.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Qualcomm suggests to use mux id values >= 0x81: though this does not
seem a strict mandatory rule, there are scenarios in which the usage of
a specifix mux id is required otherwise various kind of issues could
happen (e.g. call failure, limited throughput...).
A new ID_MM_INITIAL_QMAP_MUX_ID udev tag allows setting the first initial
mux id value to be used when creating the multiplexed data connection.
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Latest libqmi adds QMI_NAS_RADIO_INTERFACE_NO_CHANGE which will
cause failures when building with -Wall if NO_CHANGE isn't handled
in switch() statements. So we add that. But then of course you can't
build with older libqmi because it doesn't have NO_CHANGE.
So just bump the requirement.
Signed-off-by: Dan Williams <dan@ioncontrol.co>