Commit Graph

1803 Commits

Author SHA1 Message Date
Aleksander Morgado
7b3df735cd tplink: new plugin
Includes port type hints for the TP-Link MA260.

  P:  Vendor=2357 ProdID=9000 Rev=00.00
  S:  Manufacturer=TP-LINK, Incorporated
  S:  Product=TP-LINK HSPA+ Modem
  S:  SerialNumber=863745010845895
  C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
  I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
  I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
2019-09-11 13:56:57 +00:00
Aleksander Morgado
1334f689e2 dlink: new plugin
Includes port type hints for the D-Link DWM-222.

  P:  Vendor=2001 ProdID=7e35 Rev=02.28
  S:  Manufacturer=Mobile Connect
  S:  Product=Mobile Connect
  S:  SerialNumber=0123456789ABCDEF
  C:  #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
  I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
  I:  If#=0x5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
2019-09-11 13:56:57 +00:00
Aleksander Morgado
87224e083c tests,helpers: minor indentation fix 2019-09-10 12:24:38 +02:00
Aleksander Morgado
141e69bc00 plugins,tests: setup new helper utilities for tests
For now, including a handy method from the ublox tests that allows
comparing arrays of bands that may not be sorted.
2019-09-09 12:24:43 +02:00
Aleksander Morgado
edac8c37e8 telit: add port type hints for the ME910 using the correct PID 2019-09-09 12:21:11 +02:00
Aleksander Morgado
e6932c9336 Revert "telit: additional port type hints for the ME910"
This reverts commit ef89dd154b.

The PID of the ME910 is 1101, not 1011... :D
2019-09-09 12:21:11 +02:00
Aleksander Morgado
b954f4760a quectel: allow tty-only devices 2019-08-29 17:36:06 +00:00
Aleksander Morgado
b0ec3030a3 sierra: add port type hints for the MC74xx modules
As suggested by Paul Bartell <paul.bartell@gmail.com>
2019-08-26 09:07:38 +02:00
Ben Chan
ee63bf4033 cinterion: fix memory leak in common_test_ctzu_urc() 2019-08-02 20:03:38 -07:00
Sven Schwermer
c61bd846f3 quectel: Add port type hints for the Quectel EG91
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2019-08-01 16:23:36 +02:00
Ben Chan
bf54159e93 test: untabify 2019-07-31 22:27:45 -07:00
Aleksander Morgado
ef89dd154b telit: additional port type hints for the ME910 2019-07-13 23:21:55 +02:00
Aleksander Morgado
8c8e0e8805 voice,call,cinterion: add Purism as copyright holder
The GSM supplementary services related changes, as well as the rework
done to manage calls per call id, is copyrighted by Purism SPC.
2019-07-12 11:31:04 +02:00
Aleksander Morgado
d833b8644c cinterion: setup/cleanup time unsolicited events
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
2019-07-11 23:21:00 +02:00
Aleksander Morgado
fe11a3fa1f cinterion: new +CTZU URC parser 2019-07-11 23:21:00 +02:00
Aleksander Morgado
63ccd36361 huawei: cleanup/setup voice unsolicited events 2019-07-11 23:21:00 +02:00
Aleksander Morgado
24c0c7aa6b huawei: audio channel setup at modem-level
The audio channel setup is shared between all ongoing calls, so it is
a modem-level feature, not specific to a single call.
2019-07-11 23:21:00 +02:00
Aleksander Morgado
12bad162e3 huawei: voice-related URCs are not in-call
The URCs report the specific call index they apply to, so they should
be managed by the modem object and reported to the Voice interface.
2019-07-11 23:21:00 +02:00
Aleksander Morgado
fca8955721 ublox: +UCALLSTAT as device-level URC, not in-call
+UCALLSTAT is used to report the state of specific calls by index, and
therefore this is not an in-call URC.
2019-07-11 23:21:00 +02:00
Aleksander Morgado
f699308958 cinterion: disable call list polling if ^SLCC is supported
Early detect that ^SLCC is supported, and disable the call list
polling in the interface if so.
2019-07-11 23:01:29 +02:00
Aleksander Morgado
faaaf20276 cinterion: when ^SLCC is supported, detailed call state updates are implicit 2019-07-11 23:01:08 +02:00
Aleksander Morgado
47dd9fffac cinterion: support ^SLCC URCs as part of voice management
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).
2019-07-11 23:01:08 +02:00
Aleksander Morgado
e931c0ae9c cinterion: implement reset 2019-07-11 23:00:50 +02:00
Aleksander Morgado
0f8580f36e cinterion: port type hints for the PLS8
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.
2019-07-11 23:00:50 +02:00
Aleksander Morgado
ed7be29111 broadband-modem,voice: disable unsolicited events 2019-07-11 23:00:50 +02:00
Ben Chan
8d8b3a722a misc: use g_regex_match() for simplicity
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)
2019-07-10 14:48:22 -07:00
Aleksander Morgado
1d52e5c24d cinterion: make custom +CIEV parser much more generic
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.
2019-06-13 18:43:06 +02:00
Aleksander Morgado
ca5f2e8b3e ublox,tests: expect error if empty band list when parsing UACT? 2019-06-13 11:28:26 +02:00
Aleksander Morgado
20c5d7fd92 ublox: return error when no bands are parsed
If load_current_bands_finish() returns a NULL GArray, we must set the
GError or otherwise the daemon will segfault when the caller
dereferences the GError:

    current_bands = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish (self, res, &error);
    if (!current_bands) {
        /* Errors when getting current bands won't be critical */
        mm_warn ("couldn't load current Bands: '%s'", error->message);
        g_error_free (error);
    }

