Commit Graph
6138 Commits
Author SHA1 Message Date
Aleksander Morgado f6d5490eeb udev: remove ID_MM_PLATFORM_DRIVER_PROBE tag
This tag is completely redundant because users can whitelist the
platform TTY ports to use with the more generic ID_MM_DEVICE_PROCESS
tag, which is part of the explicit whitelist filter rule.
2019-08-29 20:07:03 +00:00
Aleksander Morgado 118b19bb75 udev: rename ID_MM_DEVICE_MANUAL_SCAN_ONLY to ID_MM_TTY_MANUAL_SCAN_ONLY
The udev tag that allows flagging devices that MAY be modems
(e.g. USB<->RS232 adapters) is only applicable to TTY devices, so
explicitly specify that in the tag name as well.
2019-08-29 20:07:03 +00:00
Aleksander Morgado 250639e3da udev: repurpose ID_MM_DEVICE_IGNORE and new MM_FILTER_RULE_EXPLICIT_BLACKLIST
Until now the ID_MM_DEVICE_IGNORE udev tag was being used in the
internal blacklist of devices shipped by ModemManager when running in
either DEFAULT or PARANOID filter modes. The name of the tag is
extremely misleading because it doesn't really make the full device be
ignored, the tag only applied to TTY ports.

This commit repurposes the tag so that it applies to ANY kind of
port (e.g. TTY, NET, cdc-wdm...) and also to any kind of filter type
(i.e. also applicable in STRICT mode).

The internal blacklist shipped by ModemManager, which should NOT be
used in STRICT mode, uses a new tag name, ID_MM_TTY_BLACKLIST.

The new ID_MM_DEVICE_IGNORE tag is therefore much more usable and its
name is really meaningful. If there are users or third-party projects
adding their own udev rules with the ID_MM_DEVICE_IGNORE tag name,
they should have no problem as the new rule is more restrictive than
the old one.
2019-08-29 20:07:03 +00:00
Ben Chan 07c8a2b4f6 base-sim: avoid unnecessary MM_BASE_MODEM() call on MMBaseModem object
The 'modem' field in _MMBaseSimPrivate is already a MMBaseModem object.
2019-08-29 18:40:16 +00:00
Aleksander Morgado b954f4760a quectel: allow tty-only devices 2019-08-29 17:36:06 +00:00
Ben Chan ee8695178d docs: untabify 2019-08-29 12:05:09 +00:00
Ben Chan 6f0c72e4f2 introspection: untabify 2019-08-29 12:05:09 +00:00
Aleksander Morgado c1982ffcbc broadband-modem: remove unused contacts interface logic 2019-08-29 13:44:02 +02:00
Aleksander Morgado ae55fbf964 mmcli: coding style fixes in the new JSON output support 2019-08-28 18:17:55 +02:00
Maxim Anisimov d1ac5ca16b mmcli: add json output support
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2019-08-28 18:17:55 +02: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 5efa15b83f broadband-modem-mbim: fix potential dereference of null GByteArray
ussd_decode() expects a non-null GByteArray while process_ussd_message()
could potentially passes a null GByteArray to ussd_decode(). This
patch fixes the issue by having process_ussd_message() always creates a
GByteArray.
2019-08-25 12:38:55 +00:00
Reinhard Speyerer f2c878e796 mm-modem-helpers-qmi: avoid SIGSEGV with mmcli --set-current-bands
For devices which do not provide feature_extended_lte_band_preference
mm_modem_bands_to_qmi_band_preference() gets called from
mm_shared_qmi_set_current_bands() with extended_qmi_lte_bands
set to NULL which may cause a SIGSEGV in the memset() call in
mm_modem_bands_to_qmi_band_preference().

Avoid this by checking whether extended_qmi_lte_bands is non-NULL
before calling memset().

