Skip to content
Snippets Groups Projects
  1. May 26, 2021
  2. May 22, 2021
  3. Apr 30, 2021
  4. Feb 23, 2021
  5. Nov 14, 2020
    • Aleksander Morgado's avatar
      core,plugins: consolidate connection/disconnection timeout values · 5d150ed2
      Aleksander Morgado authored
      Each different plugin or protocol had a different connection attempt
      value. E.g. QMI and MBIM both used 60s max for the connection attempt,
      while the u-blox plugin had up to 180s for ECM based connection
      setups.
      
      This commit consolidates all plugins and protocols to use the same
      timeout values for commands that may take long to respond, e.g. a
      connection atempt under low signal quality conditions.
      
      A value of 180s for the connection attempt steps and 120s for a
      disconnection attempt step is considered. Note, though, that in some
      cases (like a IPv4v6 setup attempt using QMI) we may have more than
      one such long step, so this doesn't mean that a connection attempt
      will always take less than 180s.
      
      Users of the connection/disconnection APIs should be able to handle
      the case where the attempt times out in their side (e.g. with a lower
      DBus request timeout), and which would not mean the actual request
      they did really failed. E.g. a connection attempt with a DBus timeout
      of 30s may fail in the user with a timeout error, but the attempt
      would still go on for as much as the plugin/protocol needs.
      
      Fixes #270
      5d150ed2
  6. Apr 08, 2020
  7. Dec 05, 2017
    • Aleksander Morgado's avatar
      mbm: port dial_3gpp() and disconnect_3gpp() to GTask · a4271d84
      Aleksander Morgado authored
      The two connection and disconnection methods are ported to GTask, and
      are also updated so that the reception of the unsolicited message
      reporting either connect/disconnection is able to right away complete
      the pending connection/disconnection attempts, as done in other
      plugins like the Icera or HSO ones.
      a4271d84
  8. Sep 28, 2017
  9. Mar 29, 2017
  10. Oct 12, 2016
    • Aleksander Morgado's avatar
      broadband-modem: implement default connection monitoring logic · 37bd6142
      Aleksander Morgado authored
      A default implementation to monitor the ongoing connection is provided in the
      generic MMBroadbandModem, based on AT+CGACT? to check whether the PDP context
      of the connection (identified by the cached cid) is active or not.
      
      This commit also disables the connection monitoring logic in those plugins that
      have custom connection methods.
      37bd6142
  11. May 27, 2016
    • Dan Williams's avatar
      broadband-bearer-mbm: connect errors should trigger a disconnect · ba097f1a
      Dan Williams authored
      Otherwise we may leave a bearer connected when ModemManager doesn't
      think it's connected.  Prevents a CME ERROR 277 loop on connect when
      the bearer hasn't been torn down correctly.
      ba097f1a
    • Dan Williams's avatar
      broadband-bearer-mbm: wait for disconnect to complete · 5c3461ff
      Dan Williams authored
      Wait for either an E2NAP unsolicited disconnect status or (for older
      devices) an ENAP poll response before completing the disconnect.
      Otherwise the client may start connecting again (such as
      NetworkManager autoconnect retry) and the unsolicited E2NAP may
      abort it, or the modem may return CME ERROR 277 ("not disconnected
      yet") for the next connection attempt.
      
      https://bugs.freedesktop.org/attachment.cgi?id=123525
      5c3461ff
    • Dan Williams's avatar
      broadband-bearer-mbm: simplify dial_3gpp connection setup flow · 9cc85195
      Dan Williams authored
      There are a few key parts to this patch:
      
      1) move the poll id into the Dial3gppContext structure as it is
      conceptually part of the connection context data.  This simplifies
      context cleanup by keeping the poll id cleanup in one place.
      
      2) move unsolicited connection status (E2NAP) handling into the
      normal connection codepath, instead of completing the connection
      context from the report_connection_status() E2NAP handler.  This
      simplifies connect code by not requiring checks for a NULL context
      everywhere, and allows us to pass the Dial3gppContext structure
      around instead of the Bearer object, since the Dial3gppContext
      will never be comleted/freed outside the normal connection flow
      codepaths like GLib idles and AT command requests.
      
      3) use the connect context cancellable for all AT command requests
      in the connect path.  This lets us use the error return from
      mm_base_modem_at_command_full_finish() to handle cancellation and
      also not bother listening to the 'cancelled' signal of the
      cancellable, since we can just check for cancellation the next time
      the ENAP poll function runs.
      
      https://bugs.freedesktop.org/show_bug.cgi?id=95304
      9cc85195
  12. May 10, 2016
    • Lubomir Rintel's avatar
      mbm: clean up the context on activate_ready · e27f4a62
      Lubomir Rintel authored
      Otherwise the dangling pointer to the context that's being deallocated causes a
      crash on spontaneous E2NAP receipt:
      
        ModemManager[1567]: <info>  [1462468083.031326] [mm-iface-modem.c:1431] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
        ModemManager[1567]: <debug> [1462468083.053745] [mm-port-serial-at.c:459] debug_log(): (ttyACM0): <-- '<CR><LF>*E2NAP: 0,36<CR><LF>'
        ModemManager[1567]: <debug> [1462468083.053857] [mbm/mm-broadband-modem-mbm.c:824] e2nap_received(): disconnected
      
        (ModemManager:1567): GLib-GIO-CRITICAL **: g_simple_async_result_set_error: assertion 'G_IS_SIMPLE_ASYNC_RESULT (simple)' failed
      
        Program received signal SIGTRAP, Trace/breakpoint trap.
        g_logv (log_domain=0x7ffff7086798 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcda0) at gmessages.c:1046
        1046              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
        Missing separate debuginfos, use: debuginfo-install libmbim-1.12.4-2.el7.centos.x86_64 libqmi-1.14.2-1.el7.centos.x86_64
        (gdb) bt
        #0  0x00007ffff6a508c3 in g_logv (log_domain=0x7ffff7086798 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcda0) at gmessages.c:1046
        #1  0x00007ffff6a50a3f in g_log (log_domain=log_domain@entry=0x7ffff7086798 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff6abe73d "%s: assertion '%s' failed") at gmessages.c:1079
        #2  0x00007ffff6a50a79 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff7086798 "GLib-GIO", pretty_function=pretty_function@entry=0x7ffff7092ce0 <__FUNCTION__.13394> "g_simple_async_result_set_error", expression=expression@entry=0x7ffff7092a40 "G_IS_SIMPLE_ASYNC_RESULT (simple)") at gmessages.c:1088
        #3  0x00007ffff6ff9d3d in g_simple_async_result_set_error (simple=0x7fffe8006e40, domain=297, code=0, format=0x7ffff175b53f "Call setup failed") at gsimpleasyncresult.c:719
        #4  0x00007ffff17569ea in report_connection_status (bearer=0x7fffe4008a40 [MMBroadbandBearerMbm], status=MM_BEARER_CONNECTION_STATUS_DISCONNECTED) at mbm/mm-broadband-bearer-mbm.c:174
        #5  0x000055555559c9f1 in mm_base_bearer_report_connection_status (self=0x7fffe4008a40 [MMBroadbandBearerMbm], status=MM_BEARER_CONNECTION_STATUS_DISCONNECTED) at mm-base-bearer.c:1118
        #6  0x00007ffff17548ed in bearer_list_report_status_foreach (bearer=0x7fffe4008a40 [MMBroadbandBearerMbm], ctx=0x7fffffffd060) at mbm/mm-broadband-modem-mbm.c:805
        #7  0x00007ffff6a45f18 in g_list_foreach (list=<optimized out>, func=0x7ffff17548c9 <bearer_list_report_status_foreach>, user_data=0x7fffffffd060) at glist.c:994
        #8  0x00005555555a224b in mm_bearer_list_foreach (self=0x5555558e0680 [MMBearerList], func=0x7ffff17548c9 <bearer_list_report_status_foreach>, user_data=0x7fffffffd060) at mm-bearer-list.c:146
        #9  0x00007ffff1754a3d in e2nap_received (port=0x5555558e24c0 [MMPortSerialAt], info=0x555555935730, self=0x555555900330 [MMBroadbandModemMbm]) at mbm/mm-broadband-modem-mbm.c:850
        #10 0x000055555563d9fd in parse_unsolicited (port=0x5555558e24c0 [MMPortSerialAt], response=0x7fffe80054f0) at mm-port-serial-at.c:280
        #11 0x0000555555639915 in parse_response_buffer (self=0x5555558e24c0 [MMPortSerialAt]) at mm-port-serial.c:889
        #12 0x0000555555639f0b in common_input_available (self=0x5555558e24c0 [MMPortSerialAt], condition=G_IO_IN) at mm-port-serial.c:1019
        #13 0x0000555555639fc7 in iochannel_input_available (iochannel=0x555555926df0, condition=G_IO_IN, data=0x5555558e24c0) at mm-port-serial.c:1042
        #14 0x00007ffff6a4979a in g_main_context_dispatch (context=0x5555558a4a00) at gmain.c:3109
        #15 0x00007ffff6a4979a in g_main_context_dispatch (context=context@entry=0x5555558a4a00) at gmain.c:3708
        #16 0x00007ffff6a49ae8 in g_main_context_iterate (context=0x5555558a4a00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3779
        #17 0x00007ffff6a49dba in g_main_loop_run (loop=0x5555558acf10) at gmain.c:3973
        #18 0x000055555558d068 in main (argc=2, argv=0x7fffffffdc38) at main.c:181
        (gdb)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1333293
      https://bugs.freedesktop.org/show_bug.cgi?id=95303
      e27f4a62
  13. Dec 02, 2015
  14. Jul 06, 2014
  15. Jun 13, 2014
  16. May 21, 2014
  17. May 20, 2014
  18. Feb 13, 2014
  19. Sep 23, 2013
    • Aleksander Morgado's avatar
      bearer: consolidate unsolicited connection status reports · d818d9fe
      Aleksander Morgado authored
      Originally developed by:
        Ben Chan <benchan@chromium.org>
      
      This patch replaces mm_bearer_report_disconnection() with a more generic
      mm_bearer_report_connection_status(), which allows reporting any
      connection status of a bearer. This further allows getting rid of those
      custom report_connection_status functions in plugic specific bearer
      subclasses.
      
      Note that while plugin-specific implementations can receive multiple
      'MMBearerConnectionStatus' values, the generic implementation is only allowed
      to receive DISCONNECTED. Plugins need to make sure that they process all the
      other status values, and only report DISCONNECTED to the parent when required.
      
      MBM:
        The MBM bearer implementation of report_connection_status() expects either
        CONNECTED or DISCONNECTED. If any of these is received and there is an ongoing
        connection attempt, the corresponding operation will be completed. If there is
        no connection attempt, we will just handle the DISCONNECTED state, calling the
        parent method to notify that the modem got network-disconnected.
      
      Icera:
        The Icera bearer implementation of report_connection_status() expects either
        CONNECTED, CONNECT FAILED or DISCONNECTED. If any of these is received and
        there is an ongoing connection or disconnection attempt, the corresponding
        operation will be completed. If there is no connection or disconnection
        attempt, we will just handle the CONNECT FAILED and DISCONNECTED states,
        calling the parent method (always with DISCONNECTED) to notify that the modem
        got network-disconnected.
      
      Option/HSO:
        The Option/HSO bearer implementation of report_connection_status() expects
        either CONNECTED, CONNECTION FAILED or DISCONNECTED. If any of these is
        received and there is an ongoing connection or disconnection attempt, the
        corresponding operation will be completed. If there is no connection or
        disconnection attempt, we will just handle the CONNECTION FAILED and
        DISCONNECTED states, calling the parent method (always with DISCONNECTED) to
        notify that the modem got network-disconnected.
      
      Huawei:
        The Huawei bearer implementation of report_connection_status() expects either
        CONNECTED or DISCONNECTED. These messages are not used to process pending
        connection or disconnection attempts; so if they are received while one of
        these is on-going, it will just be ignored. CONNECTED reports are also
        ignored, so we will just handle the DISCONNECTED state, calling the parent
        method to notify that the modem got network-disconnected.
      
      Altair-LTE:
        The Altair-LTE bearers will only report DISCONNECTED on network-disconnected
        cases. There is no custom report_connection_status().
      
      Novatel-LTE:
        The Novatel-LTE bearers will only report DISCONNECTED on network-disconnected
        cases. There is no custom report_connection_status().
      d818d9fe
  20. Apr 05, 2013
  21. Mar 05, 2013
  22. Feb 18, 2013
    • Aleksander Morgado's avatar
      bearer,3gpp: dial operation specifies which data port to use · b6402a4e
      Aleksander Morgado authored
      Instead of deciding in advance which data port to use, we let the dialling
      operation gather it. For the generic dialling logic, ATD-based, always an
      'AT' port will be used as data port, even if we grabbed a 'net' port. Those
      plugins that can work with 'net' ports will grab the specific 'net' port
      themselves.
      b6402a4e
  23. Oct 04, 2012
    • Aleksander Morgado's avatar
      libmm-glib: remove the `libmm-common.h' header · c250fa37
      Aleksander Morgado authored
      Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.
      
      We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
      symbols, which if included before the `libmm-glib.h' library allow us to:
      
       * Don't include the libmm-glib high level API in the ModemManager daemon, as
         the object names would clash with those in the core.
      
       * Define some of the methods of helper objects to be included only if compiling
         ModemManager daemon or the mmcli.
      c250fa37
  24. Sep 14, 2012
  25. Aug 24, 2012
  26. Aug 23, 2012
Loading