This may happen with an empty but balid +UACT response, e.g.:
   AT+UACT?
   +UACT: ,,,
   OK

Or when it replies a full empty string:
   AT+UACT?
   OK
2019-06-13 10:26:53 +02:00
Aleksander Morgado
8092e301fc port-serial: allow deciding whether the command is queued last or run next
By default all the commands we were sending through the serial port
were added at the tail of the pending queue, but we may want to queue
them at the head in very specific cases (e.g. while sending an SMS).
2019-06-03 03:50:22 +00:00
Aleksander Morgado
8ec9789e3c quectel: add port type hints for the Quectel LTE-A EG06
ttyUSB0 (if #0): QCDM/DIAG port
 ttyUSB1 (if #1): GPS data port
 ttyUSB2 (if #2): AT primary port
 ttyUSB3 (if #3): AT secondary port
2019-05-30 17:28:13 +02:00
Aleksander Morgado
7f822fbc50 xmm,shared: don't assume parent object implements location support
E.g. when MM is built without QMI support, the MBIM modem won't have
any location support, as the only location implementation is based on
QMI over MBIM.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/125
2019-05-28 22:56:54 +02:00
Aleksander Morgado
254da81ebd telit: loading access tech should never use cached replies 2019-05-18 16:00:19 +02:00
Aleksander Morgado
44eac9e974 shared-xmm: implement support for MSB A-GPS 2019-04-09 12:24:39 +00:00
Aleksander Morgado
b77aa7ab0e location,agps: explicitly specify that MSA A-GPS is implemented
The A-GPS based implementations we currently have assume MSA A-GPS, so
rename the MMModemLocationSource enum value to reflect that.
2019-04-09 12:24:39 +00:00
Ben Chan
49f391b10d altair-lte: remove unused fields in DetailedDisconnectContext 2019-04-08 13:30:14 -07:00
Aleksander Morgado
210dc0be47 plugins,dell: port type hints for the DW5820e module 2019-04-08 12:45:28 +02:00
Ben Chan
7f78ef5010 via: fix memory leak in parent_setup_registration_checks_ready
This patch fixes a potential memory leak in
parent_setup_registration_checks_ready() where the allocated
SetupRegistrationChecksResults may be leaked when the MMIfaceModemCdma
parent's setup_registration_checks() fails.
2019-04-03 10:57:14 -07:00
Sven Schwermer
7e4a8d9566 ublox: add LISA/SARA-U2 alternative port types
When configuring these modems with AT+UUSBCONF=2, i.e. CDC-ECM + 4x
CDC-ACM, they also enumerate with a different PID on the USB. We need to
adjust the udev rules for that case in order to ignore the non-AT ports.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2019-04-03 13:17:19 +02:00
Aleksander Morgado
147facd2ec plugins,test: setup new simple keyfile tester 2019-04-02 12:14:03 +02:00
Aleksander Morgado
2719265cbd dell,dw5821e: install carrier config mapping 2019-04-02 12:14:03 +02:00
Aleksander Morgado
8c053f637a dell,dw5821e: allow unmanaged GPS even when raw/nmea enabled
The raw/nmea GPS source setup is using QMI LOC operations, so there is
no point in disallowing the control of the unmanaged GPS source, as
the GPS data TTY is exclusively used for unmanaged GPS.
2019-04-02 08:40:26 +00:00
Ben Chan
43d454ab7f ublox: fix out-of-bounds array accesses
This patch fixes several invalid checks like this:

   array[i] && i < G_N_ELEMENTS (array)

which should instead be:

   i < G_N_ELEMENTS (array) && array[i]

to avoid an out-of-bounds access of the array.

Fixes: c1aa658802
2019-03-29 13:34:10 -07:00
Aleksander Morgado
0944e59252 ublox: parse +UGCNTRD stats as unsigned 64bit values
[1551646332.583651] (ttyACM2): --> 'AT+UGCNTRD<CR>'
  [1551646332.626567] (ttyACM2): <-- '<CR><LF>+UGCNTRD: 1,0,0,0,0<CR><LF><CR><LF>+UGCNTRD: 2,1397316870,113728263578,1397316870,113728263578<CR><LF><CR><LF>OK<CR><LF>'
  [1551646332.627120] Reloading stats failed: Couldn't load primary PDP context 2 statistics: Error parsing session RX bytes
2019-03-29 10:07:29 +00:00
Aleksander Morgado
5ef3c8eeb1 dell,dw5821e: firmware update support only if QMI is enabled 2019-03-13 10:57:43 +01:00
Daniele Palmas
c7be4af542 telit: add Telit MBIM broadband modem
Modes and band support are added through AT commands.
2019-02-28 16:09:10 +01:00
Daniele Palmas
3921c120b3 telit: move shared functions to mm-shared-telit 2019-02-28 15:42:28 +01:00
Aleksander Morgado
1093c124b4 dell,dw5821e: use DMS extension method to load properly formatted firmware version
And require libqmi 1.23.1.
2019-02-26 23:57:29 +01:00
Aleksander Morgado
0f6f89801e ublox: fix parser to report only bands supported by the module
We were filtering the 4G bands supported by the module when parsing
+UBANDSEL responses, e.g. so that we would not reply unsupported bands
for a given ubandsel value.

But we need the same filtering in 2G and 3G bands, because for example
some modules may support a specific 4G band with a given ubandsel
value, but NOT the associated 3G band. E.g. the TOBY-R200 supports
EUTRAN-4 but not UTRAN-4.
2019-01-30 12:10:03 +01:00
Aleksander Morgado
278a72643a ublox,tests: fix R-200 UBANDSEL response tester 2019-01-30 12:10:03 +01:00