aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion
AgeCommit message (Collapse)Author
2017-03-29plugins: remove explicit GDestroyNotify cast on g_free / g_object_unrefBen Chan
g_free and g_object_unref are in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_free and g_object_unref is thus not needed.
2017-03-07cinterion: improve ^SCFG=? response parser to handle EHS5 formatAleksander Morgado
Two main changes in the regex: * Ignore double quotes around interval numbers. * Ignore second set of values (i.e. the one after the comma), as it may not even be given). We now support at least these two formats: ^SCFG: "Radio/Band",("1-511","0-1") ^SCFG: "Radio/Band\",("1"-"147") Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
2017-02-16cinterion: improve ^SMONG response parser:Aleksander Morgado
* Allow whitespaces prefixing the values row. * Allow more than one \r\n between the title and the table header. Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
2017-02-14cinterion: fix 'ds' setting in CNMI command builderAleksander Morgado
Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
2017-02-13cinterion: support number ranges in CNMI=? parserAleksander Morgado
https://lists.freedesktop.org/archives/modemmanager-devel/2017-February/003911.html
2017-02-03glib: remove invocations of g_type_init()Ben Chan
g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by ModemManager is 2.36, calling g_type_init() isn't necessarily in the ModemManager code.
2017-01-04cinterion: implement connection status monitoring via ^SWWAN?Aleksander Morgado
And consolidate the connection status checks done during connection and disconnection so that we re-use the same logic.
2017-01-04cinterion: default to PAP if no auth explicitly givenAleksander Morgado
This is the same logic used in other implementations (e.g. QMI).
2017-01-04cinterion: don't use predefined CIDsAleksander Morgado
The suggestion to use specific PDP context CIDs was given by Cinterion for the special case of the Verizon operator, which 'reserves' specific CIDs for specific purposes. We don't want to impose that at the Cinterion plugin level, so remove the PDP context mapping we had. Therefore, simplify the connection procedure by just overriding the 'dialing' step of the default 3GPP connection sequence, instead of overriding the whole connection sequence. Also, we don't need to override the step to gather IP config because this is already handled by the generic plugin (for DHCP over a network interface). We port to GTask for both 3GPP dial and 3GPP disconnect at the same time.
2017-01-04cinterion: fix typo in commentAleksander Morgado
2017-01-04cinterion: don't check for ^SWWAN support during enablingAleksander Morgado
Better check for ^SWWAN support during the first time a bearer is going to be created. The enabling phase isn't the correct one because this logic is only run whenever a modem is detected but not hotplugged (i.e. this step is to 'reset' the modem to generic runtime settings).
2017-01-04cinterion: minor coding style fixesAleksander Morgado
2017-01-04cinterion: simplify ^SWWAN response parsingAleksander Morgado
We get as input the ^SWWAN index we're interested in, and we loop through the list of ^SWWAN lines looking for the one we need. This updated helper method allows working with multi-line ^SWWAN responses, e.g. given when more than one PDP context is active.
2017-01-04cinterion: no need for private structAleksander Morgado
The only member in the private network isn't even used.
2017-01-04cinterion: rework 3GPP connection sequenceAleksander Morgado
Group together all connection related logic (e.g. context) and define the context steps directly within the connection sequence processing. Also, don't initially run a disconnection before the connection; if that logic is ever needed we should likely have it in the generic modem, not done per plugin. And error out early if not asking for IPv4.
2017-01-04cinterion: rework 3GPP disconnection sequenceAleksander Morgado
Group together all disconnection related logic (e.g. context) and define the context steps directly within the disconnection sequence processing.
2017-01-04cinterion: use BearerCinterionAuthType when possibleAleksander Morgado
2017-01-04cinterion: setup per-interface configuration settingsAleksander Morgado
Define the relationship between PDP context, SWWAN index and USB interface number in one single place.
2017-01-04cinterion: fix coding style for enum valuesAleksander Morgado
The enum values are given in UPPER_CASE format, not in CamelCase.
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-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-18udev: fix tagging per interface numberAleksander Morgado
Commit 7ff57f9808f35d434b638a67b84481271c67c90e introduced a change to try to use ATTRS{bInterfaceNumber} as a common way to match by interface number, but this logic is broken because all the rules that we use to match by interface number (attribute in the interface device) also require matching by idVendor and idProduct (attributes in the physdev device), and udev rules forbid matches from more than one parent device at a time. We could use ATTR{bInterfaceNumber} (instead of ATTRS) to tag the actual USB interface device, but that would require a change in all the plugins to look for the tag not in the TTY device, but in its parent. So, recover the original behavior, where a hidden property is created containing the first bInterfaceNumber found in the list of parent devices, and then run the matches against idVendor and idProduct only if the hidden property is found with the expected value.
2016-09-18udev: fix SUBSYSTEMS and ATTRS{idVendor} checksAleksander Morgado
Rules with a single condition where a parent property is checked with != don't work properly. E.g.: SUBSYSTEMS!="usb", GOTO="end" or: ATTRS{idVendor}!="abcd", GOTO="end" Instead, we can mix both those previous parent rules and match them: SUBSYSTEMS=="usb",ATTRS{idVendor}=="abcd", GOTO="next" GOTO="end" LABEL="next" # Apply rules here LABEL="end" In this case both SUBSYSTEMS and ATTRS conditions apply to the parent usb_device (idVendor attribute is only available in the usb_device), so they apply to all ports of the same device.
2016-08-06cinterion,udev: ensure 'usb' subsystems before idVendor/idProduct rulesAleksander Morgado
2016-08-06udev: replace ENV{.MM_USBIFNUM} conditions with ATTRS{bInterfaceNumber}Aleksander Morgado
2016-08-06udev: replace ENV{ID_VENDOR_ID} conditions with ATTRS{idVendor}Aleksander Morgado
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.
2016-03-21cinterion: drop unused constantsLubomir Rintel
GCC 6 doesn't like this. Unused since f2024b7.
2015-12-02core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncsAleksander Morgado
2014-07-02cinterion: allow 'unmanaged' GPS setupAleksander Morgado
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-25cinterion: update default setting for new SMS indicationsAleksander Morgado
The setup in Cinterion modems goes as follows: AT+CNMI=<mode>[, <mt>[, <bm>[, <ds>[, <bfr>]]]] For each field, several setups are available, so we could use a default value, as we were doing until now (+CNMI=2,1,2,2,1). BUT, not every Cinterion modem allows the same set of settings. For example, the new PHS8 only allows '0' for the <ds> value: AT+CNMI=? +CNMI: (0,1,2),(0,1),(0,2),(0),(1) So, instead of hardcoding the setup, try to find the best suitable one for each modem. We'll parse the +CNMI=? test response to know which values are supported during the messaging support check, which is run once during initialization.
2014-06-25cinterion: new 'AT+CNMI=?' parser helperAleksander Morgado
2014-06-23port: store parent sysfs path in each MMPortAleksander Morgado
2014-06-03cinterion: fix memory leaks in testsBen Chan
2014-03-03cinterion: implement unlock retries loadingAleksander Morgado
2014-03-03cinterion: after SIM unlock, query SIM status until readyAleksander Morgado
2014-02-28cinterion: request to force refresh access tech after current bands updateAleksander Morgado
2014-02-28cinterion: force band preference update to be applied immediatelyAleksander Morgado
2014-02-28cinterion: consolidate setting current bands in 2G and 3G devicesAleksander Morgado
2014-02-28cinterion: consolidate current bands loading for 2G and 3G devicesAleksander Morgado
2014-02-28cinterion: consolidate supported bands loading for 2G and 3G devicesAleksander Morgado
2014-02-28cinterion: add helper to build Cinterion band maskAleksander Morgado
2014-02-28cinterion: add helper to parse AT^SCFG="Radio/Band" response in 3G devicesAleksander Morgado
2014-02-28cinterion: use AT^SCFG=? to parse supported bands in 3G devicesAleksander Morgado
2014-02-28cinterion: request access tech update after allowed mode changeAleksander Morgado