Commit Graph

7297 Commits

Author SHA1 Message Date
Aleksander Morgado
fc3ca42734 build: ignore test-pco built file 2018-08-20 16:53:56 +02:00
Claude Paroz
cc0c76d875 Add French translation 2018-08-20 14:15:36 +00:00
Ben Chan
b8ab473662 cli: print 'Pco' property in Modem3gpp interface 2018-08-18 13:34:06 -07:00
Ben Chan
930a5879d4 broadband-modem-mbim: update 'Pco' property in Modem3gpp interface
This patch changes MMBroadbandModemMbim to update the 'Pco' property in
the Modem3gpp interface upon receiving a MBIM_CID_PCO notification.
2018-08-18 13:34:06 -07:00
Ben Chan
d46aa0c36a modem-3gpp: add 'Pco' property to Modem3gpp interface
This patch adds a 'Pco' property to the Modem3gpp interface for tracking
PCOs that the modem has received from the network.
2018-08-18 13:34:06 -07:00
Ben Chan
eb327b4203 libmm-glib,pco: add helpers for managing a list of MMPco 2018-08-18 13:34:06 -07:00
Ben Chan
28e64d0018 libmm-glib: add MMPco for handling raw PCO data 2018-08-18 13:29:46 -07:00
Aleksander Morgado
89ffcbdd8d po: add Turkish translation
From: Emin Tufan Çetin <etcetin@gmail.com>

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/80
2018-08-14 11:06:58 +02:00
Aleksander Morgado
b7e5ca62c5 broadband-modem-mbim: explicitly ignore SMS storage initialization
The MBIM protocol hides to the user the concept of SMS storages, so we
should explicitly ignore the initialization step so that it isn't run
with the parent AT-based implementation.
2018-08-14 10:58:08 +02:00
Ben Chan
d21dd6cf1f broadband-modem: initialize 'tac' in registration_status_check_ready()
mm-broadband-modem.c:4395:13: error: variable 'tac' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm-broadband-modem.c:4407:75: note: uninitialized use occurs here
    mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid);
                                                                          ^~~
mm-broadband-modem.c:4395:9: note: remove the 'if' if its condition is always true
        if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm-broadband-modem.c:4380:9: error: variable 'tac' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
    if (cgreg) {
        ^~~~~
mm-broadband-modem.c:4407:75: note: uninitialized use occurs here
    mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid);
                                                                          ^~~
