aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem.c
AgeCommit message (Collapse)Author
2021-05-26broadband-modem: ignore cancellation during sync()Aleksander Morgado
There is no input cancellable in the method, so the GTask will never get cancelled from the outside.
2021-05-26base-manager: add quick suspend/resume baseDylan Van Assche
Quick suspend/resume infrastructure for synchronizing the interfaces when resuming.
2021-05-24broadband-modem: check if skeleton exists when creating device idAleksander Morgado
The logic that creates the device identifier uses some fields that are exposed in DBus (e.g. model, manufacturer...). We should not attempt to load any of that info if the DBus skeleton for the Modem interface is no longer available, as e.g. the device may have gone away already. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/374
2021-05-24broadband-modem: trivial coding style fixAleksander Morgado
2021-05-22broadband-modem: allow 3GPP initialization before fallbackMichal Mazur
To enable call to disable-facility-lock in LOCKED state, 3gpp interface needs to be initialized before going to fallback step.
2021-04-30core: strict return type in g_object_ref()Aleksander Morgado
This is now a requirement when using glib 2.56.
2021-04-29broadband-bearer: rely on profile management for the cid selectionAleksander Morgado
There is no longer need to perform all the CID selection logic in the broadband bearer connection procedure, we can rely on the new profile management operations to do the same thing. We can do this because we're sure that all the MMBroadbandModem objects implement the MMModem3gppProfileManager interface. Additionally, given that we now provide the profile ID value as part of the MMBearerConnectResult, we no longer need a custom mm_broadband_bearer_get_3gpp_cid() as we can use the generic mm_base_bearer_get_profile_id() for the same purpose.
2021-04-29broadband-modem: implement profile management supportAleksander Morgado
Using AT+CGDCONT for profile settings management (querying, updating, reseting), AT+CGDEL for profile deletion, and AT+CGACT for activation status management (check, deactivate).
2021-04-29iface-modem-3gpp-profile-manager: new interface for profile managementAleksander Morgado
This interface will provide support for the profile management operations in different modem types. This initial commit introduces support for the interface and provides handlers for the methods that may be called in the interface.
2021-03-24broadband-modem: don't warn enabling/disabling USSD failuresAleksander Morgado
USSD is a feature interface, not critical for connection management, so skip warning on interface enabling/disabling failures.
2021-03-10api,modem: new 'MaxActiveMultiplexedBearers' propertyAleksander Morgado
In addition to the amount of bearers a user may connect without multiplexing enabled (the default until now), we now also expose the maximum number of bearers a user may connect after enabling multiplexing over one single network interface (if supported). The method responsible for creating the MMBearerList is now also subclassable, so that implementations supporting multiplexing can provide their own version with their own thresholds.
2021-03-04base-modem: explicitly say if NET or TTY data ports are supportedAleksander Morgado
A modem that creates exclusively bearer objects that work with NET ports (e.g. all QMI or MBIM modems) must not add any TTY port in the list of data ports. A modem that creates exclusively bearer objects that work with TTY ports (e.g. the generic modem) must not add any NET port in the list of data ports. A modem that may use both TTY and NET ports should add all in the list of data ports. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/324 Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/329
2021-02-23helpers: rework normalize_operator() to use str_to_utf8()Aleksander Morgado
Instead of blindly assuming that we can take whatever string given as valid UTF-8, we'll always attempt to convert from the current modem charset into UTF-8. Before we were doing this for hex-encoded UCS2, but not for example for GSM-7. And due to the now applied GSM-7 conversion, the mf627a/mf627b +COPS parsing unit tests are updated accordingly, because when converting from an input string that contains byte 0x40 ('@' in UTF-8) as if it were GSM-7, the 0x40 is taken as character '¡', encoded as 0xc2,0xa1 in UTF-8).
2021-02-23charsets: use new str_from_utf8() instead of ↵Aleksander Morgado
take_and_convert_to_current_charset()
2021-02-23charsets: use new bytearray_to_utf8() instead of hex_to_utf8()Aleksander Morgado
2021-02-23charsets: use new bytearray_from_utf8() instead of byte_array_append()Aleksander Morgado
2021-02-23charsets: don't allow quoting in byte_array_append()Aleksander Morgado
There's no point in adding a quoting option to this method; if the caller needs the appended string quoted, it should quote it before passing it to this method. It was nowhere used anyway.
2020-11-26base-sim: Reprobe modem if lock status cannot be read after sending pukPavan Holla
If the lock status cannot be read during a puk unblock attempt, reprobe the modem. It is likely that the SIM was permanently blocked if the lock status cannot be read.
2020-11-16iface-modem-firmware: allow plugins to ignore carrier infoAleksander Morgado
Skip building the firmware version information with carrier config information if the plugin already knows that the firmware upgrade method doesn't implement carrier-specific upgrade paths.
2020-10-30mm-broadband-modem: Allow hot SIM insertionAndrew Lassalle
If the QMI modem is initialized without a SIM card in it, and it goes to failed state, allow the modem to be reprobed when a SIM card is inserted.
2020-10-07broadband-modem: Disconnect bearers during disablePavan Holla
Fixes a bug introduced in commit 7e386389, which caused user requested disable operations to go to step DISABLING_STEP_FIRST_AFTER_ENABLE_FAILED. For user requested disable, the first step should be DISABLING_STEP_FIRST.
2020-09-07iface-modem: add an optional iccid parameter to check_for_sim_swapTeijo Kinnunen
If the new iccid is already available, reading the iccid from the card can be skipped.
2020-08-28base-modem: SIM switch handling at base modem levelAleksander Morgado
When the SIM switch doesn't happen as part of an async hot swap detection, we should trigger the switch handling at base modem level, which e.g. doesn't require explicit cleanup of the SIM hot swap detection port context.
2020-08-28api,modem: new 'SimSlots' and 'PrimarySimSlot' propertiesAleksander Morgado
The 'SimSlots' property exposes an array of SIM object paths, with one array item for each available SIM slot in the system. If a valid SIM card is found in a given slot, the path of the SIM object will be exposed in the array item; if no valid SIM card is found, the empty object path ("/") will be exposed instead. The 'PrimarySimSlot' property exposes which of the SIM slots available in the system is the one configured as being primary. In a Multi-SIM Single-Standby setup, the primary slot will be the one corresponding to the single active SIM in the system. In a Multi-SIM Multi-Standby setup, the primary slot will be the one configured to act as primary (e.g. the one that will be used for the data connection) among all the active SIM cards found.
2020-08-01broadband-modem: minor method renameAleksander Morgado
2020-07-04broadband-modem: remove misleading commentAleksander Morgado
5GNR is not 3GPP2
2020-07-04iface-modem-signal: added 5G signal informationWalter Hagstrom
Extended the ModemManager Signal interface to include 5G signal information for RSRP, RSRQ and SINR via libqmi. Also extended mmci to print 5G signal info.
2020-06-28base-modem,at: response processors return a more specific enumAleksander Morgado
Instead of using the FALSE return of the method to indicate either a fatal error (if result_error was set) or the continuation request (if result_error wasn't set), provide a enum that has explicit states for all three possible values (failure, success or continue).
2020-06-28broadband-modem: run implicit disabling if enabling failsAleksander Morgado
The disabling sequence is updated so that the steps to disable the interfaces never fail. This is done so that the modem is not left in an "inconsistent" enabled state, if e.g. the modem is enabled and one of the disabling steps for the interfaces ends up failing. In this case, it is preferred to say that the modem is disabled, than having it wrongly enabled. The enabling sequence is updated so that if any of the steps to enable the interfaces fail, we end up running an implicit disabling operation to disable all the interfaces. This is to attempt to cleanup whatever we had enabled during the enabling operation, including e.g. the open ports context.
2020-04-09broadband-modem: run +C5GREG state checksAleksander Morgado
The generic CREG parser is improved to also allow parsing +C5GREG responses and URCs.
2020-04-09iface-modem-3gpp: new 5GS network supportAleksander Morgado
2020-04-09broadband-modem: support 5G in +WS46 to capabilities conversionAleksander Morgado
2020-04-08charsets: report GError in byte_array_append() failuresAleksander Morgado
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2020-04-08modem-helpers: make cpms test parser return error on failureAleksander Morgado
2020-04-08modem-helpers: port ccwa service query parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cesq response parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port creg response parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port clcc list parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cmer test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: parse cgdcont test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cops test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port ifc test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port device identifier to use object logging and autoptrAleksander Morgado
2020-04-08sms-part-3gpp: port to use object loggingAleksander Morgado
2020-04-08broadband-modem: port to use object loggingAleksander Morgado
2020-02-06broadband-modem: add optional extra carriage return to in-call URC regexBob Ham
The BroadMobi BM818 has inconsitent line endings and the in-call URC regex can miss events, particularly NO CARRIER, because the regex doesn't match. To fix this we add an optional carriage return to the regex. This will match for the BM818's output.
2020-02-06broadband-modem: add secondary AT port to in-call port contextBob Ham
The BroadMobi BM818 sends URCs on the secondary port which are currently missed. To fix this, we include the secondary port in the port context.
2020-01-31base-modem: define new helper MMBaseModemAtCommandAllocAleksander Morgado
It has the same exact format as MMBaseModemAtCommand, but its contents are assumed heap allocated. The only real purpose of this type is to allow defining static constant MMBaseModemAtCommand variables without warnings when using -Wdiscarded-qualifiers.
2020-01-30broadband-modem: fix warnings with -Wimplicit-fallthroughAleksander Morgado
mm-broadband-modem.c: In function ‘disabling_step’: mm-broadband-modem.c:10498:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 10498 | ctx->step++; | ~~~~~~~~~^~ mm-broadband-modem.c:10500:5: note: here 10500 | case DISABLING_STEP_WAIT_FOR_FINAL_STATE: | ^~~~ ...