Reported-by: Nick <mips171@icloud.com>
2019-08-23 16:49:57 -05:00
Reinhard Speyerer e78ef2a67f mm-modem-helpers-qmi: add missing LTE bands to nas_lte_bands_map
Add the missing QMI LTE bands 26 to 32 to nas_lte_bands_map to make them
usable in ModemManager.
2019-08-23 16:49:55 -05:00
Reinhard Speyerer 53d2477577 mm-modem-helpers-qmi: add missing LTE bands to dms_lte_bands_map
Add the missing QMI LTE bands 26 to 32 to dms_lte_bands_map to make them
usable in ModemManager.
2019-08-23 16:49:51 -05:00
Aleksander Morgado 5f29bd64de base-bearer: if method is PPP, require explicit bearer disconnection
Never automatically flag the bearer as disconnected if it's using PPP,
because we could end up using the TTY at the same time as pppd, with
the wrong CLOCAL settings.

So, whenever we detect that the bearer requires PPP, we will ignore
all disconnection reports generated by ModemManager itself.
2019-08-05 12:48:13 +00:00
Ben Chan c6cf7cf094 libmm-glib,firmware-update-settings: handle null self pointer
mm_firmware_update_settings_get_variant() checks for a null `self'
pointer when accessing `self->priv->method', but doesn't perform the
null check when accessing other members of
MMFirmwareUpdateSettingsPrivate.

