Skip to content
  1. Jun 17, 2019
    • Alexander Yashin's avatar
      76656009
    • Alexander Yashin's avatar
      ublox: add support to SIM hot swap · 184cdfab
      Alexander Yashin authored
      There are several steps to make SIM hot swap option enabled:
        1. Check SIM hot insertion configuration using `+UDCONF=50` command.
           - If this command returns `+UDCONF=50,1`, the hot insertion is
             already configured, so we do not need to enable it, goto step 4.
           - Otherwise, the hot insertion is not configured, so we need to
             enable it, goto step 2.
      
        2. Configure SIM hotplug option using `+UDCONF=50,1` command.
          - This command configures the SIM hot insertion feature.
          - The command setting is saved in NVM and will be effective at
            the next power on (modem reset is required).
      
        3. Perform modem silent reset using `+CFUN=15` command.
          - MT silent reset (with detach from network and saving of NVM
            parameters), without reset of the SIM card.
      
        4. Setup `CIEV: 12,(X)` unsolicited response codes processing.
           These messages allow us to know if SIM os (un)plugged.
          - Configure the indication of the status of a SIM card(`+CIEV` URC)
            using `+CMER=1,0,0,1,0` command.
      184cdfab
    • Alexander Yashin's avatar
      ublox: new u-blox specific +UDCONF=50 response parser · d9b0005e
      Alexander Yashin authored
      This patch adds:
       - MMUbloxSimHotplugStatus and MMUbloxSimInsertStatus enumerations.
       - `parse_udconf_query` function
          which is capable to parse `AT+UDCONF=50` query response.
      d9b0005e
  2. Jun 13, 2019
    • Aleksander Morgado's avatar
      cinterion: make custom +CIEV parser much more generic · 1d52e5c2
      Aleksander Morgado authored
      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.
      1d52e5c2
    • Aleksander Morgado's avatar
    • Aleksander Morgado's avatar
      ublox: return error when no bands are parsed · 20c5d7fd
      Aleksander Morgado authored
      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
      20c5d7fd
  3. Jun 11, 2019
  4. Jun 03, 2019
    • Aleksander Morgado's avatar
      port-serial-at: raw commands always run next · 72bdb1b3
      Aleksander Morgado authored and Dan Williams's avatar Dan Williams committed
      We use the raw commands exclusively when we're sending SMS data to the
      device. Until this change, all raw commands were added at the tail of
      the queue of pending commands, and that meant that if any unrelated AT
      command was interleaved between e.g. our AT+CGMS and the actual SMS
      data sent, the operation would have failed.
      
      With this fix, we're making sure that all raw commands are added at
      the head of the queue, so we're making sure that the next command
      picked after e.g. CGMS is actually the raw SMS data to be sent.
      
      We would be avoiding issues like this one, where an outgoing voice
      call attempt gets in the way before we send the SMS data:
      
        [1556246081.786284] (ttyACM2): --> 'AT+CMGS=70<CR>'
        [1556246081.814861] (ttyACM2): <-- '<CR><LF>> '
        [1556246081.819382] (ttyACM2): --> 'ATD1234567890;<CR>'
        [1556246081.839685] (ttyACM2): <-- '<CR><LF>> '
        [1556246081.840123] Couldn't start call : 'Couldn't start the call: Unhandled response '> ''
        [1556246081.856254] (ttyACM2): --> '0001000D810..............
        [1556246081.922470] (ttyACM2): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'
      72bdb1b3
    • Aleksander Morgado's avatar
      port-serial: allow deciding whether the command is queued last or run next · 8092e301
      Aleksander Morgado authored and Dan Williams's avatar Dan Williams committed
      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).
      8092e301
  5. Jun 01, 2019
  6. May 30, 2019
    • Aleksander Morgado's avatar
      quectel: add port type hints for the Quectel LTE-A EG06 · 8ec9789e
      Aleksander Morgado authored
       ttyUSB0 (if #0): QCDM/DIAG port
       ttyUSB1 (if #1): GPS data port
       ttyUSB2 (if #2): AT primary port
       ttyUSB3 (if #3): AT secondary port
      8ec9789e
    • Aleksander Morgado's avatar
      iface-modem: fix reporting state while registration is denied · aa223879
      Aleksander Morgado authored and Dan Williams's avatar Dan Williams committed
      When registration is denied, we should be reporting the modem with
      'enabled' state instead of 'registered'. This was not happening
      because the logic to build the consolidated state (for 3GPP+3GPP2
      modems) was using as default initial state the current old state, and
      so if the old one was 'registered' it never allowed getting a
      consolidated state of 'enabled', because 'registered' > 'enabled'.
      
      Instead of using the old initial state, the consolidated modem state
      should use 'enabled' as default initial value, which is the lowest
      among 'enabled, 'searching' and 'registered'.
      aa223879
  7. May 28, 2019
  8. May 23, 2019
    • Aleksander Morgado's avatar
      plugin: ignore unwanted net ports · fd1a26fc
      Aleksander Morgado authored
       * For QMI modems, make sure we only grab QMI data ports (flag the
         rest as ignored).
       * For MBIM modems, make sure we only grab MBIM data ports (flag the
         rest as ignored).
       * For other plugins that use NET ports in their logic, make sure we
         only grab non-QMI and non-MBIM data ports.
      fd1a26fc
  9. May 18, 2019
  10. May 14, 2019
    • Lubomir Rintel's avatar
      bearer-qmi: do not call cleanup_event_report_unsolicited_events() w/o indication_id · 50fc46c1
      Lubomir Rintel authored and Aleksander Morgado's avatar Aleksander Morgado committed
      If a disconnection fails (because stop_network() failed), base-bearer
      flips the state back to CONNECTED. Oops. At that point something is
      clearly messed up, but it seems correct to assume the bearer is
      connected.
      
      Nevertheless, we will have already have unhooked the unsolicited events
      reporting. A subsequent attempt to disconnect the bearer will trip the
      assertion:
      
        #0  0x00007ffff75f2eb5 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        #1  0x00007ffff75dd895 in __GI_abort () at abort.c:79
        #2  0x00007ffff77beb53 in g_assertion_message
            (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", message=<optimized out>) at ../glib/gtestutils.c:2878
        #3  0x00007ffff781a96f in g_assertion_message_expr
            (domain=domain@entry=0x0, file=file@entry=0x507aad "mm-bearer-qmi.c", line=line@entry=1138, func=func@entry=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", expr=expr@entry=0x507ae5 "*indication_id != 0") at ../glib/gtestutils.c:2904
        #4  0x00000000004a0c49 in cleanup_event_report_unsolicited_events (client=<optimized out>, indication_id=0x5bb30c, self=<optimized out>)
            at mm-bearer-qmi.c:1138
        #5  0x00000000004a0c49 in cleanup_event_report_unsolicited_events
            (client=<optimized out>, indication_id=indication_id@entry=0x5bb30c, self=0x5bb420 [MMBearerQmi]) at mm-bearer-qmi.c:1132
        #6  0x00000000004a0ee3 in disconnect_context_step (task=0x7fffe8012100 [GTask]) at mm-bearer-qmi.c:1854
        #7  0x000000000046e889 in disconnect_auth_ready (self=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x654630)
            at mm-iface-modem-simple.c:865
        #8  0x00007ffff79cfa9a in g_task_return_now (task=0x7fffe8012640 [GTask]) at ../gio/gtask.c:1209
        ...
      
      Add checks for indication_id to calls to
      cleanup_event_report_unsolicited_events() on
      DISCONNECT_STEP_STOP_NETWORK_IPV4 or DISCONNECT_STEP_STOP_NETWORK_IPV6, as
      is done elsewhere.
      50fc46c1
    • Lubomir Rintel's avatar
      base-bearer: fix check for cancellation · eaaf64ff
      Lubomir Rintel authored and Aleksander Morgado's avatar Aleksander Morgado committed
      If we cancel connect_cancellable, the connect task will return a
      G_IO_ERROR_CANCELLED. We may need to do some cleanup (like, disconnect
      if the connection went far enough to actually start the network
      connection), thus it's important we check for cancellation correctly.
      eaaf64ff
    • Lubomir Rintel's avatar
      bearer-qmi: remove unused DisconnectContext::data · aaea6c77
      Lubomir Rintel authored and Aleksander Morgado's avatar Aleksander Morgado committed
      aaea6c77
  11. May 08, 2019
  12. May 06, 2019
  13. May 01, 2019
  14. Apr 26, 2019
    • Lech Perczak's avatar
      broadband-modem-mbim: parse nw_error in register_state_set_ready only if MBIM_STATUS_FAILURE · 7a6e9272
      Lech Perczak authored and Dan Williams's avatar Dan Williams committed
      
      
      Some modems (Namely: Telit LE910 V2) report nonzero NwError code,
      outside of 3GPP TS 24.008 - in "register-state set command-done" response,
      while status code equals MBIM_STATUS_ERROR_NONE.
      In such cases network is operational.
      According to MBIM specification 1.0 table 10.5.9.8 "Status codes",
      NwError shall be nonzero only if Status Code equals MBIM_STATUS_FAILURE,
      and client shall parse NwError only in such cases.
      Also, MBIM specification does not explicitly state that 'NwError == 0' equals
      no error, rather than that it is unknown error, hence raise an error
      unconditionally if MBIM status code is MBIM_STATUS_FAILURE.
      
      Therefore, check NwError IFF MBIM response status code equals
      MBIM_STATUS_FAILURE, instead of MBIM_STATUS_SUCCESS.
      
      Fixes: 854c371c ("broadband-modem-mbim: implement 3GPP registration request")
      Signed-off-by: default avatarLech Perczak <l.perczak@camlintechnologies.com>
      7a6e9272
  15. Apr 25, 2019
  16. Apr 15, 2019
  17. Apr 09, 2019
  18. Apr 08, 2019
  19. Apr 05, 2019
    • Ben Chan's avatar
      build: make compiler warning options compatible with clang · 9dac5ece
      Ben Chan authored and Aleksander Morgado's avatar Aleksander Morgado committed
      This patch updates m4/compiler-warnings.m4 as follows to make it more
      compatible with clang:
      
      * clang doesn't support -Wunused-but-set-variable, which can be replaced
        with -Wunused-variable as the latter covers unused variables with or
        without an assigned value and is supported by gcc and clang.
      
      * -Wno-unused-function is added to let clang ignore unused functions that
        are auto-generated.
      9dac5ece
  20. Apr 03, 2019
  21. Apr 02, 2019
    • Dan Williams's avatar
      libwmc: remove it · 1c14ca72
      Dan Williams authored
      The WMC protocol was only present on older Panasonic/Verizon devices
      from the 2006 - 2011 timeframe. The last device to support WMC was
      the UML290 which also supported QMI (which is much more functional).
      ModemManager also never used WMC support and it was never significantly
      reverse engineered.
      
      So remove WMC code from git; it'll still be in the history if anyone
      cares in the future.
      1c14ca72
    • Dan Williams's avatar
      build: fix -Wunused-but-set-variable support and handle clang better · 88fac7f1
      Dan Williams authored
      
      
      By default the build used -Wno-unused-but-set-variable but that's
      clearly not what we want. Fix those problems.
      
      When using clang, the compiler doesn't error on unknown compile
      options, so let's add -Werror to the checking too.
      
      CC='clang'
      configure:3408: checking for gcc
      configure:3435: result: clang
      ...
      configure:17644: checking whether gcc understands -Wno-unused-but-set-variable
      configure:17657: clang -c -Wall -std=gnu89 -g -O2 -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wstrict-prototypes -Wno-unused-parameter -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable  conftest.c >&5
      warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
      1 warning generated.
      configure:17657: $? = 0
      configure:17666: result: yes
      
      Reported-by: default avatarTorsten Hilbrich <torsten.hilbrich@secunet.com>
      88fac7f1
Loading