Commit Graph

7059 Commits

Author SHA1 Message Date
Aleksander Morgado
10ee7f4cd9 mbim,signal: make sure output pointers are always set
E.g. if 'gsm' pointer is given, make sure it's always set (either to a
MMSignal or to NULL).
2020-07-04 05:50:41 +02:00
Aleksander Morgado
0dd1f12222 mbim,signal: provide 5G signal info if loaded by parent implementation 2020-07-04 05:50:41 +02:00
Walter Hagstrom
88923ffe39 iface-modem-signal: added 5G signal information
Extended the ModemManager Signal interface to include 5G signal
information for RSRP, RSRQ and SINR via libqmi.  Also extended mmci
to print 5G signal info.
2020-07-04 05:50:41 +02:00
Aleksander Morgado
711b17278e build: require 5G signal info support from libqmi 1.27.1 2020-07-04 05:50:41 +02:00
Adrien Plazas
6df9cc0844 plugin: define an autofree value to NULL
This satisfies -Werror=maybe-uninitialized.
2020-07-03 08:26:57 +02:00
Daniele Palmas
fff47478cc telit: added port type hints for default MEx10G1 composition
While at this change also the previous generic reference to ME910
in order to differentiate between ME910C1 (based on MDM9206) and
MEx10G1 (based on MDM9205).
2020-07-02 13:09:19 +02:00
Aleksander Morgado
23f8b580c3 quectel,shared: implement custom time support check
We require CTZU=3 during the time support check, instead of CTZU=1, so
that the Quectel modem reports localtime instead of UTC time in +CCLK.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/233
2020-06-30 13:12:25 +02:00
Aleksander Morgado
ffca45d9cc quectel,shared: add GPS trace handler 2020-06-29 08:53:00 +00:00
Aleksander Morgado
70b7218b7b huawei: only flag GPS source as enabled if it was successful 2020-06-29 08:53:00 +00:00
Aleksander Morgado
af8afcc6c9 quectel,shared: only flag GPS source as enabled if it was successful 2020-06-29 08:53:00 +00:00
Aleksander Morgado
619b054e5c libmm-glib,location: avoid warnings when no traces available
ModemManager[201411]: <debug> [1593417744.011884] [modem0/ttyUSB1/gps] <-- '$GPVTG,,T,,M,,N,,K,N*2C<CR><LF>$GPGSA,A,1,,,,,,,,,,,,,,,*1E<CR><LF>$GPGGA,,,,,,0,,,,,,,,*66<CR><LF>$GPRMC,,V,,,,,,,,,,N*53<CR><LF>'

    (ModemManager:201411): GLib-CRITICAL **: 10:02:24.054: g_strjoinv: assertion 'str_array != NULL' failed

    Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
    0x00007ffff7832473 in g_logv () from /usr/lib/libglib-2.0.so.0
    (gdb) bt
    #0  0x00007ffff7832473 in g_logv () at /usr/lib/libglib-2.0.so.0
    #1  0x00007ffff78326f0 in g_log () at /usr/lib/libglib-2.0.so.0
    #2  0x00007ffff7846b5e in g_strjoinv () at /usr/lib/libglib-2.0.so.0
    #3  0x00007ffff7ee9663 in mm_location_gps_nmea_get_string_variant (self=0x5555557dde50) at mm-location-gps-nmea.c:246
    #4  0x00005555555e7c47 in build_location_dictionary (previous=0x0, location_3gpp=0x55555573e660, location_gps_nmea=0x5555557dde50, location_gps_raw=0x0, location_cdma_bs=0x0)
        at mm-iface-modem-location.c:183
    ...
    (gdb) fr 3
    #3  0x00007ffff7ee9663 in mm_location_gps_nmea_get_string_variant (self=0x5555557dde50) at mm-location-gps-nmea.c:246
    246	    built = g_strjoinv ("\r\n", traces);
    (gdb) p traces
    $1 = (GStrv) 0x0
2020-06-29 08:53:00 +00:00
Aleksander Morgado
60211b51b1 quectel,shared: use QGPS=? test to check capabilities 2020-06-29 08:53:00 +00:00
Aleksander Morgado
58dbb68fa0 quectel,qmi: add QGPS based fallback support 2020-06-29 08:53:00 +00:00
Aleksander Morgado
78d19c10ba quectel,shared: port GPS enabling to use AT sequence 2020-06-29 08:53:00 +00:00
Aleksander Morgado
41ba7d667a huawei: simplify GPS stop logic
The NMEA data port is closed right before stopping the engine.
2020-06-29 08:53:00 +00:00
Aleksander Morgado
aa4851ed03 huawei: port GPS enabling to use AT sequence 2020-06-29 08:53:00 +00:00
Aleksander Morgado
bbca65d682 quectel,shared: skip QGPS? check after enabling/disabling failures
If any enabling/disabling command fails, we consider the operation
failed, regardless of the QGPS status. This is because e.g. enabling
involves more operations than just QGPS=1, and so we should treat a
failure in the command sequence as a failure in the whole operation.
2020-06-29 08:53:00 +00:00
Aleksander Morgado
bbfc10d7c5 huawei: minor refactor in GPS enabling/disabling logic 2020-06-29 08:53:00 +00:00
Aleksander Morgado
538ed3f24e quectel,shared: don't report GPS capabilities if no GPS port found
The QGPS based implementation needs the existence of a port flagged as
GPS data; if there is no such port, we cannot provide GPS support.
2020-06-29 08:53:00 +00:00
Aleksander Morgado
77f6637750 quectel,shared: fix reporting supported location capabilities
The method that reports what location capabilities are supported must
report the capabilities provided by the parent interface plus the
additional capabilities supported by the shared implementation.

