aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion
AgeCommit message (Collapse)Author
2020-01-06cinterion: use common re-registration logic when neededAleksander Morgado
If the modem requires +COPS re-registration after setting modes, use the common logic provided by the 3GPP interface, which already knows e.g. whether the registration was automatic or the actual requested operator id in case of being manual.
2019-12-05cinterion: fix using correct finish() method in AT commandAleksander Morgado
When using mm_base_modem_at_command_full(), the corresponding mm_base_modem_at_command_full_finish() should be used.
2019-10-17cinterion: don't cache voice support check AT commandsAleksander Morgado
The result of these commands may be different before and after SIM-PIN unlock, so never cache them.
2019-10-14tests: print MM logs only on verbose test modeAleksander Morgado
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
2019-10-14tests: avoid g_print() and use g_debug() insteadAleksander Morgado
The debug-level logs won't be printed e.g. during 'make check', but will be included when running the tester manually.
2019-09-23cinterion: fix calling setup_unsolicited_events_finish()Aleksander Morgado
2019-08-02cinterion: fix memory leak in common_test_ctzu_urc()Ben Chan
2019-07-12voice,call,cinterion: add Purism as copyright holderAleksander Morgado
The GSM supplementary services related changes, as well as the rework done to manage calls per call id, is copyrighted by Purism SPC.
2019-07-11cinterion: setup/cleanup time unsolicited eventsAleksander Morgado
We will parse +CTZU URCs, which end up getting in the way of other commands if we don't process them. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/135
2019-07-11cinterion: new +CTZU URC parserAleksander Morgado
2019-07-11cinterion: disable call list polling if ^SLCC is supportedAleksander Morgado
Early detect that ^SLCC is supported, and disable the call list polling in the interface if so.
2019-07-11cinterion: when ^SLCC is supported, detailed call state updates are implicitAleksander Morgado
2019-07-11cinterion: support ^SLCC URCs as part of voice managementAleksander Morgado
This command will give us URCs whenever the extended list of current calls changes, which includes information about the actual state of each call, even for calls in waiting state. Therefore, as this is a URC that applies to all calls, it's enabled and disabled as part of the modem voice interface, instead of doing it as part of the call object itself (i.e. not treated as an in-call URC).
2019-07-11cinterion: implement resetAleksander Morgado
2019-07-11cinterion: port type hints for the PLS8Aleksander Morgado
The first two ports are AT control ports (application/modem). We rely on AT^SQPORT to decide which one is which. The last two ports are unknown and we explicitly ignore them to make port probing much quicker.
2019-07-10misc: use g_regex_match() for simplicityBen Chan
This CL converts a few g_regex_match_full() expressions to their equivalent g_regex_match() in order to simplify the code, i.e. g_regex_match_full (regex, str, strlen (str), 0, 0, &match_info, NULL) is equivalent to: g_regex_match_full (regex, str, -1, 0, 0, &match_info, NULL) or simply: g_regex_match (regex, str, 0, &match_info)
2019-06-13cinterion: make custom +CIEV parser much more genericAleksander Morgado
The custom +CIEV parser configured for Cinterion modems was exclusively matching the "psinfo" indicator updates, which were the ones really used afterwards. But, in order to avoid having undesired URCs mixed with other command responses, we should anyway match any +CIEV indicator reported, not only "psinfo". The text indicator ids used in +CIEV seem to bee specific to Cinterion devices when they're configured via AT^SIND, so we do a generic match for any lowercase ascii text as indicator id.
2018-10-18core: remove unnecessary NULL checks for g_match_info_free()Ben Chan
g_match_info_free() already check if the given pointer is NULL and does nothing on a NULL pointer.
2018-09-12cinterion: report selected RTS/CTS flow control to modemAleksander Morgado
2018-08-21cinterion: new 'MMSharedCinterion' interfaceAleksander Morgado
Implement a new interface to keep the code shared between the QMI and non-QMI modem implementations. While doing that, also fix the parent interface pointer handling, so that it isn't a static pointer applicable to all modems, and make it a per-modem specific pointer. Without this fix, ModemManager would crash if e.g. running with both a QMI and non-QMI Cinterion modem at the same time. The new shared Cinterion logic will be in charge of managing all GPS sources not already managed by the parent interface. E.g. if the parent implementation already supports QMI-based GPS location (using the LOC service for example) prefer that to the custom AT-based logic.
2018-08-10port-probe: explicitly report GPS port type if port flaggedAleksander Morgado
And remove all custom logic from all plugins that were doing just that.
2018-08-10plugins: consolidate ID_MM_PORT_TYPE_GPS flag nameAleksander Morgado
Use the same flag name across all plugins with support for NMEA-capable TTYs.
2018-07-31cinterion: fix band related unit testsAleksander Morgado
The sort_band() method used in the tester was totally wrong, it was comparing the addresses of the variables instead of the MMModemBand values. Use the common mm_common_bands_garray_sort() instead, which works as expected.
2018-07-30mm-modem-helpers-cinterion: update band table for PLS8-JReinhard Speyerer
The default AT^SCFG="Radio/Band" value for Cinterion PLS8-J devices is "16819472". Add UMTS band 19 and LTE band 19 entries based on the information given in the PLS8 datasheet.
2018-07-27mm-modem-helpers-cinterion: update freq/band tablemstanger
This info comes from PLS8-X/E/J/V/US, HC25 & PHS8 references, the last two can be found publicly via Google search. Swapped bit-mask locations for G850 & PCS bands as they may have changed with FW or where accidently put in the wrong place. Updated many 3G & 4G bit-mask fields.
2018-06-02udev: add tags also on bind actionAleksander Morgado
When a new USB device is hotplugged, e.g. a USB<->RS232 converter that exposes a single ttyUSB0, these udev events happen: add /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0 (tty) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device) Our udev rules in MM only added tags in the 'add' events, and it looks like the only ones 'persistent' after this sequence are those of the last event happening on the specific path. This meant that all TTY subsystem rules (e.g. ID_MM_CANDIDATE) would be stored for later check (e.g. if ModemManager is started after these rules have been applied), which was ok. "udevadm info -p ..." would show these tags correctly always. But this also meant that the 'bind' udev event happening for the USB device didn't get any of our device-specific tags, and so we would be missing them (e.g. ID_MM_DEVICE_MANUAL_SCAN_ONLY) if MM is started after the last event has happened. "udevadm info -p ..." would not show these tags. Modify all our rules to also run at the 'bind' events. See, for context: https://github.com/systemd/systemd/issues/8221
2017-10-07cinterion: port modem_create_bearer to GTaskAleksander Morgado
2017-10-07cinterion: port after_sim_unlock to GTaskAleksander Morgado
2017-10-07cinterion: port load_unlock_retries_context to GTaskAleksander Morgado
2017-10-07cinterion: port setup_flow_control to GTaskAleksander Morgado
2017-10-07cinterion: port set_current_bands to GTaskAleksander Morgado
2017-10-07cinterion: port load_current_bands to GTaskAleksander Morgado
2017-10-07cinterion: port load_supported_bands to GTaskAleksander Morgado
2017-10-07cinterion: port register_in_network to GTaskAleksander Morgado
2017-10-07cinterion: port modem_power_off to GTaskAleksander Morgado
2017-10-07cinterion: port modem_power_down to GTaskAleksander Morgado
2017-10-07cinterion: port messaging_check_support to GTaskAleksander Morgado
2017-10-07cinterion: port messaging_enable_unsolicited_events to GTaskAleksander Morgado
2017-10-07cinterion: port plugin custom_init to GTaskAleksander Morgado
2017-09-07cinterion: update frequency bands supportAleksander Morgado
Updated to use the non-deprecated MMModemBand values.
2017-07-07cinterion: check error returned by g_task_propagate_error insteadBen Chan
When returning an enum value via g_task_return_int, some code assumes the enum value is always non-negative and thus considers that a negative value implies an error. This assumption could be invalidated if a negative value is later added to the enum. To make it less error prone to future changes, this patch modifies the code to check if the GError argument to g_task_propagate_error is populated instead.
2017-06-06cinterion: use ^SIND unsolicited messages for access tech reportingAleksander Morgado
If the modem supports ^SIND psinfo reporting, we enable the URC and flag the access technology polling unsupported, so that we only update access technology via the +CIEV URCs. E.g.: (ttyACM1): --> 'AT^SIND="psinfo",1<CR>' (ttyACM1): <-- '<CR><LF>^SIND: psinfo,1,10<CR><LF><CR><LF>OK<CR><LF>' Reporting initial access technologies... Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (unknown -> hsdpa, hsupa) ... (ttyACM1): <-- '<CR><LF>+CIEV: psinfo,4<CR><LF>' Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (hsdpa, hsupa -> edge) ...
2017-06-06iface-modem: if bands, capabilities or modes change, refresh signalAleksander Morgado
We also remove the explicit refresh request from the Cinterion plugin, as this is a generic action applicable to all modems that require polling for signal quality and/or access technology.
2017-06-06iface-modem: consolidate signal quality and access tech pollingAleksander Morgado
Plugins have two ways to update signal quality and access technology values: via unsolicited messages or via polling periodically. Instead of keeping separate contexts for polling signal quality and access technology values, we setup a common timeout to trigger both. This allows us to simplify in which case the explicit update is required, whenever one is needed to be explicitly updated, the other one should also be. The logic now also allows plugins to return an UNSUPPORTED error in either load_signal_quality() and/or load_access_technologies() to tell the interface logic that the polling of the specific item shouldn't be performed (e.g. if the updates are expected via unsolicited messages). If both signal quality and access technology polling is flagged as disabled, we totally disable the polling logic internally. The new SignalCheckContext is bound to the lifetime of the object so that we can keep the value of the supported flags until the object is destroyed.
2017-05-30cinterion: retry GPS Engine activation up to 3 timesAleksander Morgado
The default setup with 100ms between GPS commands doesn't seem to be always enough for the Engine activation step: [1495016625.392972] (ttyACM1): --> 'AT^SGPSC="NMEA/Output","on"<CR>' [1495016625.503885] (ttyACM1): <-- '<CR><LF>^SGPSC: "Nmea/Output","on"<CR><LF><CR><LF><CR><LF>OK<CR><LF>' [1495016625.607650] (ttyACM1): --> 'AT^SGPSC="Power/Antenna","on"<CR>' [1495016625.697862] (ttyACM1): <-- '<CR><LF>^SGPSC: "Power/Antenna","on"<CR><LF><CR><LF>OK<CR><LF>' [1495016625.809393] (ttyACM1): --> 'AT^SGPSC="Engine","1"<CR>' [1495016625.895970] (ttyACM1): <-- '<CR><LF>+CME ERROR: 767<CR><LF>' We now setup up to 3 retries for the Engine activation step before returning an error, and we also update to 2000ms the wait time before the Engine activation command is run.
2017-05-30cinterion: support AT^SGPSC capable modemsAleksander Morgado
The AT^SGPSS command provides an easy way to just start/stop GPS, but unfortunately it isn't supported by all Cinterion modems. The AT^SGPSC command instead is more widely available but it requires several steps to start and stop the different elements of the GPS receiver. Implement support for both, preferring AT^SGPSSS if available and falling back to AT^SGPSC otherwise.
2017-05-30cinterion: setup GPS port only if GPS support detectedAleksander Morgado
i.e. if AT^SGPSS not supported, we don't even add traces handler to the GPS data port.
2017-05-30cinterion: flag PLS8 GPS data portAleksander Morgado
2017-05-30cinterion,location: refactor enable/disable and capabilities checksAleksander Morgado
When checking for location capabilities, we will make sure AT^SGPSS is supported and if it isn't we won't report GPS capabilities. The location enable and disable paths are refactored to make it easier to add possible new GPS commands to use instead of AT^SGPSS, if this isn't supported (e.g. in the PLS8 devices).
2017-05-29telit: remove custom +CMER enablingAleksander Morgado
This is now managed directly in the generic plugin.