aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.h
AgeCommit message (Collapse)Author
2023-09-27base-modem: minor alignment fixAleksander Morgado
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-04-11base-modem: remove mm_base_modem_get_cancellable()Lubomir Rintel
No users left for the getter that takes a reference after a port of MMBaseModemAT to GTask. peek_cancellable() is used instead, because the GTask constructor takes a reference itself.
2022-06-09suspend: add suspend/resume support with powerd on ChromeOSRukun Mao
ModemManager handles suspend and resume signals sent from powerd Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
2022-05-24base-modem: add subsystem vendor ID propertyDaniele Palmas
Subsystem vendor ID can be used for identifying PCI modems, so expose the property.
2022-05-20iface-modem: common SIM event reporting logicAleksander Morgado
We no longer have separate mm_base_modem_process_sim_event() and mm_broadband_modem_sim_hot_swap_detected() methods. The only difference between both of them was that one of them would attempt to cleanup the ports context associated to the SIM hot swap event logic as soon as a swap was detected, in order to avoid queueing up multiple such events. The previous logic wasn't working well, though, as there could be mixed AT+QMI or AT+MBIM devices that would also require that same cleanup and so we didn't always know which one should have been called. Now we have a single mm_iface_modem_process_sim_event() method, which will trigger the reprobe and disabling, but which will also perform the cleanup of the SIM ports swap setup as specified by the implementation. So, if a plugin explicitly initializes the serial ports context for SIM hot swap handling, it should also explicitly clean it up. Also, the initialization of the serial ports context for SIM hot swap handling is no longer done automatically for all modems, it will be done only for those modems using it; i.e. the modems that explicitly report support SIM hot swap handling using AT URCs.
2021-05-26base-modem: make sync() available only if suspend-resume enabledAleksander Morgado
2021-05-26base-manager: add quick suspend/resume baseDylan Van Assche
Quick suspend/resume infrastructure for synchronizing the interfaces when resuming.
2021-03-10base-modem: new method to wait for an explicit link portAleksander Morgado
When new link ports are created, the QmiDevice link management methods try to make sure that the port exists in the system by the time the link addition method returns, but that doesn't guarantee that the port has also been notified by the kernel to ModemManager (e.g. via udev or via kernel events). This new method allows to do a explicit wait for a given port link; if we already have it it will return right away, and otherwise we'll wait for it to be notified via the "link port grabbed" signal.
2021-03-10base-modem: allow grabbing link ports after modem is createdAleksander Morgado
We will grab the ports and make them available through find_ports() or peek_port() or get_port(). The link ports are not 'organized' so they won't be available in e.g. get_data_ports(), which is fine, because we don't want to mix them with the real data ports exposed by the device. Link port additions and removals are also notified via signals in the modem object, so that explicit wait for specific ports can be done.
2021-03-10port-net: new 'MMPortNet' object with netlink capabilitiesAleksander Morgado
Right now just with the support to setup link properties like up/down state or the link mtu. This features are required when using QMAP based multiplexing with the qmi_wwan kernel driver.
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-25base-modem: separate method to lookup exact port by nameAleksander Morgado
There's no point in returning a list of all ports with a given name, just provide a lookup method that returns the single port with the given name.
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-09broadband-modem-qmi: peeking QMI port only in QMI modemsAleksander Morgado
Move the logic out of the base modem, and make it applicable only for QMI modems.
2020-11-09broadband-modem-mbim: peeking MBIM port only in MBIM modemsAleksander Morgado
Move the logic out of the base modem, and make it applicable only for MBIM modems.
2020-09-19core: add autoptr cleanup methods to all internal typesAleksander Morgado
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-04-08base-modem: set dbus id as soon as object is createdAleksander Morgado
2020-01-23auth-provider: refactor and simplifyAleksander Morgado
The auth provider setup is a bit over-engineered. Simplify it by making a single MMAuthProvider object that may or may not use polkit, depending on configure options. This object is also setup as a singleton object using the helper MM_DEFINE_SINGLETON_GETTER().
2019-10-15core: allow flagging ports as 'audio'Aleksander Morgado
Instead of flagging them as 'ignored' so that they aren't probed, we can also flag them as 'audio' now, so that the logic knows which port to report as used for audio in the Call object.
2017-01-04base-modem,cinterion: no need for a peek_current_data_port() methodAleksander Morgado
We already get the data port given as input parameter in disconnect_3gpp(), so there is no point in trying to find out which the data port is.
2017-01-04cinterion: implement support for the new SWWAN interfaceMatthew Stanger
2016-09-29core: use the kernel device object in the port object and the plugin interfaceAleksander Morgado
The mm_base_modem_grab_port() now receives a MMKernelDevice directly from the plugin, which is then stored in the MMPort corresponding to the port. This means that we have direct access to e.g. all properties set by udev rules everywhere, and we don't need additional GUdevClient objects (e.g. like the one used in the Huawei plugin to detect NDISDUP support during runtime). For virtual ports (e.g. generated during unit tests), we have a new 'generic' kernel device object which just provides the values from the kernel device properties given during its creation.
2016-09-22base-modem: add missing 'reprobe' property setupAleksander Morgado
The sim hotswap logic likely just uses the getter/setter methods, but we should anyway fix the property definition bits.
2016-08-10modem: support SIM hot swapCarlo Lobrano
BaseModem added reprobe property. MMDevice added logic to recreate the modem if it is set invalid and "to reprobe" MMBroadbandModem * added initialization step for SIM hot swap: 1. keep dedicated ports open to listen to modem's unsolicited 2. dedicated error management in case of initialization failure due to SIM missing * added function to be called in order to act upon SIM insertion/removal: 1. close dedicated ports 2. set the modem to be reprobed 3. disable modem * added SIM HOT SWAP boolean property MMIfaceModem * added initialization step for SIM hot swap, if supported by the plugin * dedicated error management in case of initialization failure due to SIM missing
2016-03-27base-modem: remove unused 'mm_base_modem_get_port()' methodAleksander Morgado
2016-03-27base-modem: remove unused 'mm_base_modem_owns_port()' methodAleksander Morgado
2016-03-27base-modem: remove unused 'mm_base_modem_release_port()' methodAleksander Morgado
2014-06-23port: store parent sysfs path in each MMPortAleksander Morgado
2014-02-13base-modem: allow looking for a subset of the available portsAleksander Morgado
2014-02-13ports: rename 'MMMbimPort' to 'MMPortMbim'Aleksander Morgado
2014-02-13ports: rename 'MMQmiPort' to 'MMPortQmi'Aleksander Morgado
2014-02-13ports: rename 'MMAtSerialPort' to 'MMPortSerialAt'Aleksander Morgado
2014-02-13ports: rename 'MMQcdmSerialPort' to 'MMPortSerialQcdm'Aleksander Morgado
2014-02-13ports: rename 'MMGpsSerialPort' to 'MMPortSerialGps'Aleksander Morgado
2013-06-24api,introspection: new 'Ports' property in the Modem interfaceAleksander Morgado
We will expose a new 'Ports' property listing all ports currently known by a given modem. Ports which are not used but are detected as being part of the modem will be listed with an 'unknown' port type. This change uses the new 'MMModemPortType' enum and the new 'MMModemPortInfo' helper struct to handle these values in libmm-glib. The already available 'MMPortType' enum hasn't been re-used for the interface because it contains values that we don't need (e.g. IGNORED). The port list is now also included in the modem information command of mmcli: $ sudo mmcli -m 0 /org/freedesktop/ModemManager1/Modem/0 (device id '97b7b99e3e2bea103880545b619fb05a3cc81b26') ------------------------- System | device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4' | drivers: 'qcserial, qmi_wwan' | plugin: 'Gobi' | primary port: 'cdc-wdm0' | ports: 'ttyUSB0 (qcdm), ttyUSB1 (at), cdc-wdm0 (qmi), wwp0s29u1u4 (net)' https://bugzilla.gnome.org/show_bug.cgi?id=702678
2013-04-17base-modem: allow grabbing MBIM portsAleksander Morgado
2013-02-18bearer,3gpp: dial operation specifies which data port to useAleksander Morgado
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.
2013-01-18core: add 'hotplugged' flag to indicate if modem is newly plugged inBen Chan
This patch adds a 'hotplugged' flag to MMBaseModem to indicate if a modem is newly plugged in. A plugin can use this information to determine if, for example, the modem needs to be soft reset using the ATZ command. Dan Williams <dcbw@redhat.com> contributed the idea of implementation.
2012-09-05build: new `--without-qmi' configure optionAleksander Morgado
For those who don't care about the QMI support through libqmi-glib, or if you're stuck with glib 2.30 (libqmi-glib requires 2.32), this configure switch allows disabling the QMI support completely. The logic to detect cdc-wdm ports is still in place, but the QMI probing is never launched at them. Also, all QMI-related objects won't be compiled.
2012-08-30base-modem: allow looking for the QMI port associated to a given data portAleksander Morgado
QMI and wwan ports come in pairs. Each wwan port has an associated control QMI port, which is the only port allowed to send the Start|Stop Network QMI requests to start|stop the connection in the given wwan interface. Paired QMI and wwan interfaces (should) share the same parent udev device, quoting Bjørn: "If we ignore the unfortunate 3.4 and 3.5 kernels, then a matching wwanX and cdc-wdmY set will always share the same parent USB interface on QMI devices. Having the same parent USB device is *not* sufficient. You cannot control wwan0 using cdc-wdm1 in the above example."
2012-08-29base-modem: allow getting/peeking all data portsAleksander Morgado
2012-08-29base-modem: use the new `MMQmiPort' objectAleksander Morgado
2012-08-29base-modem: allow getting/peeking the QMI portAleksander Morgado
2012-08-24api,introspection: report list of drivers, not just oneAleksander Morgado
Different ports of the same modem may get handled by different drivers. We therefore need to provide a list of drivers (new `Modem.Drivers' property with signature 'as') instead of just one (removed `Modem.Driver' property with signature 's'). $ sudo mmcli -m 0 | grep drivers | drivers: 'qcserial, qmi_wwan'
2012-03-29base-modem: use new `MMGpsSerialPort' type for the raw GPS portAleksander Morgado
2012-03-28base-modem: handle GPS control and data portsAleksander Morgado
Plugin may specify GPS-specific port tyeps when requesting to grab the port. These could either be an AT-based GPS control port, or the raw GPS serial port which emits the NMEA traces.
2012-03-28base-modem: no need for `port_grabbed()'Aleksander Morgado
Subclasses can configure additional stuff in the ports just after all have been organized, in the SETUP_PORTS initialization step in MMBroadbandModem.
2012-03-16base-modem: new method to check if the modem got any AT portAleksander Morgado
Required for the single-at logic in the plugins.