summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* iface-modem-messaging: if only one storage supported, select it right awayaleksander/sms-default-storageAleksander Morgado2018-09-131-18/+42
| | | | | | | | Some plugins or implementations (e.g. notably MBIM) may report a single storage as supported and no way to update the current default storage. In this specific case, we will initialize the default storage to that single one supported right away, regardless of whether selecting others is implemented or not.
* xmm: increase AT command timeout when updating bands/modesAleksander Morgado2018-09-131-2/+2
| | | | Looks like sometimes it may take a bit more than 3s.
* po: minor updates in fr and it translation filesAleksander Morgado2018-09-132-13/+11
|
* [l10n] Add Italian translationMilo Casagrande2018-09-132-0/+109
| | | | Signed-off-by: Milo Casagrande <milo@milo.name>
* xmm: minor alignment fixesAleksander Morgado2018-09-133-37/+34
|
* xmm: ensure outputs in load_values_finish() are always set if successAleksander Morgado2018-09-132-3/+8
|
* xmm: implement signal interface with +XCESQ pollingPaul Bartell2018-09-133-0/+96
|
* xmm: add +XCESQ parserPaul Bartell2018-09-133-0/+375
|
* broadband-modem: Call signal shutdown function when modem is disabledPaul Bartell2018-09-131-0/+6
|
* iface-modem-signal: Tear down refresh context upon shutdown.Paul Bartell2018-09-131-0/+3
|
* modem-helpers: Make 3gpp signal quality functions publicPaul Bartell2018-09-132-26/+50
|
* dell: implement Unmanaged GPS support for the DW5821ealeksander/dw5821e-gps-unmanagedAleksander Morgado2018-09-124-4/+388
| | | | | | | | | | | | | | | The DW5821E module is managed in MBIM mode by default, and exposes a NMEA capable tty in USB interface #4. Enabling/disabling the NMEA output via the TTY is done with AT commands, so this implementation requires also a valid AT port in the system. Given that the AT commands used to enable/disable this feature are based on modifying non-volatile memory through AT^NV, this implementation is very specific to the DW5821E. If we're able to do the same on other Dell modules in the future, we'll just rename the new object to a more generic one.
* dell: port type hints for the Dell DW5821eAleksander Morgado2018-09-121-0/+10
| | | | | Include port type hints to make probing quicker, and ignore the secondary AT port as it may not be fully functional.
* shared-qmi: reuse band management logic in MBIM whenever possibleAleksander Morgado2018-09-124-341/+292
|
* broadband-modem-mbim: use QMI-based mode/capability switching if supportedAleksander Morgado2018-09-123-49/+387
| | | | | | | | | | The implementation available in the shared QMI logic can be used as-is, with one important note: if the QMI-based mode/capability switching is used, we MUST also use QMI-based "3GPP network registration" logic. This is needed because the MBIM command used to select which 3GPP network to connect to allows specifying the mask of access technologies desired, and that would overwrite whatever we had previously set with QMI-based mode/capability switching commands.
* shared-qmi: implement 3GPP network registration logicAleksander Morgado2018-09-123-108/+117
| | | | | | | Ported from the broadband modem QMI implementation, keeping the logic in place. We will need this to integrate mode/capability switching in MBIM devices, for nothing else really (as MBIM already supports this operation).
* shared-qmi: implement reworked mode and capabilities managementAleksander Morgado2018-09-126-1240/+1467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces several improvements and changes in the way modes and capabilities are managed in QMI capable devices. It is organized into a single commit, as all changes in all 6 operations (load current capabilities, load supported capabilities, set current capabilities, load supported modes, load current modes, set current modes) are related one to the other (given that the same QMI commands are used for both capabilities and mode management). The primary change is related to which capabilities are reported as supported for a given device. In the previous implementation we allowed switching between every combination possible for GSM/UMTS+LTE, CDMA/EVDO+LTE or GSM/UMTS+CDMA/EVDO+LTE devices. E.g. we would allow "LTE only" and "GSM/UMTS only" capabilities for GSM/UMTS+LTE devices, even if they would both be managed in exactly the same way. That setup wasn't ideal, because it meant that switching to a "LTE only" configuration would require a power cycle, as capability switching requires a power cycle, even if no change was expected in the exposed DBus interfaces (which is why we require the power cycle). So, instead of allowing every possible capability combination, we use capability switching logic exclusively for configuring GSM/UMTS+CDMA/EVDO devices (regardless of whether it has LTE or not) to add or remove the GSM/UMTS and CDMA/EVDO capabilities. E.g. for a GSM/UMTS+CDMA/EVDO+LTE device we would allow 3 combinatios: "GSM/UMTS+LTE", "CDMA/EVDO+LTE" and "GSM/UMTS+CDMA/EVDO+LTE". The "GSM/UMTS+CDMA/EVDO+LTE" is a special case because for this one we allow switching to "LTE only" capabilities while we forbid switching to "4G only" mode. As the same commands are used for mode and capability switching, if we didn't have "LTE only" and we allowed "4G only" mode instead and rebooted the device, we would end up not being able to know which other capabilities (GSM/UMTS or CDMA/EVDO or both) were also enabled. Now that we have capability switching confined to a very subset of combinations, we can use the mode switching logic to e.g. allow "4G only" configurations in all non multimode devices, as well as masks of allowed modes with one being preferred, which we didn't allow before. In the previous implementation all mode switching logic was disabled for LTE capable QMI devices. In the new implementation, we use the "Acquisition Order Preference" TLV in NAS Set System Selection Preference to define the full list of mode preferences for all supported modes. We also no longer just assume that NAS Technology Preference is always available and NAS System Selection Preference only after NAS >= 1.1. This logic is flawed, instead we're going to probe for those features once when loading current capabilities, and we then just implement the capabilities/mode switching logic based on that.
* shared-qmi: reuse device factory reset logic in MBIM whenever possibleAleksander Morgado2018-09-124-82/+90
|
* shared-qmi: reuse device reset logic in MBIM whenever possibleAleksander Morgado2018-09-124-167/+142
|
* helpers,tests: update ICCID related unit testsAleksander Morgado2018-09-121-1/+31
| | | | | | | | Fix the test for invalid characters, because now I allow hex chars in the account number. And add new tests with real China Mobile ICCIDs that contain hex chars in the account number.
* helpers: allow [A-F] range in operator-specific ICCID account numberAleksander Morgado2018-09-121-19/+22
| | | | | | | | | | | | | | | There are operators (e.g. the Chinese CMCC operator) that abuse the fact that 4 bits are used to store the BCD encoded numbers, and also use the [A-F] range as valid characters for the ICCID in the operator specific account number part. Haven't seen any documentation where this format with [A-F] characters is explicitly allowed, but I have seen multiple real cases where it happens. E.g.: 898602F9091830030220 898602C0123456789012 This patch also removes the 'last F' validation, used when reading 19-digit ICCIDs with +CRSM, as it no longer applies.
* ublox: implement custom ICCID loadingAleksander Morgado2018-09-124-0/+240
| | | | | Use AT+CCID to query the SIM ICCID, and fallback to parent's +CRSM based method otherwise.
* helpers: allow 19-digit reported ICCIDsAleksander Morgado2018-09-122-8/+32
| | | | | | | | | | | | | | | | | | | | | The mm_3gpp_parse_iccid() method does validation of the ICCID string and was originally implemented to handle +CRSM reported values. The implementation was looking for 20-digit strings, even for 19-digit ICCIDs (those finished with a trailing 'F'). We now extend the logic to also validate ICCID strings reported as 19-digit values directly, and when that happens we won't allow swapping of the digits (a +CRSM specific requirement) or trailing 'F' characters (as that is only required when reporting 19-digit ICCIDs with 20-digit strings). This change allows us to e.g. use the u-blox specific AT+CCID command and validate the returned ICCID with the same helper method, which currently fails: (ttyACM2): --> 'AT+CCID<CR>' (ttyACM2): <-- '<CR><LF>+CCID: 8934077700015848638<CR><LF><CR><LF>OK<CR><LF>' couldn't load SIM identifier: 'Invalid ICCID response size (was 19, expected 20)'
* modem-helpers: reuse nicknames for the flow control tagsAleksander Morgado2018-09-124-43/+70
| | | | And check that the string given in the tag is actually a valid one.
* port-serial: improve logging in mm_port_serial_set_flow_control()Aleksander Morgado2018-09-121-6/+26
|
* broadband-bearer: no need for explicit flow control cleanup on disconnectAleksander Morgado2018-09-121-20/+0
| | | | | | | We're already configuring the flow control we expect when running mm_port_serial_reopen(), which will keep the udev-selected flow control or will otherwise reset to no flow control when the TTY is in command mode.
* cinterion: report selected RTS/CTS flow control to modemAleksander Morgado2018-09-121-0/+1
|
* iridium: report selected RTS/CTS flow control to modemAleksander Morgado2018-09-121-0/+1
|
* broadband-modem: allow subclasses to modify the flow control settingsAleksander Morgado2018-09-121-1/+4
| | | | | | | | If a subclass implements a custom setup_flow_control() logic, e.g. to select a very specific setting explicitly, let it also configure the flow control settings modem-wide via the modem object property, so that bearer objects can later on use the same settings when preparing for a new connection.
* broadband-modem: rework flow control selection logicAleksander Morgado2018-09-121-55/+56
| | | | | | | | | | | | | | | Try to simplify a bit the logic that selects the flow control to be used during connectivity: * We detect early if the requested flow control (via udev tags) is actually supported by the modem (as eported by AT+IFC=?), and if it isn't, we error out directly. * We try to set in a single place the AT commands to be used to setup the flow control, once we have decided which one we're going to use. * Use the string builder helpers to log the flow control values.
* port-serial,broadband-modem: minor coding style fixesAleksander Morgado2018-09-122-4/+6
|
* port-serial: improve logging of device-level flow control settingsAleksander Morgado2018-09-121-3/+11
|
* port-serial: Flow Control property is flags, not enumAleksander Morgado2018-09-121-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMFlowControl is a flags enumeration, so change the property type to match that, or we'll end up with nasty criticals during runtime. (ModemManager:30758): GLib-GObject-CRITICAL **: 10:54:26.435: g_param_spec_enum: assertion 'G_TYPE_IS_ENUM (enum_type)' failed Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff71f2a96 in ?? () from /usr/lib/libglib-2.0.so.0 (gdb) bt #0 0x00007ffff71f2a96 in () at /usr/lib/libglib-2.0.so.0 #1 0x00007ffff71f3def in g_logv () at /usr/lib/libglib-2.0.so.0 #2 0x00007ffff71f3fe0 in g_log () at /usr/lib/libglib-2.0.so.0 #3 0x00007ffff72d90ac in g_param_spec_enum () at /usr/lib/libgobject-2.0.so.0 #4 0x000055555564caf2 in mm_port_serial_class_init (klass=0x5555557607c0) at mm-port-serial.c:2101 #5 0x000055555564759a in mm_port_serial_class_intern_init (klass=0x5555557607c0) at mm-port-serial.c:49 #6 0x00007ffff72ea9b4 in g_type_class_ref () at /usr/lib/libgobject-2.0.so.0 #7 0x00007ffff72eab5a in g_type_class_ref () at /usr/lib/libgobject-2.0.so.0 #8 0x00007ffff72d0f53 in g_object_new_valist () at /usr/lib/libgobject-2.0.so.0 #9 0x00007ffff72d103a in g_object_new () at /usr/lib/libgobject-2.0.so.0 #10 0x000055555564e187 in mm_port_serial_at_new (name=0x55555576e280 "ttyUSB4", subsys=MM_PORT_SUBSYS_TTY) at mm-port-serial-at.c:533 #11 0x0000555555602512 in serial_open_at (self=0x555555715390) at mm-port-probe.c:1285 #12 0x00007ffff71ecb49 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #13 0x00007ffff71ecf59 in () at /usr/lib/libglib-2.0.so.0 #14 0x00007ffff71ed272 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #15 0x00005555555957e0 in main (argc=3, argv=0x7fffffffe458) at main.c:181 Also, rename the property to match the naming convention of other properties in the same object.
* broadband-modem: set flow control from portAlfonso Sánchez-Beato2018-09-121-16/+65
| | | | | Set the flow control used in the data connection from the one set in the port.
* base-modem,port-probe: set serial port flow control from udev tagAlfonso Sánchez-Beato2018-09-122-1/+25
| | | | | Set the serial port flow control from the udev tag ID_MM_TTY_FLOW_CONTROL before accessing the port.
* port-serial: add flow control propertyAlfonso Sánchez-Beato2018-09-122-29/+77
| | | | | Add flow control property to the MMPortSerial class, and use it when setting the port flow control.
* modem-helpers: add flow control udev tag parserAlfonso Sánchez-Beato2018-09-122-0/+21
| | | | | Add function for parsing the content of the udev tag ID_MM_TTY_FLOW_CONTROL.
* mmcli,location: print LAC/TAC/CID in hexAleksander Morgado2018-09-121-3/+3
| | | | All these values are usually specified in hex, not in dec.
* iface-modem-location: validate SUPL server addressAleksander Morgado2018-09-126-38/+80
| | | | | | | | Devices will expect SUPL server given as either IP:PORT or FQDN:PORT, so just avoid saying we require a 'URL' because it's not true. We will use a new helper method to parse and validate user-provided SUPL server address.
* broadband-bearer: don't do connection checks on CDMAAleksander Morgado2018-09-081-0/+8
| | | | | | | | | On CDMA-only connections we won't have a CID defined, so instead of getting in a loop of warnings reporting "cid not defined", early error out with an UNSUPPORTED error so that the connection check isn't tried any more. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/83
* broadband-modem: port modem_cdma_register_in_network to use GTaskBen Chan2018-09-071-24/+24
|
* broadband-modem: port modem_cdma_setup_registration_checks to use GTaskBen Chan2018-09-071-33/+46
|
* broadband-modem: port modem_cdma_setup_cleanup_unsolicited_events to use GTaskBen Chan2018-09-071-33/+34
|
* broadband-modem: port modem_load_access_technologies to use GTaskBen Chan2018-09-071-67/+73
|
* broadband-modem-qmi: avoid completing the GTask twice when loading capabilitiesAleksander Morgado2018-09-061-3/+3
|
* broadband-modem-qmi: add missing task unref when loading signal valuesAleksander Morgado2018-09-061-0/+1
|
* broadband-modem-qmi: make sure result values are not in context when completingAleksander Morgado2018-09-061-3/+7
| | | | | | In order to avoid having the result values in 2 places (context and result) when the GTask is completed, we will steal the pointer from the context before it's set as result of the GTask.
* broadband-modem-qmi: Pass signal values_result directly rather than ↵Paul Bartell2018-09-041-1/+2
| | | | | | | | duplicating with g_memdup corrects segfault introduced in 7d8f0600e6de32721112949b65d48108ea640b51 Signed-off-by: Paul Bartell <p.bartell@temperednetworks.com>
* test,modem-helpers: remove unnecessary NULL check for g_free()Ben Chan2018-08-291-2/+1
| | | | | g_free() handles a NULL pointer properly, so there is no need to have a NULL check before calling g_free().
* libmm-glib,pco: add some more missing documentation for MMPcoAleksander Morgado2018-08-281-4/+14
|