aboutsummaryrefslogtreecommitdiff
path: root/src/mm-device.h
AgeCommit message (Collapse)Author
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2022-05-24base-modem: add subsystem vendor ID propertyDaniele Palmas
Subsystem vendor ID can be used for identifying PCI modems, so expose the property.
2020-11-19base-manager: never create kernel device objects for remove eventsAleksander Morgado
There is no point in creating a new kernel device object just to process a remove event; instead, do any matching with existing kernel device objects by subsystem and name, which is what the generic backend already did anyway. This avoids unnecessary lookup of information in sysfs during removal events, because the port is anyway already gone when we try to look those up.
2020-09-19core: add autoptr cleanup methods to all internal typesAleksander Morgado
2020-01-06device: keep reference to object manager serverAleksander Morgado
Instead of having the reference to the object manager server only while the modem is exported, just keep a reference for as long as the device object exists. This will make it easier to handle reprobing logic.
2019-01-03api,manager: new InhibitDevice() methodAleksander Morgado
This new method allows users of the ModemManager API to take full control of a given device. Unlike other operations in the API, the inhibition is maintained as long as the caller exists in the bus, or until the same caller uninhibits the device. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/98
2016-09-29core: new kernel device object instead of an explicit GUdevDeviceAleksander Morgado
Instead of relying constantly on GUdevDevice objects reported by GUdev, we now use a new generic object (MMKernelDevice) for which we provide an initial GUdev based backend.
2016-09-29core: allow identifying devices by a user-provided 'uid'Aleksander Morgado
All ports of the same modem reported by the kernel will all be associated with a common 'uid' (unique id), which uniquely identifies the physical device. This logic was already in place, what we do now is avoid calling it the 'sysfs path' of the physical device, because we may not want to use that to identify a device. This logic now also enables the possibility of "naming" the modems in a unique way by setting the "ID_MM_PHYSDEV_UID" property in the "usb_device" that owns all the ports. E.g. a custom device has 4 modems in 4 different USB ports. The device path of each USB device will always be the same, so the naming rules could go like this: $ vim /usr/lib/udev/rules.d/78-mm-naming.rules ACTION!="add|change|move", GOTO="mm_naming_rules_end" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.1", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-1" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.2", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-2" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.3", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-3" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.4", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-4" LABEL="mm_naming_rules_end" Each of the modems found will have a unique UID retrieved from the previous list of rules. Then, "mmcli" has also been updated to allow using the UID instead of the modem DBus path or index, e.g.: $ sudo mmcli -m USB-MODEM-1 /org/freedesktop/ModemManager1/Modem/0 (device id '988d83252c0598f670c2d69d5f41e077204a92fd') ------------------------- Hardware | manufacturer: 'ZTE CORPORATION' | model: 'MF637' | revision: 'BD_W7P673A3F3V1.0.0B04' | supported: 'gsm-umts' | current: 'gsm-umts' | equipment id: '356516027657837' ------------------------- System | device: 'USB-MODEM-1' | drivers: 'option' | plugin: 'ZTE' | primary port: 'ttyUSB5' | ports: 'ttyUSB5 (at)' ... $ sudo mmcli -m USB-MODEM-1 --enable ...
2014-02-13device: allow creating 'virtual' devicesAleksander Morgado
2014-02-13device: new 'hotplugged' propertyAleksander Morgado
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-12-27plugin: avoid QMI-managed net ports when compiling without QMI supportAleksander 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-08-06device: keep all unsupported ports in a separate listAleksander Morgado
Ports being marked as unsupported should not be passed to the plugin specific create_modem() or grab_port() methods.
2012-08-06port-probe: let us peek the `MMDevice' owning the probe from the probe itselfAleksander Morgado
2012-08-06device,plugin: let the `MMPlugin' API know about `MMDevice'Aleksander Morgado
2012-08-06device: get vendor/product IDsAleksander Morgado
And don't do it in MMPlugin.
2012-08-06device: keep a list of port probes instead of just portsAleksander Morgado
2012-08-06device: signal grabbed/released portsAleksander Morgado
2012-08-06device: load driver being used when first port grabbedAleksander Morgado
2012-08-06device: keep sysfs path around for loggingAleksander Morgado
2012-08-06device: split `MMDevice' creation and plugin settingAleksander Morgado
We want to be able to create the MMDevice way before we have decided which plugin to use.
2012-08-06core: compile all ports before creating the modem objectAleksander Morgado
Before this, we only exported the modem to DBus when all ports were organized, in order to make sure that we select as primary port the one we really want and not the first AT port grabbed. Given that to get all the ports organized we also needed to wait to get all the ports grabbed, we can now also defer the creation of the modem object until all the ports get grabbed. This allows us to create different types of objects based on the ports available (e.g. we can now create QMI-supported modem objects if we see a QMI port around).