aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port.h
AgeCommit message (Collapse)Author
2022-12-18port: define new generic 'removed' signalAleksander Morgado
This signal indicates that the port is no longer accessible. Unlike a udev port removal event, this indication may happen even if the port is still exposed by the system. It is designed to detect protocol proxy crashes, and so when such event is detected by the modem, a full reprobe of the device will be done to start from scratch the protocol management operations.
2022-06-30port: make 'timed-out' a signal for all port types, not just serialAleksander Morgado
2021-04-21base: Add support for wwan subsystemLoic Poulain
Add support for the Linux wwan subsystem that started to expose control channel as character devices (e.g. /dev/wwan0p1MBIM...). Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2021-04-14port-qmi: add support for QRTRAndrew Lassalle
Extend mm-port-qmi to accept a QRTR node to work with modems using the QRTR protocol.
2020-11-20core: new 'rpmsg' subsystemAleksander Morgado
Most older Qualcomm SoCs (e.g. MSM8916, MSM8974, ...) communicate with the integrated modem via shared memory (SMD channels). This is similar to QRTR on newer SoCs, but without the "network" layer. In fact, the older SoCs also have QRTR, but the modem QMI services are not exposed there. The mainline Linux kernel exposes SMD channels via the "remote processor messaging bus" (rpmsg). Through special IOCTL calls it is possible to create a char device for a rpmsg/SMD channel. We can then use these to send QMI/AT messages to the modem, much like the ordinary serial char devices when using a Qualcomm modem through USB. This commit introduces support for the new 'rpmsg' subsystem, which allows exporting QMI-capable and AT-capable ports. By default NO rpmsg port is flagged as candidate, it is assumed that the plugin adding support for the rpmsg subsystem will add specific rules to do so (e.g. so that non-modem ports are explicitly not flagged as candidate). All rpmsg ports will be probed for AT or QMI capabilities, unless explicit port type hints (e.g. ID_MM_PORT_TYPE_QMI or ID_MM_PORT_TYPE_AT_PRIMARY) are set. These changes are highly based on the initial integration work done by Stephan Gerhold <stephan@gerhold.net> in postmarketOS, see: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/363
2020-11-09port: rename subsystem from 'usb' to 'usbmisc'Aleksander Morgado
Back in Linux < 3.6 days, the cdc-wdm ports exposed by the QMI driver were flagged as owned by the 'usb' subsystem. That changed in 3.6 when the subsystem was renamed to 'usbmisc': https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00125.html So, rename the port subsystem type enumn to 'usbmisc'.
2020-09-19core: add autoptr cleanup methods to all internal typesAleksander Morgado
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.
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.
2014-06-23port: store parent sysfs path in each MMPortAleksander Morgado
2014-02-13port-serial: allow ports based on Unix socketsAleksander Morgado
2014-02-13port: use a 'priv' pointer to handle the private infoAleksander Morgado
2013-11-15port: remove 'carrier-detect' propertyAleksander Morgado
It is no longer used since commit 736aa0d2d.
2013-04-17port-probe: include MBIM port probing logicAleksander Morgado
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-29core: allow grabbing QMI portsAleksander 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-28port: new `MM_PORT_TYPE_NET' for pure net devicesAleksander Morgado
Net devices will be MMPorts of type MM_PORT_TYPE_NET.
2012-03-28port: skip LAST enums in glib-mkenums processingAleksander Morgado
2012-03-15core: rework port grabbing and organizationAleksander Morgado
Make port roles more flexible. We have modems that do PPP on interfaces other than the primary interface, and that wasn't possible with the old code. So clean up all that logic and move the port organization code into the core so we can reduce code in the plugins. In the new world order, the plugins say whether the port is a QCDM port, an AT port, or ignored. If it's an AT port the plugins get to tag it as primary, secondary, or PPP, or any combination of the 3. This allows for modems where PPP should really be done on the secondary port (Huawei E220, Sierra devices) so that the primary port stays open for command and status. After all ports are grabbed by the generic classes, they get "organized", which assigns various ports to the roles of PRIMARY, SECONDARY, DATA, and QCDM based on specific rules and hints that the plugin provided (which are expressed as MMAtPortFlags). The plugin code is responsible for determining the port hints (ie MMAtPortFlags) at probe time, instead of having a combination of the plugin and the modem class do the job. This simplifies things greatly for the plugins at the expense of more complicated logic in the core. This is the port of commit 96505d42ed62327101dcee7c2bf31177b0bb1c9f to the 06-api branch.
2012-03-15at-serial-port: no need to pass port type when creating the objectAleksander Morgado
We'll just specify the port is AT, not primary or secondary
2012-03-15port: no need for custom enum to string convertersAleksander Morgado
2012-03-15build: generate libserial-specific enum typesAleksander Morgado
2012-02-28core: rework port grabbing and organizationDan Williams
Make port roles more flexible. We have modems that do PPP on interfaces other than the primary interface, and that wasn't possible with the old code. So clean up all that logic and move the port organization code into the core so we can reduce code in the plugins. In the new world order, the plugins say whether the port is a QCDM port, an AT port, or ignored. If it's an AT port the plugins get to tag it as primary, secondary, or PPP, or any combination of the 3. This allows for modems where PPP should really be done on the secondary port (Huawei E220, Sierra devices) so that the primary port stays open for command and status. Modem subclasses no longer get asked to handle port grabbing themselves. Instead, that's now done by the generic classes (MMGenericCdma and MMGenericGsm) and the plugins are notified when a port is grabbed so they can add unsolicited response handlers for it. After all ports are grabbed by the generic classes, they get "organized", which assigns various ports to the roles of PRIMARY, SECONDARY, DATA, and QCDM based on specific rules and hints that the plugin provided (which are expressed as MMAtPortFlags). The plugins then have a chance to perform fixups on the primary port if they choose. The plugin code is responsible for determining the port hints (ie MMAtPortFlags) at probe time, instead of having a combination of the plugin and the modem class do the job. This simplifies things greatly for the plugins at the expense of more complicated logic in the core.
2011-10-24core: don't include private headers from glibAleksander Morgado
The "glib/gtypes.h" is now considered private, and only "glib.h" should be included directly.
2011-03-27samsung: drop PORT_TYPE_ECMDan Williams
Isn't really needed since it's just the same as any other net device port type.
2011-03-11modemmanager: Add support for Samsung Y3300 modemJun Woo Lee
BUG=chrome-os-partner:2394 TEST=gmerge modemmanager, watch logs, see detected as Samsung modem, connect to AT&T network Review URL: http://codereview.chromium.org/6614026 Patch from Jun Woo Lee <jw86.lee@samsung.com>. Change-Id: I913628ff4a1cd16c8180e3c808644b0134e69e31
2011-01-24core: add mm_port_subsys_to_name()Dan Williams
2010-05-04core: add port type -> string conversion helper for debuggin messagesDan Williams
2010-03-23core: grab probed QCDM ports for plugins where they are usefulDan Williams
2009-07-06serial: rework 'connected' logicDan Williams
So many modems just don't implement carrier detect that it makes the previous 'connected' logic useless, so base it off connect/disconnect and fix up a few places that didn't check connect status before trying to send commands. Also ensure the serial port is unlocked for PPP to use when connected.
2009-06-20udev: modem port refactor; convert 'hso' to udevDan Williams
Create a base MMPort class to handle both tty and net ports generically, and move plugins over to that. Also port the 'hso' plugin to udev.