Age | Commit message (Collapse) | Author |
|
The logic in open_ports_initialization() was included in the generic
ports_context_open() method, and the method was not being used anywhere.
|
|
mm-broadband-modem.c: In function ‘setup_ports’:
mm-broadband-modem.c:9955:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
9955 | for (j = 0; j < array->len; j++) {
| ^
...
|
|
Switch to use the helper methods to parse strings and numbers from
match info results.
Also, avoid warnings with -Wsign-compare.
|
|
mm-broadband-modem.c: In function ‘access_tech_and_mask_new’:
mm-broadband-modem.c:2431:9: error: switch missing default case [-Werror=switch-default]
2431 | switch (ctx->sysmode) {
| ^~~~~~
|
|
mm-broadband-modem.c: In function ‘cgev_process_detach’:
mm-broadband-modem.c:2845:5: error: enumeration value ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch [-Werror=switch-enum]
2845 | switch (type) {
| ^~~~~~
...
|
|
The GError would be leaking.
|
|
mm-broadband-modem.c: At top level:
mm-broadband-modem.c:551:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
551 | { "+CGSM", MM_MODEM_CAPABILITY_GSM_UMTS },
| ^~~~~~~
...
|
|
mm-broadband-modem.c: In function ‘modem_create_bearer’:
mm-broadband-modem.c:421:42: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
421 | MMBearerProperties *properties,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
mm-broadband-modem.c:132:20: note: shadowed declaration is here
132 | static GParamSpec *properties[PROP_LAST];
| ^~~~~~~~~~
|
|
If the modem (e.g. u-blox LARA) returns a "Not supported" error when
attempting to run +COPS=1,2,<mccmnc> with the MCCMNC encoded in ASCII
(and current charset is different, e.g. UCS2), then attempt to re-run
the same command with the MCCMNC encoded in the explicit current
charset.
<debug> (ttyACM0): --> 'AT+COPS=1,2,"21404"<CR>'
<debug> (ttyACM0): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'
<debug> Got failure code 4: Operation not supported
<debug> (ttyACM0): --> 'AT+COPS=1,2,"00320031003400300034"<CR>'
<debug> (ttyACM0): <-- '<CR><LF>+CME ERROR: 111<CR><LF>
|
|
If the charset selected via CSCS is UCS2, the modem may decide to
return all the strings in the +COPS=? response in UCS2:
<debug> (ttyACM0): --> 'AT+COPS=?<CR>'
<debug> (ttyACM0): <-- '<CR><LF>+COPS: (2,"004D006F007600690073007400610072","004D006F007600690073007400610072","00320031003400300037",7)
<debug> Found network '00320031003400300037' ('004D006F007600690073007400610072','004D006F007600690073007400610072'); availability: current, access tech: lte
|
|
|
|
The result of these commands may be different before and after SIM-PIN
unlock, so never cache them.
|
|
|
|
This is so that we can receive and process URCs even if the modem is
not fully enabled yet.
|
|
|
|
Used during initialization, enabling and sim hotswap context setup.
The secondary AT and QCDM ports will only be open during enabling.
|
|
These are already given in the logic behind the
"MM_PORT_SERIAL_AT_INIT_SEQUENCE" property:
(ttyACM1): --> 'ATE0<CR>'
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'ATV1<CR>'
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'AT+CMEE=1<CR>'
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'ATX4<CR>'
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'AT&C1<CR>'
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'ATE0<CR>' --> redundant
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
(ttyACM1): --> 'AT+CMEE=1<CR>' --> redundant
(ttyACM1): <-- '<CR><LF>OK<CR><LF>'
|
|
|
|
Instead of using the firmware step as fallback when the modem goes
into failed or locked state, use an independent step in the
initialization state machine, just to make it clearer.
|
|
Same as with the signal quality polling, we may want to disable
explicitly the access technology polling if we can rely on plugin
specific URCs for this purpose.
|
|
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
|
|
Not all modems support correctly +CIND URCs and +CMER settings.
|
|
|
|
|
|
Otherwise, the +CSQ reported signal quality will never change!
Fixes edc117406888f489d4ebd29b6d08ea67d60bb99c
|
|
The load_unlock_required() step will be automatically retried by the
generic interface logic unless some specific errors happen (e.g. it
won't be retried if a SIM missing error is received).
This patch allows telling the implementation of the method whether
this time being run is the last one before reporting a hard error or
not.
|
|
The Telit LE922 seems to take just a bit more than 3s to reply. Let's
increase it up to 10s to be on the safe side.
<debug> [1568385270.124866] (ttyUSB3): --> 'AT+CPIN?<CR>'
<debug> [1568385273.396659] Couldn't check if unlock required: 'Serial command timed out'
<warn> [1568385273.396847] Modem couldn't be initialized: Couldn't check unlock status: Serial command timed out
<info> [1568385273.397009] Modem: state changed (unknown -> failed)
<debug> [1568385273.397215] (ttyUSB3) device open count is 1 (close)
<debug> [1568385273.397268] Creating ports context for SIM hot swap
<debug> [1568385273.397289] (ttyUSB3) device open count is 2 (open)
<debug> [1568385273.397309] (ttyUSB4) opening serial port...
<debug> [1568385273.397676] (ttyUSB4): setting up baudrate: 57600
<debug> [1568385273.397699] (ttyUSB4): no flow control explicitly requested for device
<debug> [1568385273.397724] (ttyUSB4): port attributes not fully set
<debug> [1568385273.397760] (ttyUSB4) device open count is 1 (open)
<debug> [1568385273.397776] (ttyUSB4): running init sequence...
<debug> [1568385273.397856] Extended signal information reporting disabled
<debug> [1568385273.397927] Couldn't finish initialization in the current state: 'Modem is unusable, cannot fully initialize'
<debug> [1568385273.398432] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] exported modem at path '/org/freedesktop/ModemManager1/Modem/0'
<debug> [1568385273.398464] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] plugin: Telit
<debug> [1568385273.398484] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1] vid:pid: 0x1BC7:0x1040
<debug> [1568385273.398509] (ttyUSB3) device open count is 1 (close)
<debug> [1568385273.398546] (ttyUSB4): --> 'ATE0<CR>'
<debug> [1568385273.400412] (ttyUSB3): <-- '<CR><LF>+CPIN: READY<CR><LF><CR><LF>OK<CR><LF>'
<debug> [1568385273.404870] (ttyUSB4): <-- '<CR><LF>OK<CR><LF>'
|
|
|
|
|
|
The GSM supplementary services related changes, as well as the rework
done to manage calls per call id, is copyrighted by Purism SPC.
|
|
|
|
|
|
The in-call handlers will monitor events that report the call being
terminated.
|
|
Instead of providing a method to exclusively provide incoming call
updates, make it more generic so that we allow plugins to provide
state updates for any kind of call, not just incoming ones.
The logic to match the call info provided by URCs is updated so that
it can be reused also by the single call reports, in addition to the
full call list reports.
|
|
|
|
|
|
|
|
|
|
|
|
If the modem supports call list polling, we'll setup a timeout to poll
for the full call list periodically, in order to get detailed call
states.
The timeout is setup as soon as a new call is created, and it will be
kept enabled as long as there is a call being established (i.e. not
unknown, not terminated, not active).
|
|
|
|
|
|
|
|
|
|
The previous logic would end up returning an error if either +CLIP or
+CRC reported an error, and we should really avoid that, because our
setup is able to manage the voice calls even without those settings.
So, convert the logic into a small state machine and try to configure
the settings both in the primary and secondary ports, instead of just
in the primary one.
|
|
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)
|
|
|
|
|
|
|
|
We implement both loading the current configuration in use, as well as
automatically switching to a different one if a mapping file is
available.
|