This patch fixes mm_firmware_update_settings_get_variant() to fully
handle a null `self' pointer.
2019-08-03 09:16:39 -07:00
Ben Chan ee63bf4033 cinterion: fix memory leak in common_test_ctzu_urc() 2019-08-02 20:03:38 -07:00
Ben Chan 13cf94a187 iface-modem-firmware: remove explicit GDestroyNotify cast on g_free
g_free is in form of  `void (*)(gpointer)`, which matches the
GDestroyNotify signature. An explicit GDestroyNotify cast on g_free is
thus not needed.
2019-08-02 19:58:01 -07:00
Ben Chan c363c59840 charsets: use G_N_ELEMENTS (t)' instead of sizeof (t) / sizeof (t[0])' 2019-08-02 19:58:01 -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
Ben Chan 500844af73 shared-qmi: fix potentially uninitialized 'mcc' variable
mm-shared-qmi.c:358:9: error: variable 'mcc' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized]
    if (operator_id && !mm_3gpp_parse_operator_id (operator_id, &mcc, &mnc, &error)) {
        ^~~~~~~~~~~
mm-shared-qmi.c:367:9: note: uninitialized use occurs here
    if (mcc) {
        ^~~
mm-shared-qmi.c:358:9: note: remove the '&&' if its condition is always true
    if (operator_id && !mm_3gpp_parse_operator_id (operator_id, &mcc, &mnc, &error)) {
        ^~~~~~~~~~~~~~
mm-shared-qmi.c:339:51: note: initialize the variable 'mcc' to silence this warning
    guint16                                    mcc;
                                                  ^
                                                   = 0
2019-07-26 17:04:30 -07:00
Aleksander Morgado d7696d8ec1 iface-modem: don't assume that setting modes is immediate
The modem may take the request to set modes and reply right away with
a success before actually changing the current modes in use.

Therefore, If we reload modes right after we receive the set response,
we may still see the old modes instead of the new ones. Try to avoid
this, by reloading current modes a couple of times after we have set
them if they are not yet the expected ones.
2019-07-22 20:39:20 +02:00
Aleksander Morgado f1dcc71e71 iface-modem: don't assume that setting bands is immediate
The modem may take the request to set bands and reply right away with
a success before actually changing the current bands in use.

Therefore, If we reload bands right after we receive the set response,
we may still see the old band mask instead of the new one. Try to
avoid this, by reloading current bands a couple of times after we have
set them if the band mask is not the expected one.
2019-07-21 22:27:10 +02:00
Aleksander Morgado f39dbe72e5 broadband-modem,voice: implement call waiting status setup/query with +CCWA 2019-07-19 17:47:51 +02:00
Aleksander Morgado 9263e79dc3 api,voice: new CallWaitingSetup() and CallWaitingQuery() methods
These new methods allow querying and updating the status of the call
waiting network service, as per 3GPP TS 22.083.

The status of the service is not a property because we don't want to
unconditionally load it on every boot, given that the process involves
talking to the network (i.e. it is not a device setting).
2019-07-19 17:47:51 +02:00
Aleksander Morgado 0c921bbc94 sms: initialize common fields early for multipart messages
Do not wait until all parts are received in order to initialize all
fields that are common to all parts in the SMS message, do it as soon
as the first part is received.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/137
2019-07-19 14:09:37 +00:00
Aleksander Morgado 756480de6a test: new 'mmsmsmonitor' tool to monitor SMS messages
The tool monitors SMS message additions and SMS state updates, e.g.:

  $ sudo ./test/mmsmsmonitor
  [/org/freedesktop/ModemManager1/SMS/0] sms found: received
  [/org/freedesktop/ModemManager1/SMS/1] sms found: received
  [/org/freedesktop/ModemManager1/SMS/2] sms found: received
  [/org/freedesktop/ModemManager1/SMS/3] sms found: received
  [/org/freedesktop/ModemManager1/SMS/4] sms found: received
  [/org/freedesktop/ModemManager1/SMS/5] sms found: received
  [/org/freedesktop/ModemManager1/SMS/6] sms found: received
  [/org/freedesktop/ModemManager1/SMS/7] new sms: receiving
  [/org/freedesktop/ModemManager1/SMS/7] sms updated: received
2019-07-17 10:19:39 +02:00
Aleksander Morgado 4a4779729a test: new 'mmsmspdu' tool to parse PDUs given in hex 2019-07-15 13:49:49 +02:00
Aleksander Morgado 5a25776807 sms-list: improve logging of multipart related fields
We were not logging anywhere the "concat max" field for example.
2019-07-15 13:42:45 +02:00
Aleksander Morgado 22afa8a74e shared-qmi: monitor attempt after NAS initiate network register
The QMI NAS Initiate Network Register command will return a successful
response when the request to register is received and accepted by the
module, but this does not mean the requested registration has been
completed yet.

This issue was making e.g. manual registration attempts to a forbidden
network report success right away, even if the actual registration
would end up failing.

In order to avoid that, the QMI based network registration relies on
receiving QMI NAS Serving System indications after QMI NAS Initiate
Network Register replies. As soon as we get a non-searching
registration state in the indication, we'll report the operation as
successful.

Note that the 3GPP interface logic is anyway in charge of checking
if the specific request was successful or not, no need to do that
explicitly in the QMI implementation.
2019-07-15 04:43:54 +00:00
Aleksander Morgado 417c0ed882 iface-modem-3gpp: denied if all reg states idle except for one
If there is one registration state which is denied and the remaining
ones are either unknown or idle, then report denied.
2019-07-15 04:43:54 +00:00
Aleksander Morgado e9f5700d5f iface-modem-3gpp: make registered state checking a macro 2019-07-15 04:43:54 +00:00
Aleksander Morgado d9615bfc2e iface-modem-3gpp: log how the consolidated registration state is built 2019-07-15 04:43:54 +00: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 b9a3290871 iface-modem-time: allow updating network timezone via URCs 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 4c2aa2b54e base-call: use g_object_connect() to connect all handlers 2019-07-11 23:21:00 +02:00
Aleksander Morgado 272abc6394 iface-modem-voice: use g_object_connect() to connect all handlers 2019-07-11 23:21:00 +02:00
Aleksander Morgado 148466f768 broadband-modem: implement LeaveMultiparty() with +CHLD=2x 2019-07-11 23:21:00 +02:00
Aleksander Morgado 75d2431f96 broadband-modem: implement JoinMultiparty() with +CHLD=3 2019-07-11 23:21:00 +02:00
Aleksander Morgado 511b0ff244 api,call: new JoinMultiparty() and LeaveMultiparty() methods 2019-07-11 23:21:00 +02:00
Aleksander Morgado 6f23519239 iface-modem-voice: disable special terminated match on multiparty calls 2019-07-11 23:21:00 +02:00
Aleksander Morgado 213c60b76d api,call: new Multiparty boolean property
It will be set to TRUE if this call is part of a multiparty call.
2019-07-11 23:21:00 +02:00
Aleksander Morgado 8bc38110c9 base-call: remove in-call event and audio settings logic
The in-call unsolicited events and the in-call audio settings are
managed exclusively at modem level, and no longer at call object
level. This is because these two things are applicable to all calls
that may be active at the same time.
2019-07-11 23:21:00 +02:00
Aleksander Morgado 73096c0596 broadband-modem: setup in-call unsolicited event handling
The in-call handlers will monitor events that report the call being
terminated.
2019-07-11 23:21:00 +02:00