aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion
AgeCommit message (Collapse)Author
2020-11-04cinterion: setup SGAUTH response parser as a helper methodAleksander Morgado
2020-11-04cinterion: move auth helpers to the helpers sourcesAleksander Morgado
2020-11-04cinterion: improve logging when loading initial EPS status or settingsAleksander Morgado
2020-11-04cinterion: refactor the initial EPS related logicAleksander Morgado
Multiple changes that shouldn't affect behavior: * Avoid reusing the same context and state machine for the set and the load operations, because they truly have different behaviors. * Setup the common load operation in a separate async method, and reuse the common operation for both the runtime state loading and the settings configuration loading. * Avoid having a "generic step ready" method, and instead provide proper ready methods for each step, so that we can give comprehensive warning logs when things fail. * Use the common CFUN? response parser instead of a custom implementation.
2020-10-14cinterion: fix missing GError initializationAleksander Morgado
2020-09-15cinterion: Add SIM hot swap to AT broadband modems (PLS8 & PLAS9).Jessy Diamond Exum
Enable the SCKS Unsolicited Result Code (URC) to detect SIM hot swap, and trigger SIM redetection.
2020-09-15cinterion: Configure the PLAS9 to correctly send Unsolicited Result Codes.Jessy Diamond Exum
The PLS8 and PLAS9 modems (and likely many others modems supported by this driver) have two AT capable serial ports: The 'MODEM' AT port (default for PPP) and the 'APPLICATION' AT port (used for general control). The PLS8 modem sends URCs to the APPLICATION port by default, while he PLAS9 defaults sending URCs to the MODEM port. To get URCs to behave on both modems, it is necessary to explicitly set the URC reporting port to APPLICATION.
2020-08-11cinterion: remove limitation to IPv4 only PDP contextsGiacinto Cifelli
There was a limitation in the past in the plugin, because one of the steps during the dial (CONNECT_3GPP_CONTEXT_STEP_PDP_CTX) was to reconfigure a specific CID hardcoding the IP type to IPv4. That logic was removed in commit af2d6c1c4b7f815862313bf0f84b1ff0e91ccd60, but we didn't remove the IPv4 limitation at that point.
2020-08-11cinterion: clarify role of the AT ports for the ELS61/PLS62 familyGiacinto Cifelli
2020-08-11cinterion: setup initial LTE parametersGiacinto Cifelli
2020-08-04cinterion: fixed cast from wrong objectGiacinto Cifelli
MM_BROADBAND_MODEM_CINTERION shall be applied to a *MMBaseModem (ctx->modem here) and not to a *MMBaseBearer (self here)
2020-07-27cinterion: IMT family SGAUTHGiacinto Cifelli
some ITM family modems require full parameters: AT^SGAUTH=cid,type,user,pwd even when type is AUTH_NONE. Fortunately, all modules of the IMT family tolerate this syntax, so it can be adopted for the entire family.
2020-07-27cinterion: ignore ^SYSSTART urcGiacinto Cifelli
2020-07-27cinterion: extend SGAUTH syntaxGiacinto Cifelli
AT^SGAUTH syntax depends on the modem family: AT^SGAUTH=cid,type,user,pwd for the IMT family AT^SGAUTH=cid,type,pwd,user for the rest
2020-07-26cinterion: radio/band single scfg line: no varianceGiacinto Cifelli
the AT^SCFG="Radio/Band" command does not return a different answer for different charsets. This code was working previously because the charset was left to default (GSM) at the time of this operation, and therefore the string was unchanged anyway.
2020-07-24changed default authentication algorithm to CHAPGiacinto Cifelli
CHAP is almost universal nowadays, and so it is a better default than PAP Not changed for uBlox, that prefers an error if not specified, and for Huawei, which uses NONE with user/pwd and has 2 CHAP choices
2020-07-06cinterion: quote user/password strings in AT^SGAUTH callsAleksander Morgado
The ELS61 doesn't like authentication given without quotes: [modem3/ttyACM1/at] --> 'AT^SGAUTH=8,1,tm,t-mobile<CR>' [modem3/ttyACM1/at] <-- '<CR><LF>+CME ERROR: 4<CR><LF>' Only when user/pass strings are quoted it works: [modem6/ttyACM1/at] --> 'AT^SGAUTH=8,1,"t-mobile","tm"<CR>' [modem6/ttyACM1/at] <-- '<CR><LF>OK<CR><LF>'
2020-07-06cinterion: if user OR password given, don't set the other as (null)Aleksander Morgado
[modem2/ttyACM1/at] --> 'AT^SGAUTH=8,1,t-d1,(null)<CR>' [modem2/ttyACM1/at] <-- '<CR><LF>+CME ERROR: 4<CR><LF>' We should use an empty string instead.
2020-07-06cinterion: increase SWWAN connection attempt timeoutAleksander Morgado
It's critical not to timeout early on devices with AT ports, or we may end up flagging the modem as invalid. ModemManager[26829]: <debug> [1593097973.552712] [modem1/ttyACM0/at] --> 'AT^SWWAN=1,2,1<CR>' .... ModemManager[26829]: <debug> [1593098064.195217] [modem1] couldn't connect bearer: Serial command timed out .... ModemManager[26829]: <error> [1593098091.167987] [modem1] port ttyACM0 timed out 10 consecutive times, marking modem as invalid
2020-07-04cinterion,signal: ^SMONI=? support check may be cachedAleksander Morgado
2020-07-04cinterion,signal: report error from parent signal support checkAleksander Morgado
2020-07-04cinterion,signal: minor coding style fixesAleksander Morgado
2020-07-04iface-modem-signal: added 5G signal informationWalter Hagstrom
Extended the ModemManager Signal interface to include 5G signal information for RSRP, RSRQ and SINR via libqmi. Also extended mmci to print 5G signal info.
2020-06-19cinterion: added port type hints for the mPLS62-w in MBIM modeAleksander Morgado
T: Bus=01 Lev=02 Prnt=04 Port=01 Cnt=01 Dev#= 40 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=005d Rev=17.30 S: Manufacturer=Cinterion Wireless Modules S: Product=PLSx C: #Ifs=12 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm I: If#=0xa Alt= 1 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0xb Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm I: If#=0x3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm I: If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm I: If#=0x5 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm I: If#=0x6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm I: If#=0x7 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm I: If#=0x8 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm I: If#=0x9 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
2020-06-19cinterion: allow MBIM-powered devicesAleksander Morgado
Like the mPLS62-w when setup to be controlled in MBIM mode instead of plain AT commands.
2020-05-28cinterion: fix syntax error for setting radio/bands/[23]gGiacinto Cifelli
2020-05-27cinterion: skip sim ready check for modules that don't support itGiacinto Cifelli
2020-05-26cinterion: simplify checkGiacinto Cifelli
no longer need to check the charset because of the fix in charsets, that now accepts GSM and UCS2.
2020-05-26cinterion: minor coding style fixes in new band managementAleksander Morgado
2020-05-26cinterion: radio/band handling for LTE modemsGiacinto Cifelli
2020-05-26Revert "charsets: don't warn in unlikely case of needing to convert to HEX ↵Aleksander Morgado
from UTF-8" This reverts commit 6a7dd87f30b2cc1b459abab38a0805aa8ba1bfbc. Reverting because the merge request was set to squash all together....
2020-05-26charsets: don't warn in unlikely case of needing to convert to HEX from UTF-8Giacinto Cifelli
This would really be an implementation detail, not a real use case. Just don't warn in this case, as in the conversion in the opposite direction.
2020-05-19cinterion,tests: avoid cast-align errorsAleksander Morgado
We can safely cast the data in a GArray to gpointer first, and then to the pointer type we require. cinterion/tests/test-modem-helpers-cinterion.c: In function 'common_test_scfg': cinterion/tests/test-modem-helpers-cinterion.c:56:56: error: cast increases required alignment of target type [-Werror=cast-align] expected_bands_str = mm_common_build_bands_string ((const MMModemBand *)expected_bands->data, ^ cinterion/tests/test-modem-helpers-cinterion.c:58:47: error: cast increases required alignment of target type [-Werror=cast-align] bands_str = mm_common_build_bands_string ((const MMModemBand *)bands->data, ^ cinterion/tests/test-modem-helpers-cinterion.c: In function 'common_test_scfg_response': cinterion/tests/test-modem-helpers-cinterion.c:209:56: error: cast increases required alignment of target type [-Werror=cast-align] expected_bands_str = mm_common_build_bands_string ((const MMModemBand *)expected_bands->data, ^ cinterion/tests/test-modem-helpers-cinterion.c:211:47: error: cast increases required alignment of target type [-Werror=cast-align] bands_str = mm_common_build_bands_string ((const MMModemBand *)bands->data, ^
2020-05-19cinterion,helpers: minor coding style fixAleksander Morgado
2020-05-19cinterion,helpers: avoid cast-align errorsAleksander Morgado
We can safely cast the data in a GArray to gpointer first, and then to the pointer type we require. cinterion/mm-modem-helpers-cinterion.c: In function 'mm_cinterion_build_band': cinterion/mm-modem-helpers-cinterion.c:409:54: error: cast increases required alignment of target type [-Werror=cast-align] bands_string = mm_common_build_bands_string ((MMModemBand *)bands->data, bands->len); ^
2020-05-16udev rules for the PLS62 in 005b enumerationGiacinto Cifelli
2020-05-15plugins/cinterion: added Signal interfaceGiacinto Cifelli
Not all Cinterion modems support AT+CESQ. However a much larger group of them support AT^SMONI This commit uses the latter instead of the default former.
2020-04-08plugins: don't add plugin name in log message explicitlyAleksander Morgado
2020-04-08plugins: use logging module name as plugin nameAleksander Morgado
2020-04-08log: common logging method definition for all testers and helpersAleksander Morgado
2020-04-08cinterion: port to use object loggingAleksander Morgado
2020-04-08modem-helpers: port supported modes filtering to use object loggingAleksander Morgado
2020-04-08log: new object logging supportAleksander Morgado
So that we can provide the specific object id in every log associated to a given object.
2020-02-07iface-modem-location: common helper code to test raw gpsAleksander Morgado
2020-01-31cinterion: fix warnings with -Wimplicit-fallthroughAleksander Morgado
cinterion/mm-broadband-bearer-cinterion.c: In function ‘dial_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:393:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 393 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:396:5: note: here 396 | case DIAL_3GPP_CONTEXT_STEP_AUTH: { | ^~~~ cinterion/mm-broadband-bearer-cinterion.c:419:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 419 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:422:5: note: here 422 | case DIAL_3GPP_CONTEXT_STEP_START_SWWAN: { | ^~~~ cinterion/mm-broadband-bearer-cinterion.c: In function ‘disconnect_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:613:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 613 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:615:5: note: here 615 | case DISCONNECT_3GPP_CONTEXT_STEP_STOP_SWWAN: { | ^~~~
2020-01-31cinterion: fix warnings with -Wswitch-defaultAleksander Morgado
cinterion/mm-broadband-bearer-cinterion.c: In function ‘dial_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:370:5: error: switch missing default case [-Werror=switch-default] 370 | switch (ctx->step) { | ^~~~~~ cinterion/mm-broadband-bearer-cinterion.c: In function ‘disconnect_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:610:5: error: switch missing default case [-Werror=switch-default] 610 | switch (ctx->step) { | ^~~~~~
2020-01-31cinterion: fix warnings with -Wswitch-enumAleksander Morgado
cinterion/mm-broadband-modem-cinterion.c: In function ‘common_create_bearer’: cinterion/mm-broadband-modem-cinterion.c:1699:5: error: enumeration value ‘FEATURE_SUPPORT_UNKNOWN’ not handled in switch [-Werror=switch-enum] 1699 | switch (self->priv->swwan_support) { | ^~~~~~ ...
2020-01-31cinterion: fix warnings with -Wimplicit-fallthroughAleksander Morgado
cinterion/mm-shared-cinterion.c: In function ‘disable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:414:22: error: this statement may fall through [-Werror=implicit-fallthrough=] 414 | ctx->gps_step++; | ~~~~~~~~~~~~~^~ cinterion/mm-shared-cinterion.c:417:5: note: here 417 | case DISABLE_LOCATION_GATHERING_GPS_STEP_SGPSS: | ^~~~
2020-01-31cinterion: fix warnings with -Wswitch-defaultAleksander Morgado
cinterion/mm-shared-cinterion.c: In function ‘disable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:412:5: error: switch missing default case [-Werror=switch-default] 412 | switch (ctx->gps_step) { | ^~~~~~ cinterion/mm-shared-cinterion.c: In function ‘enable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:665:5: error: switch missing default case [-Werror=switch-default] 665 | switch (ctx->gps_step) { | ^~~~~~
2020-01-31cinterion,helpers: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
CC cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_single’: cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 749 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" } | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_multiple’: cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 764 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 765 | { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_complex’: cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 781 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 782 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" }, |