Skip to content
Snippets Groups Projects
  1. Jun 02, 2018
    • Aleksander Morgado's avatar
      release: bump version to 1.8.0 · c187c5fe
      Aleksander Morgado authored
      1.8.0
      c187c5fe
    • Aleksander Morgado's avatar
      NEWS: update for 1.8 · 01a5d8a2
      Aleksander Morgado authored
      01a5d8a2
    • Aleksander Morgado's avatar
      udev: add tags also on bind action · c07382a4
      Aleksander Morgado authored
      When a new USB device is hotplugged, e.g. a USB<->RS232 converter that
      exposes a single ttyUSB0, these udev events happen:
      
        add  /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)
        add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
        add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
        add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
        bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
        bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
        bind /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)
      
      Our udev rules in MM only added tags in the 'add' events, and it looks
      like the only ones 'persistent' after this sequence are those of the
      last event happening on the specific path.
      
      This meant that all TTY subsystem rules (e.g. ID_MM_CANDIDATE) would
      be stored for later check (e.g. if ModemManager is started after these
      rules have been applied), which was ok. "udevadm info -p ..." would
      show these tags correctly always.
      
      But this also meant that the 'bind' udev event happening for the USB
      device didn't get any of our device-specific tags, and so we would be
      missing them (e.g. ID_MM_DEVICE_MANUAL_SCAN_ONLY) if MM is started
      after the last event has happened. "udevadm info -p ..." would
      not show these tags.
      
      Modify all our rules to also run at the 'bind' events.
      
      See, for context:
        https://github.com/systemd/systemd/issues/8221
      c07382a4
    • Aleksander Morgado's avatar
  2. May 27, 2018
    • Aleksander Morgado's avatar
      broadband-modem-mbim: minor function renames for SMS read logic · 6c37488d
      Aleksander Morgado authored
      There are two ways to report new received SMS messages:
        * For class 0 (flash) messages, MBIM_CID_SMS_READ are sent. The SMS
        comes in the MBIM indication itself.
        * For non-class 0 (standard) messages, a
        MBIM_CID_SMS_MESSAGE_STORE_STATUS notifications are sent, the SMS is
        stored and must be read with an additional MBIM request specifying
        storage index.
      
      The names of the functions we had implied the opposite, we were
      assuming flash/alert messages were reported via
      MBIM_CID_SMS_MESSAGE_STORE_STATUS, not via MBIM_CID_SMS_READ.
      6c37488d
    • Aleksander Morgado's avatar
      filter: pci and sdio ports under the platform driver filter · fd3a4d8d
      Aleksander Morgado authored
      Do not automatically probe serial ports under the 'pci' or 'sdio'
      platform drivers unless explicitly tagged with
      ID_MM_PLATFORM_DRIVER_PROBE.
      
        $ realpath /sys/class/tty/ttyS0/
        /sys/devices/pci0000:00/0000:00:16.3/tty/ttyS0
        $ basename $(realpath /sys/devices/pci0000:00/0000:00:16.3/subsystem)
        pci
      fd3a4d8d
    • Aleksander Morgado's avatar
      iface-modem-time: don't hold a ref while waiting to be registered · 38f9510a
      Aleksander Morgado authored
      The logic implementing the network timezone loading was holding a
      strong reference to the modem (inside the GTask) while waiting to
      be registered.
      
      This was triggering some possible memory leaks as the modem object
      could have been left around even after the modem was disconnected.
      E.g. if the modem booted without antennas plugged in, it was never
      getting registered, and if we unplugged it right away in that state,
      the network timezone logic would have left a modem reference around
      without disposing it.
      
      This issue, combined with e.g. other interfaces relying on disposing
      its own logic with the last object reference (e.g. Signal interface
      sets up its logic in a context bound to the lifetime of the object)
      would mean that a lot of different logic blocks were kept running even
      after the modem device was unplugged from the system.
      
      We avoid this issue by making sure that no new additional reference is
      taken by the logic in charge of updating the network timezone. We just
      make the timezone update context be bound to the lifetime of the
      object, as other interfaces do.
      
      While doing this, we also remove the logic in charge of "cancelling"
      the context, as it isn't needed. If the logic needs to be cancelled,
      we would just remove any configured timeout, which is enough.
      
      As part of the changes, the logic has also been improved so that the
      network timezone isn't only updated the first time the modem gets
      registered. If the modem gets unregistered and re-registered, we would
      reload the network timezone information.
      38f9510a
  3. May 24, 2018
  4. May 22, 2018
  5. May 20, 2018
  6. May 18, 2018
  7. May 08, 2018
  8. May 07, 2018
  9. Apr 30, 2018
    • Matthew Starr's avatar
      u-blox: ignore non-AT ttyACM interfaces · 48955775
      Matthew Starr authored and Aleksander Morgado's avatar Aleksander Morgado committed
      For the TOBY-R2, LISA-R2, and LARA-R2, the only valid AT ports are
      ttyACM0, ttyACM1, and ttyACM2.  All other ttyACM ports cause MM to
      wait 20-30 seconds probing the port on startup.
      
      Ignoring the non-AT ttyACM ports allows MM to not wait 20-30 seconds
      probing and therefore startup much faster with these modems.
      48955775
    • Aleksander Morgado's avatar
      broadband-bearer: allow matching empty APN when looking for PDP CID · e17d5a51
      Aleksander Morgado authored
      The PDP contexts that are found with an empty APN configured are right
      now used as placeholders that can be overwritten with the user
      provided APN if no direct match is found.
      
      We want to keep that logic in place, but for the case where we do get
      an empty APN requested by the user, we need to perform the full
      context match, so that the first PDP context matching the empty APN is
      used.
      
      Right now we're overwriting with the empty APN again the last PDP
      context found with an empty APN, which doesn't make much sense:
      
          Apr 27 08:15:21 ModemManager[4251]: <debug> Found '3' PDP contexts
          Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=1] [type='ipv4'] [apn='']
          Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=2] [type='ipv4'] [apn='broadband']
          Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=15] [type='ipv4'] [apn='']
          Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 1 and no APN
          Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 15 and no APN
          Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 3 (open)
          Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 2 (close)
          Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): --> 'AT+CGDCONT=15,"IP",""<CR>'
          Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
      e17d5a51
    • Aleksander Morgado's avatar
      base-modem: improve broken modem detection logic · 43d0bd0f
      Aleksander Morgado authored
      If the serial port timeout detection logic is enabled, warn whenever
      more than one consecutive command timeout happens, not just when the
      limit is reached.
      43d0bd0f
    • Ben Chan's avatar
      broadband-modem-qmi: fix memory leak in dms_set_operating_mode_ready · 21c9a239
      Ben Chan authored and Aleksander Morgado's avatar Aleksander Morgado committed
      21c9a239
  10. Apr 25, 2018
    • Ben Chan's avatar
      iface-modem: allow initial signal check after the modem is re-enabled · f9a0b945
      Ben Chan authored and Aleksander Morgado's avatar Aleksander Morgado committed
      Commit 708b00ae "modem: allow periodic signal check to be disabled"
      added a "iface-modem-periodic-signal-check-disabled" property in
      MMIfaceModem/MMBroadbandModem to indicate if the periodic signal check
      should be disabled. If the property is set to TRUE, the
      signal_quality_polling_supported field of SignalCheckContext is set to
      FALSE, which is sticky across modem disable/enable operations. However,
      that is undesirable as we would like to issue an initial signal check to
      refresh the signal quality value after the modem is re-enabled from a
      state when the RF may have been previously turned off.
      f9a0b945
  11. Apr 24, 2018
    • Ben Chan's avatar
      broadband-modem-mbim: implement initial signal quality loading · 5e5160c4
      Ben Chan authored and Aleksander Morgado's avatar Aleksander Morgado committed
      ModemManager currently relies on unsolicited MBIM_CID_SIGNAL_STATE
      notifications to obtain signal quality updates, and it doesn't query the
      initial signal quality. It's been observed that some MBIM modems issue a
      MBIM_CID_SIGNAL_STATE notification only when there is a notable change
      in RSSI. The signal quality may remain at 0 for quite some time. It's
      more noticeable when simply restarting ModemManager after the modem has
      been initialized and enabled once.
      
      We could simply enable periodic signal check on an MBIM modem, but
      that's less ideal as it may unnecessarily wake the modem up from USB
      selective suspend (unless we use a much longer polling period).
      
      To address the issue, this patch adds the implementation of
      load_signal_quality to MMBroadbandModemMbim so that the signal quality
      is initially polled via a solicited MBIM_CID_SIGNAL_STATE query. To
      avoid the periodic signal check, we set the
      MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED property to TRUE for
      MMBroadbandModemMbim.
      5e5160c4
    • Ben Chan's avatar
      modem: allow periodic signal check to be disabled · 708b00ae
      Ben Chan authored and Aleksander Morgado's avatar Aleksander Morgado committed
      ModemManager decides to disable periodic signal check if either
      load_signal_quality is not implemented or load_signal_quality returns an
      unsupported error. However, in some cases, we want to use
      load_signal_quality to query the initial signal quality but rely on
      unsolicited signal quality updates from the modem afterwards without
      periodically polling for signal quality. To support that, this patch
      introduces a property in MMIfaceModem/MMBroadbandModem to indicate if
      the periodic signal check should be disabled.
      708b00ae
    • Lubomir Rintel's avatar
      all: drop unused variables · b39dd2ec
      Lubomir Rintel authored and Aleksander Morgado's avatar Aleksander Morgado committed
      Keeps build with GCC 8 happy.
      
      mm-base-call.c:758:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      mm-base-call.c:822:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      mm-base-sms.c:908:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      mm-sms-list.c:331:25: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
      mm-iface-modem-messaging.c:1210:21: warning: variable 'storage_ctx' set but not used [-Wunused-but-set-variable]
      huawei/mm-plugin-huawei.c:183:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      ublox/mm-plugin-ublox.c:161:24: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      ublox/mm-plugin-ublox.c:159:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
      icera/mm-modem-helpers-icera.c:218:25: warning: variable 'first_free' set but not used [-Wunused-but-set-variable]
      novatel/mm-common-novatel.c:50:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
      b39dd2ec
    • Iain Lane's avatar
      m4/compiler_warnings.m4: Let -Werror be disabled · 5072db34
      Iain Lane authored and Aleksander Morgado's avatar Aleksander Morgado committed
      It's annoying for distributors to build with -Werror, since it means
      that compiler upgrades can break the build. Let's let them disable it,
      but keep it enabled by default.
      5072db34
  12. Apr 03, 2018
    • Aleksander Morgado's avatar
      ublox: fix 'any' mode building · 7e949283
      Aleksander Morgado authored
      
      The 'any' mode refers to the mode which includes most access
      technologies and where none of them is preferred.
      
      Fix the logic so that all combinations with one technology preferred
      over the others are ignored, instead of the other way around.
      
      Fixes assertion with the 4G-only LARA R204.
      
          ModemManager[424]: <debug> [-192499452.090358] (ttyACM0): --> 'AT+URAT=?<CR>'
          ModemManager[424]: <debug> [-192499452.092150] (ttyACM0): <-- '<CR><LF>+URAT: (3)<CR><LF><CR><LF>OK<CR><LF>'
          **
          ERROR:ublox/mm-modem-helpers-ublox.c:817:mm_ublox_get_modem_mode_any: assertion failed: (any != MM_MODEM_MODE_NONE)
      
      Reported-by: default avatarMatthew Starr <mstarr@hedonline.com>
      7e949283
  13. Mar 27, 2018
  14. Mar 13, 2018
  15. Mar 09, 2018
    • Aleksander Morgado's avatar
      ublox: ignore ttyACM0 in the TOBY-L4 · 3a7d4b12
      Aleksander Morgado authored
      We used ttyACM0 as secondary port until now, just because we had an
      extra AT capable TTY around in addition to the main control ttyACM2
      port.
      
      Turns out, using this ttyACM0 may actually break the connection setup
      in the wwan interface in a bad way (e.g. not allowing DHCP setup).
      
      The suggestion from u-blox and Intel is to fully ignore ttyACM0; and
      given that we no longer need any primary/secondary port logic, we just
      remove all the associated udev tags.
      3a7d4b12
  16. Mar 04, 2018
  17. Feb 23, 2018
  18. Feb 21, 2018
  19. Feb 13, 2018
  20. Feb 08, 2018
    • Dan Williams's avatar
      iface-modem-3gpp: don't force auto registration if already registered · dce07527
      Dan Williams authored
      In mm_iface_modem_3gpp_register_in_network() when deciding whether to
      force automatic registration or not, check whether the modem is already
      registered in a network.  Just checking whether we have a valid operator
      code is not sufficient, as some modems (ublox Toby R2xx) don't always
      return an operator name/code even when registered.
      dce07527
Loading