aboutsummaryrefslogtreecommitdiff
path: root/plugins/simtech/mm-broadband-modem-simtech.c
AgeCommit message (Collapse)Author
2023-01-03build: move plugins directory to src/pluginsAleksander Morgado
We are going to allow including the plugin sources built within the ModemManager daemon binary; moving the sources within the daemon sources directory makes it easier.
2021-03-04base-modem: explicitly say if NET or TTY data ports are supportedAleksander Morgado
A modem that creates exclusively bearer objects that work with NET ports (e.g. all QMI or MBIM modems) must not add any TTY port in the list of data ports. A modem that creates exclusively bearer objects that work with TTY ports (e.g. the generic modem) must not add any NET port in the list of data ports. A modem that may use both TTY and NET ports should add all in the list of data ports. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/324 Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/329
2020-04-08simtech: port to use object loggingAleksander Morgado
2020-04-08modem-helpers: port supported modes filtering to use object loggingAleksander Morgado
2020-01-31simtech: fix warnings with -Wimplicit-fallthroughAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘enable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:442:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 442 | ctx->step++; | ~~~~~~~~~^~ simtech/mm-broadband-modem-simtech.c:444:5: note: here 444 | case ENABLE_UNSOLICITED_EVENTS_STEP_LAST: | ^~~~
2020-01-31simtech: fix warnings with -Wswitch-defaultAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘enable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:378:5: error: switch missing default case [-Werror=switch-default] 378 | switch (ctx->step) { | ^~~~~~ simtech/mm-broadband-modem-simtech.c: In function ‘disable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:563:5: error: switch missing default case [-Werror=switch-default] 563 | switch (ctx->step) { | ^~~~~~
2020-01-31simtech: fix warnings with -Wsign-compareAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘simtech_act_to_mm_act’: simtech/mm-broadband-modem-simtech.c:89:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] 89 | return (nsmod < G_N_ELEMENTS (simtech_act_to_mm_act_map) ? simtech_act_to_mm_act_map[nsmod] : MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); | ^
2020-01-31helpers: new macro to CLAMP high threshold onlyAleksander Morgado
Useful when clamping a unsigned integer with low threshold set to 0, which would give us compiler warnings with -Wtype-limits when using CLAMP(), e.g.: via/mm-broadband-modem-via.c: In function ‘handle_evdo_quality_change’: /usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] 811 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) | ^ via/mm-broadband-modem-via.c:284:19: note: in expansion of macro ‘CLAMP’ 284 | quality = CLAMP (quality, 0, 100); | ^~~~~
2019-10-16simtech: setup USB audio channel when in-callAleksander Morgado
We'll use +CPCMREG=1/0 to start/stop USB audio function, and we will also report the specific ttyUSB port to be used for audio in the Call interface.
2019-10-14simtech: implement +CLCC URC based call list managementAleksander Morgado
2019-10-11simtech: +CNSMOD value may have multiple digitsAleksander Morgado
We don't expect them in the set of values we support, but they may happen according to the spec.
2019-10-11simtech: add support for reporting LTEAleksander Morgado
2019-10-11simtech: rework access tech value mappingAleksander Morgado
2019-10-11simtech: rework enabling/disabling unsolicited eventsAleksander Morgado
We will explicitly query for +AUTOCSQ and +CNSMOD support before trying to enable them. If +AUTOCSQ is supported and correctly enabled, we'll request signal quality polling to be disabled. If +CNSMOD is supported and correctly enabled, we'll request access technology polling to be disabled.
2019-10-11simtech: enable +CSQ URC supportAleksander Morgado
The +AUTOCSQ setup enables automatic signal quality reporting via +CSQ URCs, which unfortunately have the same format as the +CSQ command responses. Therefore, we need to subclass load_signal_quality() explicitly in order to ignore those cases where the response to the +CSQ command is received empty (already processed as a URC).
2019-10-11simtech: keep access tech URC regex in private structAleksander Morgado
2019-10-11simtech: disable CMER/CIND support explicitlyAleksander Morgado
The logic to setup the generic +CIND indications in the SIM7600E seems to end up breaking connectivity when in TTY+PPP mode. If we issue the AT+CMER=3,0,0,1 command, this will end up in the modem not replying a correct CONNECT response to the ATD command. Let's disable these +CIND indications completely in the simtech plugin, as there is even no AT command reference saying those are supported. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/144
2019-10-11simtech: implement GPS support with AT+CGPSAleksander Morgado
The new logic is available in a new 'MMSharedSimtech' interface which is implemented both by the generic AT-based MMBroadbandModemSimtech modem, and by a new QMI-based new MMBroadbandModemQmiSimtech. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/112
2019-09-15simtech: increase +CNSMOD command timeoutAleksander Morgado
From 5s to 20s, as it seems it could take much more to complete and get a response, as seen in the logs below. <debug> [1568553228.546862] (ttyUSB3): --> 'AT+CNSMOD=1<CR>' <debug> [1568553233.799470] (ttyUSB3): --> 'AT+AUTOCSQ=1,1<CR>' <debug> [1568553238.798866] (ttyUSB3) setting up 3GPP unsolicited registration messages handlers <debug> [1568553238.798932] (ttyUSB2) setting up 3GPP unsolicited registration messages handlers <debug> [1568553238.798990] (ttyUSB3) device open count is 1 (close) <warn> [1568553238.799029] (tty/ttyUSB3) at port timed out 2 consecutive times <debug> [1568553238.799094] (ttyUSB3) device open count is 2 (open) <debug> [1568553238.799148] (ttyUSB3): --> 'AT+CREG=2<CR>' <warn> [1568553241.798727] (tty/ttyUSB3) at port timed out 3 consecutive times <debug> [1568553241.798799] (ttyUSB3): --> 'AT+CREG=1<CR>' <debug> [1568553244.795389] Enabling unsolicited registration events in primary port failed: 'AT sequence failed' <debug> [1568553244.795462] (ttyUSB2) device open count is 2 (open) <debug> [1568553244.795507] (ttyUSB3) device open count is 1 (close) <warn> [1568553244.795545] (tty/ttyUSB3) at port timed out 4 consecutive times <debug> [1568553244.795588] (ttyUSB2): --> 'AT+CREG=2<CR>' <debug> [1568553244.800815] (ttyUSB3): <-- '<CR><LF>OK<CR><LF><CR><LF>OK<CR><LF>' <debug> [1568553244.801624] (ttyUSB3): <-- '<CR><LF>OK<CR><LF><CR><LF>OK<CR><LF>' <debug> [1568553244.808710] (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
2017-10-07simtech: fix memory leakBen Chan
2017-10-06simtech: port 3gpp_{setup|cleanup}_unsolicited_messages to GTaskAleksander Morgado
2017-10-06simtech: port 3gpp_enable_unsolicited_events to GTaskAleksander Morgado
2017-10-06simtech: port 3gpp_disable_unsolicited_events to GTaskAleksander Morgado
2017-10-06simtech: port load_access_technologies to GTaskAleksander Morgado
2017-10-06simtech: port load_supported_modes to GTaskAleksander Morgado
2017-10-06simtech: port load_current_modes to GTaskAleksander Morgado
2017-10-06simtech: port set_current_modes to GTaskAleksander Morgado
2017-09-13simtech: fix error reporting in 3gpp unsolicited events enablingAleksander Morgado
2017-07-17simtech: fix async completion in 3gpp event handlers settingAleksander Morgado
2017-05-30plugins: use G_N_ELEMENTS when iterating ports arrayAleksander Morgado
2014-02-13ports: rename 'MMAtSerialPort' to 'MMPortSerialAt'Aleksander Morgado
2013-06-05api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'Aleksander Morgado
We now have a single 'CurrentModes' property which contains both values in a tuple with signature "(uu)". Also, rename 'SetAllowedModes()' to 'SetCurrentModes()', and update the list of arguments expected to have a single "(uu)" tuple.
2013-06-05api,introspection: 'SupportedModes' is now a list of possible combinationsAleksander Morgado
Instead of just a mask of MMModemMode values, we now provide a list of the allowed and preferred mode combinations supported by the modem. E.g.: $> sudo mmcli -m 0 ------------------------- Modes | supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none | allowed: 2g, 3g; preferred: 2g | allowed: 2g, 3g; preferred: 3g | allowed: 4g; preferred: none | allowed: 2g, 3g, 4g; preferred: none'
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-04-14simtech: implement custom allowed/preferred mode settingAleksander Morgado
2012-04-14simtech: implement custom allowed/preferred mode loadingAleksander Morgado
2012-04-14simtech: implement custom access technology loadingAleksander Morgado
2012-04-14simtech: implement custom unsolicited events enabling/disablingAleksander Morgado
2012-04-14simtech: implement custom unsolicited events setup/cleanupAleksander Morgado
2012-04-14simtech: new `MMBroadbandModemSimtech' objectAleksander Morgado