Also, simplify the logic a bit reducing the amount of implemented
methods.
2020-06-29 08:53:00 +00:00
Aleksander Morgado
0f9d69fd35 quectel,shared: private context at beginning of source file 2020-06-29 08:53:00 +00:00
Aleksander Morgado
234ba4544b quectel: coding style fixes in the QGPS logic 2020-06-29 08:53:00 +00:00
Aleksander Morgado
5a9d321346 quectel,shared: fix parent location disabling
The GTask must be passed as user_data.
2020-06-29 08:53:00 +00:00
ArenM
df393df147 quectel: implement GPS support with +QGPS
Quectel modems allow provide location information via AT commands.
Add this as a location source.
2020-06-29 08:53:00 +00:00
Aleksander Morgado
4b37b7d3cf base-modem,at: response processors return a more specific enum
Instead of using the FALSE return of the method to indicate either a
fatal error (if result_error was set) or the continuation request (if
result_error wasn't set), provide a enum that has explicit states for
all three possible values (failure, success or continue).
2020-06-28 15:07:34 +02:00
Aleksander Morgado
c4d82aaf1e base-modem,at: improve documentation on response processor methods 2020-06-28 15:07:34 +02:00
Aleksander Morgado
7e3863897e broadband-modem: run implicit disabling if enabling fails
The disabling sequence is updated so that the steps to disable the
interfaces never fail. This is done so that the modem is not left
in an "inconsistent" enabled state, if e.g. the modem is enabled and
one of the disabling steps for the interfaces ends up failing. In this
case, it is preferred to say that the modem is disabled, than having
it wrongly enabled.

The enabling sequence is updated so that if any of the steps to enable
the interfaces fail, we end up running an implicit disabling operation
to disable all the interfaces. This is to attempt to cleanup whatever
we had enabled during the enabling operation, including e.g. the open
ports context.
2020-06-28 08:17:25 +00:00
Aleksander Morgado
408e9f327e broadband-modem-qmi: fix assertion when disabling unsolicited events
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/230
2020-06-24 09:31:30 +02:00
Aleksander Morgado
c6d213d652 broadband-modem-qmi,bearer-qmi: avoid depending on the client version
The QMI client version is an information provided by the QMI protocol
only when QMUX or MBIM backends are used, it won't be available when
e.g. QRTR is used. The logic in ModemManager should not rely on this
information.
2020-06-23 12:29:05 +00:00
Aleksander Morgado
62956b5c7a build: post-release version bump to 1.15.0 2020-06-23 14:22:39 +02:00
Aleksander Morgado
5f20662aeb release: bump version to 1.14.0 2020-06-23 14:06:03 +02:00
Aleksander Morgado
71d65bbe7e u-blox: always ignore M8 and M9 GPS modules 2020-06-22 14:10:28 +02:00
Aleksander Morgado
fbf3875344 blacklist: add chinese clone of Arduino nano
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/228
2020-06-22 09:30:09 +02:00
Aleksander Morgado
5cbeeb1b99 build: require libqmi 1.26.0 2020-06-20 12:05:18 +02:00
Aleksander Morgado
57422ec0bb NEWS: add info about MBIM-powered Cinterion devices 2020-06-19 12:28:57 +00:00
Aleksander Morgado
ecf54efc67 cinterion: added port type hints for the mPLS62-w in MBIM mode
T:  Bus=01 Lev=02 Prnt=04 Port=01 Cnt=01 Dev#= 40 Spd=480 MxCh= 0
  D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
  P:  Vendor=1e2d ProdID=005d Rev=17.30
  S:  Manufacturer=Cinterion Wireless Modules
  S:  Product=PLSx
  C:  #Ifs=12 Cfg#= 1 Atr=e0 MxPwr=100mA
  I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm
  I:  If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  I:  If#=0xa Alt= 1 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
  I:  If#=0xb Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
  I:  If#=0x2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
  I:  If#=0x3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  I:  If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
  I:  If#=0x5 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  I:  If#=0x6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
  I:  If#=0x7 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  I:  If#=0x8 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
  I:  If#=0x9 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
2020-06-19 12:28:57 +00:00
Aleksander Morgado
c2ee73173e cinterion: allow MBIM-powered devices
Like the mPLS62-w when setup to be controlled in MBIM mode instead of
plain AT commands.
2020-06-19 12:28:57 +00:00
Aleksander Morgado
54de41928b build: require libmbim 1.24.0 2020-06-18 10:58:14 +02:00
Eric Caruso
9d31cbaa2d mm-kernel-device: give cmp a total order
This allows MMKernelDevice::cmp to compare two kernel devices
with different object types, which means that subclasses can
continue to only handle comparisons with their own type. The
order may not be stable across builds.
2020-06-17 16:19:07 -07:00
Aleksander Morgado
12ea728112 AUTHORS: update with latest commit stats 2020-06-16 09:41:14 +02:00
Brendan Peter
cb8d810583 quectel: add port type hints for EG95 2020-06-16 09:16:28 +02:00
Aleksander Morgado
569990f38c broadband-modem-qmi: also build 5GS reg state from Serving System 2020-06-12 09:25:09 +02:00
Aleksander Morgado
8340237f9d broadband-modem-qmi: avoid using stale EPS registration state
When the device goes from LTE to UMTS, we must make sure we also
always update the EPS registration state as unknown, or the built
consolidated state will be wrong.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/225
2020-06-12 09:18:37 +02:00
Maxim Anisimov
3af93cbe18 broadband-modem-qmi: switch USSD state to idle when ussd session is terminated by network
The cellular operator can break the interactive USSD session. In this case, it is necessary
to process this situation otherwise --3gpp-ussd-initiate or --3gpp-ussd-respond will give an error.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2020-06-05 08:24:30 +00:00
Maxim Anisimov
62c6f941a2 cli: make control chars in strings are escaped correctly for json output
We need to change json output escaping according to this
https://bugzilla.gnome.org/show_bug.cgi?id=730425

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2020-06-05 07:34:54 +00:00
Maxim Anisimov
1e0b38d98a sms-part-3gpp: fix unicode names in sms decode iconv() operations
So that the limited iconv() in OpenWRT supports the conversion properly.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2020-06-05 08:43:05 +03:00
Aleksander Morgado
cbcc141105 build: bump version to 1.13.900 (1.14-rc1) 2020-06-04 14:22:05 +02:00
Aleksander Morgado
cd501c4d26 NEWS: add details about the plugin configure options 2020-06-04 11:38:48 +02:00
Aleksander Morgado
a5c060ef87 filter: setup automatic per-vid checks in the plugin whitelist
Until now, the plugin whitelist rule in the filter would only handle
those plugins that require specific udev tags, and those that had
explicit full vid:pid pairs.

This update makes a new implicit automatic whitelist for all devices
that match any of the vids managed by the different plugins.

Looking at the current list of devices in the blacklist and greylist
maintained by ModemManager, there are no devices falling under the
list of supported plugin vids that would need to be blacklisted;
except for u-blox GPS modules:

  huawei    -> 0x12d1        -> None in blacklist/greylist
  thuraya   -> 0x1a26        -> None in blacklist/greylist
  telit     -> 0x1bc7        -> None in blacklist/greylist
  dLink     -> 0x2001        -> None in blacklist/greylist
  wavecom   -> 0x114f        -> None in blacklist/greylist
  x22x      -> 0x1bbb,0x0b3c -> None in blacklist/greylist
  anydata   -> 0x16d5        -> None in blacklist/greylist
  quectel   -> 0x2c7c        -> None in blacklist/greylist
  haier     -> 0x201e        -> None in blacklist/greylist
  novatel   -> 0x1410        -> None in blacklist/greylist
  dell      -> 0x413c        -> None in blacklist/greylist
  option    -> 0x0af0,0x1931 -> None in blacklist/greylist
  nokia     -> 0x0421        -> None in blacklist/greylist
  cinterion -> 0x1e2d,0x0681 -> None in blacklist/greylist
  simtech   -> 0x1e0e        -> None in blacklist/greylist
  iridium   -> 0x1edd        -> None in blacklist/greylist
  pantech   -> 0x106c        -> None in blacklist/greylist
  longcheer -> 0x1c9e,0x1bbb -> None in blacklist/greylist
  linktop   -> 0x230d        -> None in blacklist/greylist
  sierra    -> 0x1199        -> None in blacklist/greylist
  ublox     -> 0x1546        -------------> GPS chips blacklisted !!!!!
  foxconn   -> 0x0489        -> None in blacklist/greylist
  broadmobi -> 0x2020        -> None in blacklist/greylist
  fibocom   -> 0x2cb7        -> None in blacklist/greylist
  tplink    -> 0x2357        -> None in blacklist/greylist
  zte       -> 0x19d2        -> None in blacklist/greylist

The rules used to blacklist the u-blox GPS chips have already been
moved to the u-blox plugin itself, and now they use the broader
ID_MM_DEVICE_IGNORE tag that applies in all filter modes.
2020-06-04 11:34:43 +02:00
Aleksander Morgado
bbeca60113 ublox: fully ignore GPS devices with plugin-installed rules
Instead of setting up the ID_MM_TTY_BLACKLIST tag used in 'legacy'
filter mode, tag all known u-blox GPS devices with the broader
ID_MM_DEVICE_IGNORE tag that applies under all filter modes.

Also, make this rules be installed by the plugin itself, because at
the end, it is the u-blox plugin the one attempting to probe all
devices with vid 0x1546.
2020-06-04 11:34:43 +02:00