mm-broadband-modem.c:4380:5: note: remove the 'if' if its condition is always false
    if (cgreg) {
    ^~~~~~~~~~~~
mm-broadband-modem.c:4280:15: note: initialize the variable 'tac' to silence this warning
    gulong tac;
              ^
               = 0
2018-08-10 11:06:19 +02:00
Aleksander Morgado
b378be0f0d broadband-modem-mbim: fallback to trying AT+CESQ if ATDS signal unsupported 2018-08-10 04:26:12 +00:00
Aleksander Morgado
ab9130682c broadband-modem-mbim: implement extended signal support with ATDS 2018-08-10 04:26:12 +00:00
Aleksander Morgado
7a941466c2 broadband-modem-mbim: implement 3GPP location support with ATDS 2018-08-10 04:26:12 +00:00
Aleksander Morgado
ff6a82f5b7 broadband-modem: check if modem implements MBIM_CID_USSD 2018-08-10 04:26:12 +00:00
Aleksander Morgado
cf500014b6 port-probe: no AT probing on possible QCDM port
Ports flagged as being QCDM will not be probed for AT. QCDM probing
will be performed normally, the udev tags only give hints, we still
need to know whether the TTYs are QCDM-capable or not.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
548b7f8847 base-modem: load AT port type hints when adding port
We keep the pflags input in mm_base_modem_grab_port() so that plugins
can use other methods to gather port type hints (e.g. querying with AT
commands as in Huawei/Telit or looking at sysfs properties as in HSO).

For standard udev tag port type hints, it will be the base modem
looking them up.

Note that there is no longer any need to ignore non-flagged ports for
those modems that require primary/secondary flags. They will be
implicitly ignored when mm_base_modem_organize_ports() decides which
ports to use, as the flagged ones are preferred over the non-flagged
ones.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
aff633b1b0 port-probe: no QCDM probing on possible AT port
Ports flagged with one of the common AT port type hints will not be
probed for QCDM.

AT probing will be performed normally, the udev tags only give hints,
we still need to know whether the TTYs are AT-capable or not.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
6b0424cfac plugins: consolidate ID_MM_PORT_TYPE_AT_* flag names
We define 3 common udev tag ids to be used by all plugins:

 * ID_MM_PORT_TYPE_AT_PRIMARY: the primary modem port. It will be used
   for AT control and also as PPP if there is no other port flagged
   explicitly to do PPP.

 * ID_MM_PORT_TYPE_AT_SECONDARY: the secondary modem port. It will be
   used when/if the primary port gets connected to do PPP.

 * ID_MM_PORT_TYPE_PPP: the port to be used to do PPP only. This tag
   makes sense only when the primary port shouldn't be used for PPP,
   i.e. when there is a port dedicated to do PPP and one port
   dedicated for control.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
86f840d97b port-probe: explicitly report GPS port type if port flagged
And remove all custom logic from all plugins that were doing just that.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
9c0a557f91 port-probe: don't do AT or QCDM probing on ports flagged as GPS 2018-08-10 04:19:13 +00:00
Aleksander Morgado
85adbdbdd1 plugins: consolidate ID_MM_PORT_TYPE_GPS flag name
Use the same flag name across all plugins with support for
NMEA-capable TTYs.
2018-08-10 04:19:13 +00:00
Aleksander Morgado
342abd7f63 cli,signal: print unset signal values as n/a 2018-08-09 13:52:53 +00:00
Aleksander Morgado
fe66bdf65e libmm-glib,signal: fix MM_SIGNAL_UNKNOWN symbol value
Unfortunately, G_MINDOUBLE is basically 0.0, so MM_SIGNAL_UNKNOWN ends
up giving us a value that may fall in the range of expected values for
the signal component.

Update the MM_SIGNAL_UNKNOWN symbol to match a value which is
definitely out any other possible valid range, so that we can easily
detect which values are set and which aren't.

While API is maintained, this fix is introducing an ABI break. Not a
big deal anyway, as the purpose of the value is just to detect unset
fields.
2018-08-09 13:52:53 +00:00
Ben Chan
2773475f43 build: require libmbim 1.17.3
libmbim 1.17.3 adds the support for MBIM_CID_PCO, which is used by
commit d68078b2ce ("broadband-modem-mbim: check if modem implements
MBIM_CID_PCO").
2018-08-09 13:37:05 +02:00
Aleksander Morgado
5a2f3cce95 iface-modem-3gpp: fix location update when LAC=0 but TAC given 2018-08-09 10:46:35 +02:00
Aleksander Morgado
7e6b4d7aa9 api,location: give Tracking Area Code field in 3GPP location info
The "location area code" field is given in GSM/UMTS networks
exclusively. LTE networks use the concept of "tracking area code"
instead.

This patch updates the Location interface to Provide separate fields
for LAC and TAC, instead of giving TAC values in the LAC field.
2018-08-08 21:46:28 +02:00
Aleksander Morgado
f58a652578 broadband-modem-qmi: fix build using WITH_NEWEST_QMI_COMMANDS 2018-08-08 21:45:51 +02:00
Aleksander Morgado
59a5af9771 iface-modem: reload current bands after setting
Setting bands is a very device-specific operation. Sometimes the
device requires specific band combinations, or sometimes the 'any'
specific logic doesn't apply to all supported bands (e.g. may apply
only to the currently selected modes, as in XMM based devices).

So, don't assume that if the set command succeeds we have set all
expected bands. Instead, do an explicit loading of the current bands
after the set operation, same thing as we do when setting modes.
2018-08-08 18:42:47 +00:00
Aleksander Morgado
518d62e731 helpers-qmi: fix UMTS band 6 and 19 definitions
Also bump required libqmi version, as this change uses flags from the
latest available API.

UMTS B19 is NTT DoCoMo's 800MHz band.
UMTS B6  is NTT DoCoMo's 850MHz band
2018-08-08 18:39:32 +00:00
Aleksander Morgado
24e31dc2b8 dell: don't ignore TTYs in QMI/MBIM modems
When we detect that the modem is QMI-capable or MBIM-capable, we still
want to be able to use TTYs, for features unsupported by the main
protocols.

So, don't flag all the TTYs as non-AT non-QCDM, let them probe as
usual instead.
2018-08-08 18:38:55 +00:00
Aleksander Morgado
8430b05113 broadband-modem: allow Enable() if disabling or initializing
The first step in the Enable() processing is to wait for a final
state, so we can definitely wait for the ongoing disabling or
initializing states to finish before we go on with the enable
operation, there is no need to early fail if the disabling or
initializing intermediate states are detected.
2018-08-08 18:38:05 +00:00
Aleksander Morgado
c476612247 base-modem: allow parallel Enable() and Disable() requests
If additional Enable() requests are received while one is already
ongoing, we queue them and will end up completing all with the same
result once the first one finishes.

Same logic also for Disable().

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/8
2018-08-08 18:38:05 +00:00
Ben Chan
30eef126a1 broadband-modem-mbim: subscribe to MBIM_CID_PCO notifications
This patch changes MMBroadbandModem to subscribe to MBIM_CID_PCO
notifications if the modem supports that.
2018-08-08 16:22:40 +02:00
Ben Chan
d68078b2ce broadband-modem-mbim: check if modem implements MBIM_CID_PCO
Being a part of a series that adds PCO support for MBIM modems that
implement the MBIM_CID_PCO extension, this patch issues a
MBIM_CID_DEVICE_SERVICES query during the modem initialization to check
if a modem implements MBIM_CID_PCO. If the modem does, ModemManager will
subscribe to MBIM_CID_PCO notifications to get PCO updates.
2018-08-08 16:22:40 +02:00
Lubomir Rintel
dbfc03d9ac docs/ModemManager.8: document --filter-policy option 2018-08-06 13:48:05 +02:00
Lubomir Rintel
b56cd74ab5 docs: move mmcli(8) to section 1
Section (8) is for tools that require root privileges.
2018-08-06 13:34:09 +02:00
Aleksander Morgado
ae9efa05c8 signal: cleanup previous extended info if no new one given
E.g. if the modem switches from 4G to 3G while the extended signal
information is enabled, we should no longer expose LTE specific signal
quality values, only the UMTS specific ones.

E.g. to avoid this:

    $ mmcli -m 1 --signal-get
      -------------------------
      UMTS   | RSSI: '0,00' dBm
             | RSCP: '-92,00' dBm
             | EcIo: '-13,00' dB
      -------------------------
      LTE    | RSSI: '0,00' dBm
             | RSRQ: '-6,50' dB
             | RSRP: '-96,00' dBm
             |  SNR: '0,00' dB
2018-08-05 14:29:42 +02:00
Aleksander Morgado
ab0133445c build: ignore all tester programs for plugin-specific modem helpers 2018-08-04 17:39:41 +02:00
Aleksander Morgado
b8c7773a74 cinterion: fix band related unit tests
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.
2018-07-31 00:23:25 +02:00
Aleksander Morgado
3a4a137de3 broadband-modem-mbim: avoid use of uninitialized variable 2018-07-30 23:30:50 +02:00
Reinhard Speyerer
ebe9fcd574 mm-modem-helpers-cinterion: update band table for PLS8-J
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.
2018-07-30 21:22:07 +02:00
Bob Ham
a160832fce iface-modem-voice: fix ordering of D-Bus signals for call addition/deletion
To have proper ordering in the D-Bus signals, the skeleton's property
changes must be flushed before the Call{Add,Delet}ed signals are
emitted.  Without this flush, the emission of the PropertiesChanged
signal is delayed until the main loop is idle.  This causes problems
on the client side, for example the CallAdded signal being received
before the Calls property contains the call.

Closes: #81
2018-07-27 18:30:50 +02:00
Aleksander Morgado
95cee88ccd man,mmcli: fix documentation for --set-current-bands
Reported by: Matthew Stanger <stangerm2@gmail.com>
2018-07-27 17:47:23 +02:00
mstanger
7913fe4faf mm-modem-helpers-cinterion: update freq/band table
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.
2018-07-27 17:47:23 +02:00
Aleksander Morgado
8ea8d4e774 broadband-modem-mbim: show USB product attribute as model 2018-07-19 19:25:44 +00:00
Aleksander Morgado
0a2060cc78 kerneldevice: allow loading physdev product string 2018-07-19 19:25:44 +00:00
Aleksander Morgado
df8ead4808 blacklist: include all devices from Prusa Research 2018-07-19 15:57:10 +02:00
Aleksander Morgado
d3bc046764 broadband-modem-qmi: plug memleak when processing a factory reset 2018-07-10 23:02:39 +02:00
Aleksander Morgado
fff3f0ff71 broadband-modem: skip concatenated AT commands
Not all modems support AT command concatenation (e.g. u-blox TOBY-L4
doesn't, according to a specific note about it in the AT command
reference). So just skip concatenation in the few places where it's
used.
2018-07-10 19:45:55 +00:00
Aleksander Morgado
d134402efc ublox: always send user/pass strings, even if no authentication requested
The TOBY-L2 allowed to skup the user/pass string fields when no
authentication was requested, but according to the AT command
reference, all the remaining u-blox modules do require these two
fields given always (e.g. just as empty strings).

As per this sequence in a TOBY-L4:

 (ttyACM2): --> 'AT+UAUTHREQ=?<CR>'
 (ttyACM2): <-- '<CR><LF>+UAUTHREQ: (1-4),(0-2),,<CR><LF><CR><LF>OK<CR><LF>'
 (ttyACM2): --> 'AT+UAUTHREQ=1,0<CR>'
 (ttyACM2): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'

It should have been: AT+UAUTHREQ=1,0,"",""
2018-07-10 19:45:05 +00:00