aboutsummaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2016-11-07kernel-device: ID_USB_INTERFACE_NUM should be read as an hex stringAleksander Morgado
The original g_udev_device_get_property_as_int() uses strtol() without an explicit base (i.e. 0) so that the base is autodetected from the string whenever possible (e.g. if prefixes with '0x' it is treated as a hexadecimal string). But, for ID_USB_INTERFACE_NUM, we explicitly require reading the number as an hex string, even if we don't have any '0x' prefix. Reported-by: Matthew Stanger <stangerm2@gmail.com>
2016-10-24core: use a default timeout of 300s for the scan networks operationAleksander Morgado
This is the value which we actually suggest in the manpage for the mmcli operation, so just use the same one. Scanning for 3GPP networks may really take a long time, so a specific timeout must be given: $ mmcli -m 0 --3gpp-scan --timeout=300 Found 4 networks: 21404 - Yoigo (umts, available) 21407 - Movistar (umts, current) 21401 - vodafone ES (umts, forbidden) 21403 - Orange (umts, forbidden) https://bugs.freedesktop.org/show_bug.cgi?id=98235
2016-10-20telit: optimized supported and current band codeCarlo Lobrano
In place of two slightly different regexes for 2g/3g and 2g/3g/4g modems we now use only one regex with conditional patterns for both supported and current Bands detection. Adding also minor fix in test code
2016-10-13ublox: fix VPATH builds and distcheckAleksander Morgado
https://bugs.freedesktop.org/show_bug.cgi?id=98216
2016-10-12ublox: add README explaining all details of the pluginAleksander Morgado
2016-10-12ublox: longer timeout needed for AT probingAleksander Morgado
When the device is reset, it needs some time before the newly exposed TTYs are able to reply to our AT commands. We increase the default timeout of the AT probing commands in order to cope with that, or we'll end up with TTYs of 'unknown' type that aren't used for anything.
2016-10-12ublox: implement connection statistics loadingAleksander Morgado
The implementation uses +UGCNTRD=? to query whether the per-PDP context statistics are supported by the device, and if they are, +UGCNTRD is used to query them. We only process the statistics for the specific CID we're using.
2016-10-12ublox: new +UGCNTRD? response parserAleksander Morgado
The parser returns only the results for the CID being specified as input. This is so that we can just query the statistics of the CID currently in use by the bearer.
2016-10-12ublox: implement current bands settingAleksander Morgado
Reuse the logic and context used to update current modes, as we need the same steps (check current power state, go into low power, config update, and recover previous power state).
2016-10-12ublox: new +UBANDSEL=X command builderAleksander Morgado
2016-10-12ublox: implement current bands loadingAleksander Morgado
2016-10-12ublox: new +UBANDSEL? response parserAleksander Morgado
2016-10-12ublox: implement supported bands loadingAleksander Morgado
2016-10-12ublox: use +UAUTHREQ to setup PDP context authenticationAleksander Morgado
2016-10-12ublox: implement PIN retry count loadingAleksander Morgado
2016-10-12ublox: new +UPINCNT response parserAleksander Morgado
2016-10-12ublox: use +CEREG if LTE supportedAleksander Morgado
2016-10-12ublox: implement current modes setting and modem power up/down/off/resetAleksander Morgado
Changing current allowed/preferred modes requires the device to be in low-power mode, so we will make sure we return an error if any power operation is already ongoing when a new one is requested.
2016-10-12ublox: new +URAT=X command builderAleksander Morgado
2016-10-12ublox: implement power state loadingAleksander Morgado
2016-10-12ublox: new u-blox specific +CFUN? response parserAleksander Morgado
2016-10-12linktop: new Linktop specific +CFUN? response parserAleksander Morgado
We handle all known CFUN? response values in the new parser, and report an error if an unknown value is found.
2016-10-12mbm: new MBM specific +CFUN? response parsersAleksander Morgado
2016-10-12ublox: implement current modes loadingAleksander Morgado
2016-10-12ublox: new +URAT? response parserAleksander Morgado
2016-10-12ublox: implement supported modes loadingAleksander Morgado
AT+URAT=? provides the format expected, but looks like it isn't implemented differently for the different u-blox devices seen, so we need an additional level of filtering which currently is applied per device model string.
2016-10-12ublox: new +URAT=? response parserAleksander Morgado
2016-10-12broadband-modem: implement default connection monitoring logicAleksander Morgado
A default implementation to monitor the ongoing connection is provided in the generic MMBroadbandModem, based on AT+CGACT? to check whether the PDP context of the connection (identified by the cached cid) is active or not. This commit also disables the connection monitoring logic in those plugins that have custom connection methods.
2016-10-12novatel: subclass the connection monitoring logicAleksander Morgado
Instead of setting up a custom timeout source to poll the connection status, use the generic logic in the base bearer object, and just re-implement the command used to check the status.
2016-10-12modem-helpers: new COPS? response parserAleksander Morgado
Split into two different actions the actual COPS? response parsing and the operator name normalization process. Also, allow parsing not only the operator string, but also the format, mode and the optional access technology value.
2016-10-12ublox: implement connection using the 2G/3G logic in router or bridge modeAleksander Morgado
2016-10-12ublox: new +UIPADDR=N response parserAleksander Morgado
2016-10-12ublox: new broadband bearer objectAleksander Morgado
2016-10-12ublox: generate enum types for usb profile and networking modeAleksander Morgado
2016-10-12ublox: preload networking mode and usb profile when creating a new bearerAleksander Morgado
2016-10-12ublox: new 'AT+UBMCONF?' response parserAleksander Morgado
2016-10-12ublox: new 'AT+UUSBCONF?' response parserAleksander Morgado
2016-10-12ublox: new broadband modem objectAleksander Morgado
2016-10-12ublox: new plugin skeletonAleksander Morgado
2016-10-12build: include telit helpers in TELIT_COMMON_LIBADD_FLAGSAleksander Morgado
The dell plugin needs them. ModemManager[727]: <warn> [1476194360.614829] [mm-plugin-manager.c:1494] load_plugin(): [plugin manager] could not load plugin '/usr/lib64/ModemManager/libmm-plugin-dell.so': /usr/lib64/ModemManager/libmm-plugin-dell.so: undefined symbol: mm_telit_get_band_flag https://bugs.freedesktop.org/show_bug.cgi?id=98207 Reported-by: Lubomir Rintel <lkundrak@v3.sk>
2016-10-12plugins: only export useful symbolsLubomir Rintel
This should avoid poluting the name space and also make module loading faster.
2016-10-11telit: fix supported and current bands query with GE910Daniele Palmas
GE910 is a 2g only modem and when queried for bands it returns only a 2g set of bands: --> 'AT#BND=?<CR>' <-- '<CR><LF>#BND: (0-3)<CR><LF><CR><LF>OK<CR><LF>' Current regex fails, since it considers the 3g bands block mandatory. A similar problem happens for current bands. This patch modifies the regular expressions for properly supporting GE910 and updates tests.
2016-10-06telit: add GE910 #PORTCFG layoutsDaniele Palmas
GE910 family supports #PORTCFG layouts different than HE910 family ones. This patch properly tags GE910 ports according to Telit document "GE910 Family Ports Arrangements, 1vv0301049"
2016-10-06telit: add udev rules for supporting GE910Daniele Palmas
This patch adds the udev rules for supporting GE910 (PID 0x22)
2016-10-05huawei: handle some weird SYSCFG acquisition ordersDan Williams
<debug> (ttyUSB2): --> 'AT^SYSCFG?<CR>' <debug> (ttyUSB2): <-- '<CR><LF>^SYSCFG:14,2,400380,1,2<CR><LF><CR><LF>OK<CR><LF>' <warn> couldn't load current allowed/preferred modes: 'No SYSCFG combination found matching the current one (14,2)' 14,2 means "WCDMA-only; acquire WCDMA then GSM" which is somewhat non-sensical. The supported modes parsing doesn't generate this combination because it doesn't really make sense, so current mode matching failed. Just fix up the non-sensical acquisition order to 0 (automatic).
2016-09-29core: allow building and running without udevAleksander Morgado
Instead of relying on the udev daemon and GUDev to manage the devices reported by the kernel, we can now run ModemManager relying solely on the kernel events reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan' option is implicit for the ModemManager daemon when udev is disabled in the build. Additionally, a new custom implementation of the kernel device object is provided, which uses sysfs to load the properties and attributes required in each kernel device, instead of using a GUdevDevice. The udev rule files are kept in place, and a simple custom parser is provided which preloads all rules in memory once and then applies them to the different kernel objects reported via ReportKernelEvent(), e.g. to set port type hints. A simple unit test setup is prepared to validate the udev rules during the `check' Makefile target.
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-09-18huawei: fix interface class/subclass/protocol matchingAleksander Morgado
Commit a66871a2876be2236f634ff6b5e59d20de1ce5df introduced an additional ATTRS{idVendor} match condition in the same rules matching by interface class, subclass and protocol. We shouldn't be doing that because we cannot mix parent attribute matchings from different parents.