aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-16base-call: automatically terminate unanswered incoming callsAleksander Morgado
Try to automatically detect when the caller finishes the attempt to establish the call.
2018-10-16base-call: ACTIVE after start() if detailed transitions unavailableAleksander Morgado
The most detailed call state transition flow for a new outgoing call would be: UNKNOWN -> DIALING -> RINGING -> ACTIVE But, if the modem doesn't support reporting intermediate states (e.g. DIALING or RINGING) then a successful start() should imply getting into ACTIVE state right away. For now, only the Huawei plugin implements the detailed transition support, so make them configurable via call object properties.
2018-10-16base-call: setup/cleanup custom events when transitioning to/from in-callAleksander Morgado
2018-10-16base-call: don't update state twiceAleksander Morgado
The mm_gdbus_call_set_() methods update the properties in the same way as via g_object_set(), no need to do it twice.
2018-10-16base-call: call state updates only in the interface logicAleksander Morgado
Don't do any call state update on the generic implementation of the commands, do it in the common interface logic exclusively. We were doing the state updates in both places.
2018-10-16base-call: don't notify a state change if it didn't changeAleksander Morgado
2018-10-16base-call: no need to delete call info from the deviceAleksander Morgado
Call information only lives in the ModemManager logic, there is no associated date stored within the device itself. Therefore, simplify everything by assuming there is nothing to remove. Looks like this logic was implemented because it was originally based on the SMS management logic, but for SMS we do have to remove them (the stored PDU parts) from the device.
2018-10-16base-call: fix logic when rejecting callsAleksander Morgado
Make sure the async task is always finished, even when mm_base_modem_at_command_finish() returns an error which is not MM_SERIAL_ERROR_RESPONSE_TIMEOUT.
2018-10-16base-call: fix logic when accepting callsAleksander Morgado
Don't return FALSE when call is successfully accepted, otherwise the caller will get very confused: ModemManager[19952]: <debug> [1528968478.344338] (ttyACM2): --> 'ATA<CR>' ModemManager[19952]: <debug> [1528968478.361986] (ttyACM2): <-- '<CR><LF>OK<CR><LF>' (ModemManager:19952): GLib-GIO-CRITICAL **: 11:27:58.387: g_dbus_method_invocation_take_error: assertion 'error != NULL' failed And also, make sure the async task is always finished, even when mm_base_modem_at_command_finish() returns an error which is not MM_SERIAL_ERROR_RESPONSE_TIMEOUT.
2018-10-09sierra-legacy: implement connection status monitoring with !SCACT?Aleksander Morgado
Devices like the Netgear AC313U require explicit context monitoring, otherwise the device may end up disconnected internally and MM would still think that the connection is ongoing.
2018-10-09shared-qmi: implement support for the 'extended' LTE band listAleksander Morgado
This will allow us to configure via mmcli devices that support LTE bands that would not fit in the standard TLVs (e.g. band 66 below) or bands which aren't really reported in the standard TLVs (e.g. bands 46 and 48 below). $ sudo qmicli -d /dev/cdc-wdm0 -p --dms-get-band-capabilities [/dev/cdc-wdm0] Device band capabilities retrieved: Bands: 'wcdma-2100, wcdma-pcs-1900, wcdma-1700-us, wcdma-850-us, wcdma-800, wcdma-900, wcdma-1700-japan, wcdma-850-japan' LTE bands: '1, 2, 3, 4, 5, 7, 8, 12, 13, 14, 17, 18, 19, 20, 25, 38, 39, 40, 41, 42, 43' LTE bands (extended): '1, 2, 3, 4, 5, 7, 8, 12, 13, 14, 17, 18, 19, 20, 25, 26, 28, 29, 30, 32, 38, 39, 40, 41, 42, 43, 46, 48, 66'
2018-10-09broadband-modem-mbim: plug leaks when using the ATDS serviceAleksander Morgado
2018-10-06cli,modem: print PCO as 'n/a' if not availableAleksander Morgado
2018-10-06cli,bearer: normalize n/a reportingAleksander Morgado
Use always small letters.
2018-10-06base-modem: remove explicit GDestroyNotify cast on g_object_unrefBen Chan
g_object_unref is in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_object_unref is thus not needed.
2018-10-04libmm-glib: use helper function to convert enum/flags from stringThomas Haller
2018-10-04libmm-glib, modem-helpers: unref enum/flags GType classes in enum gettersThomas Haller
2018-10-04port-serial: port mm_port_serial_flash to use GTaskBen Chan
2018-10-04port-serial: port mm_port_serial_reopen to use GTaskBen Chan
2018-09-25udev: define all generic tags as symbolsAleksander Morgado
This prevents errors due to nasty typos in the strings. We define all symbols in a single header file that is NOT considered part of the API, as there is no need for MM clients to know about these tags code-wise. These tags are only meaningful when associated to devices in udev. Information of each tag is included in the general API documentation. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/88
2018-09-25iface-modem-messaging: if only one storage supported, select it right awayAleksander Morgado
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.
2018-09-25libmm-glib,location-3gpp: don't ignore location updates when MNC is 0Aleksander Morgado
E.g. China Mobile (MCC 460, MNC 0). $ mmcli -m toby --location-get /org/freedesktop/ModemManager1/Modem/0 ------------------------- 3GPP location | Mobile country code: '460' | Mobile network code: '0' | Location area code: '6188' | Cell ID: '40955' ------------------------- GPS NMEA traces | Not available ------------------------- Raw GPS | Not available ------------------------- CDMA BS | Not available
2018-09-21mmcli,location: fix doubled variable declarationUlrich Ölmann
Remove the redundant declaration of which slipped into the code in commit 091bf4dbd811 ("api: support location assistance data"). Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
2018-09-21cli,signal: add generic fields in its own groupAleksander Morgado
This is just to consolidate the output w.r.t. similar fields in e.g. the Messaging or Location interfaces.
2018-09-13xmm: increase AT command timeout when updating bands/modesAleksander Morgado
Looks like sometimes it may take a bit more than 3s.
2018-09-13po: minor updates in fr and it translation filesAleksander Morgado
2018-09-13[l10n] Add Italian translationMilo Casagrande
Signed-off-by: Milo Casagrande <milo@milo.name>
2018-09-13xmm: minor alignment fixesAleksander Morgado
2018-09-13xmm: ensure outputs in load_values_finish() are always set if successAleksander Morgado
2018-09-13xmm: implement signal interface with +XCESQ pollingPaul Bartell
2018-09-13xmm: add +XCESQ parserPaul Bartell
2018-09-13broadband-modem: Call signal shutdown function when modem is disabledPaul Bartell
2018-09-13iface-modem-signal: Tear down refresh context upon shutdown.Paul Bartell
2018-09-13modem-helpers: Make 3gpp signal quality functions publicPaul Bartell
2018-09-12dell: implement Unmanaged GPS support for the DW5821eAleksander Morgado
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.
2018-09-12dell: port type hints for the Dell DW5821eAleksander Morgado
Include port type hints to make probing quicker, and ignore the secondary AT port as it may not be fully functional.
2018-09-12shared-qmi: reuse band management logic in MBIM whenever possibleAleksander Morgado
2018-09-12broadband-modem-mbim: use QMI-based mode/capability switching if supportedAleksander Morgado
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.
2018-09-12shared-qmi: implement 3GPP network registration logicAleksander Morgado
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).
2018-09-12shared-qmi: implement reworked mode and capabilities managementAleksander Morgado
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.
2018-09-12shared-qmi: reuse device factory reset logic in MBIM whenever possibleAleksander Morgado
2018-09-12shared-qmi: reuse device reset logic in MBIM whenever possibleAleksander Morgado
2018-09-12helpers,tests: update ICCID related unit testsAleksander Morgado
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.
2018-09-12helpers: allow [A-F] range in operator-specific ICCID account numberAleksander Morgado
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.
2018-09-12ublox: implement custom ICCID loadingAleksander Morgado
Use AT+CCID to query the SIM ICCID, and fallback to parent's +CRSM based method otherwise.
2018-09-12helpers: allow 19-digit reported ICCIDsAleksander Morgado
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)'
2018-09-12modem-helpers: reuse nicknames for the flow control tagsAleksander Morgado
And check that the string given in the tag is actually a valid one.
2018-09-12port-serial: improve logging in mm_port_serial_set_flow_control()Aleksander Morgado
2018-09-12broadband-bearer: no need for explicit flow control cleanup on disconnectAleksander Morgado
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.
2018-09-12cinterion: report selected RTS/CTS flow control to modemAleksander Morgado