aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-08-10 19:26:56 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-08-10 19:38:38 +0200
commit28ad994e372dc58e474567c70adbb0f58022cb22 (patch)
treec70912fce5f2a5e70e178ff343f8cc8983c51cd5
parent422a9070c40c48847870cb2cf141fe102cd72cba (diff)
sierra: XMM-specific features in XMM based modems (e.g. EM7345)
We create XMM-based modems like the EM7345 with XMM-specific features like the AT+XLCSLSR based GNSS support. E.g.: $ mmcli -m a --location-status ------------------------ Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb | enabled: 3gpp-lac-ci | signals: no ------------------------ GPS | refresh rate: 30 seconds $ sudo mmcli -m a --location-enable-gps-nmea successfully setup location gathering $ sudo mmcli -m a --location-get -------------------------- 3GPP | operator code: 214 | operator name: 7 | location area code: 0000 | tracking area code: 6FFE | cell id: 0465CD20 -------------------------- GPS | nmea: $GPGSA,A,1,,,,,,,,,,,,,,,*1E | $GNGSA,A,1,,,,,,,,,,,,,,,,1*1D | $GNRMC,235951.000,V,,,,,,,,,,N,V*20 | $GNVTG,,T,,M,,N,,K,N*32 | $GNGGA,235951.000,,,,,0,0,,,M,,M,,*5F Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/25
-rw-r--r--configure.ac3
-rw-r--r--plugins/Makefile.am1
-rw-r--r--plugins/sierra/mm-plugin-sierra.c20
3 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e03edcb0..1cda4f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,7 +489,8 @@ MM_ENABLE_PLUGIN([samsung],
MM_ENABLE_PLUGIN([sierra-legacy],
[with_shared_icera,
with_shared_sierra])
-MM_ENABLE_PLUGIN([sierra])
+MM_ENABLE_PLUGIN([sierra],
+ [with_shared_xmm])
MM_ENABLE_PLUGIN([simtech])
MM_ENABLE_PLUGIN([telit],
[with_shared_telit])
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 6f83ad61..f7ca2ac4 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1240,6 +1240,7 @@ libmm_plugin_sierra_la_SOURCES = \
$(NULL)
libmm_plugin_sierra_la_CPPFLAGS = \
$(PLUGIN_COMMON_COMPILER_FLAGS) \
+ $(XMM_COMMON_COMPILER_FLAGS) \
-DMM_MODULE_NAME=\"sierra\" \
$(NULL)
libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
diff --git a/plugins/sierra/mm-plugin-sierra.c b/plugins/sierra/mm-plugin-sierra.c
index 6622c5e1..75fdc90d 100644
--- a/plugins/sierra/mm-plugin-sierra.c
+++ b/plugins/sierra/mm-plugin-sierra.c
@@ -25,6 +25,7 @@
#include "mm-log-object.h"
#include "mm-plugin-sierra.h"
#include "mm-broadband-modem.h"
+#include "mm-broadband-modem-xmm.h"
#if defined WITH_QMI
#include "mm-broadband-modem-qmi.h"
@@ -32,6 +33,7 @@
#if defined WITH_MBIM
#include "mm-broadband-modem-mbim.h"
+#include "mm-broadband-modem-mbim-xmm.h"
#endif
G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN)
@@ -63,6 +65,14 @@ create_modem (MMPlugin *self,
#if defined WITH_MBIM
if (mm_port_probe_list_has_mbim_port (probes)) {
+ if (mm_port_probe_list_is_xmm (probes)) {
+ mm_obj_dbg (self, "MBIM-powered XMM-based Sierra modem found...");
+ return MM_BASE_MODEM (mm_broadband_modem_mbim_xmm_new (uid,
+ drivers,
+ mm_plugin_get_name (self),
+ vendor,
+ product));
+ }
mm_obj_dbg (self, "MBIM-powered Sierra modem found...");
return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid,
drivers,
@@ -72,6 +82,15 @@ create_modem (MMPlugin *self,
}
#endif
+ if (mm_port_probe_list_is_xmm (probes)) {
+ mm_obj_dbg (self, "XMM-based Sierra modem found...");
+ return MM_BASE_MODEM (mm_broadband_modem_xmm_new (uid,
+ drivers,
+ mm_plugin_get_name (self),
+ vendor,
+ product));
+ }
+
/* Fallback to default modem in the worst case */
return MM_BASE_MODEM (mm_broadband_modem_new (uid,
drivers,
@@ -99,6 +118,7 @@ mm_plugin_create (void)
MM_PLUGIN_ALLOWED_QCDM, TRUE,
MM_PLUGIN_ALLOWED_QMI, TRUE,
MM_PLUGIN_ALLOWED_MBIM, TRUE,
+ MM_PLUGIN_XMM_PROBE, TRUE,
NULL));
}