aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion/mm-plugin-cinterion.c
AgeCommit message (Collapse)Author
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-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 ...
2016-05-28plugin-manager: protect mm_plugin_{major,minor}_versionTing-Yuan Huang
This patch makes declarations bind to definitions within the same module to prevent the potential ambiguity if referenced directly. AddressSanitizer think they violated one definition rule, although those symbols are accessed by address through their modules and do not depend on the order of the libararies loaded.
2014-07-01cinterion: enable GPS location reporting for the PHS8 in QMI-modeAleksander Morgado
The PHS8 in QMI-mode doesn't support GPS location retrieval via QMI, so we will fallback to use the AT-based setup and the TTY for reading NMEA traces.
2014-06-27cinterion: enable GPS location reporting for the PHS8 in AT-modeAleksander Morgado
This enables support for GPS location reporting when the PHS8 is NOT used in QMI mode.
2014-06-23port: store parent sysfs path in each MMPortAleksander Morgado
2014-02-13port-serial-at: use GIO Async API like methodsAleksander Morgado
2014-02-13ports: rename 'MMAtSerialPort' to 'MMPortSerialAt'Aleksander Morgado
2014-02-13cinterion: try to gather port type for devices with multiple tty portsAleksander Morgado
The new PHS8 or PXS8 devices may expose multiple tty ports, but only one is supposed to be used for PPP. So, query which port that is and flag it before grabbing it in the modem.
2013-09-25cinterion: support QMI-based Cinterion PLXX and PHXX modulesAleksander Morgado
E.g. with a Cinterion PLS8 LTE modem: $ sudo mmcli -m 0 /org/freedesktop/ModemManager1/Modem/0 (device id '0042872f6597b3d772a3d9d3cd6f14f152af8a0b') ------------------------- Hardware | manufacturer: 'QUALCOMM INCORPORATED' | model: '0' | revision: 'M9615A-CETWMAZM-2.0.19015 1 [Jan 31 2013 00:00:00]' | supported: 'gsm-umts | lte | gsm-umts, lte' | current: 'gsm-umts, lte' | equipment id: 'unknown' ------------------------- System | device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7' | drivers: 'option1, qmi_wwan' | plugin: 'Cinterion' | primary port: 'cdc-wdm0' | ports: 'ttyUSB2 (at), cdc-wdm0 (qmi), wwp0s29u1u7i4 (net)' ------------------------- Numbers | own : 'unknown' ------------------------- Status | lock: 'sim-pin' | unlock retries: 'sim-pin (3), sim-pin2 (2), sim-puk (10), sim-puk2 (10)' | state: 'locked' | power state: 'on' | access tech: 'unknown' | signal quality: '0' (cached) ------------------------- Modes | supported: 'allowed: 2g, 3g, 4g; preferred: none' | current: 'allowed: 2g, 3g, 4g; preferred: none' ------------------------- Bands | supported: 'cdma-bc15-aws, dcs, egsm, u2100, u1800, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx' | current: 'cdma-bc15-aws, dcs, egsm, u2100, u1800, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx' ------------------------- IP | supported: 'ipv4, ipv6, ipv4v6' ------------------------- SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
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-06plugins: use default port grabbing on those plugins without special requirementsAleksander Morgado
2012-08-06core: merge `MMPluginBase' and `MMPlugin'Aleksander Morgado
There's no real point in maintaining a separate `MMPlugin' interface, as all the plugins will inherit from `MMPluginBase', so just merge them and simplify everything.
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).
2012-03-16plugin-base: remove the SORT_LAST propertyAleksander Morgado
Plugins that need to get sorted last by the PluginManager can now be determined just by looking at the post probing filters.
2012-03-16build: fix header dependenciesAleksander Morgado
We shouldn't depend on any header file from the previous implementation.
2012-03-16cinterion: new Cinterion-specific source directoryAleksander Morgado