Commit Graph

6276 Commits

Author SHA1 Message Date
Aleksander Morgado
e5ac843a7c api,compat: fix warnings during doc build
We just move the MM_DISABLE_DEPRECATED check to after the
MM_DEPRECATED symbol definition, because gtkdoc-scan gets pretty
confused, likely due to the symbol ending with the "_DEPRECATED"
suffix.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/91
2019-10-24 14:20:38 +02:00
Aleksander Morgado
cc7fd0ad23 docs,api: add missing reference to ID_MM_PORT_TYPE_AUDIO 2019-10-24 13:05:25 +02:00
Aleksander Morgado
cf14fba5b7 docs,api: provide per-version indices 2019-10-24 13:02:37 +02:00
Aleksander Morgado
f3d1d50bf4 introspection,firmware: avoid <term> in <para>
DOC   Building HTML
Element term in namespace '' encountered in para, but no template matches.
  DOC   Fixing cross-references
2019-10-24 12:00:29 +02:00
Aleksander Morgado
866b4e7686 introspection,voice: untabify 2019-10-24 11:57:55 +02:00
Aleksander Morgado
465067f0c3 introspection,sim: untabify 2019-10-24 11:57:26 +02:00
Krzysztof Drobinski
ef30dd800c telit: increase timeout for AT#REBOOT
It was observed that sporadically it may take more than 5 seconds for modem to
respond to AT#REBOOT. Increase the timeout on AT command to not report
unnecessary errors to the user.
2019-10-21 11:40:39 +02:00
Aleksander Morgado
4a0de586db base-call: if start() fails, always terminated 2019-10-17 10:51:50 +02:00
Aleksander Morgado
2c0281aac9 call: disallow non-emergency calls when in emergency-only state 2019-10-17 10:51:50 +02:00
Aleksander Morgado
d6f9d5e9ec sim: load emergency numbers from EF_ECC 2019-10-17 10:51:50 +02:00
Aleksander Morgado
1f6c006976 api,sim: new 'Emergency Numbers' property 2019-10-17 08:31:46 +00:00
Aleksander Morgado
45cf1ba20a cinterion: don't cache voice support check AT commands
The result of these commands may be different before and after SIM-PIN
unlock, so never cache them.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
57e7841308 iface-modem-voice: always completely reinitialize the interface
The supported voice features may be different before and after SIM-PIN
unlock, so do not cache the result of the support check operation.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
98066d24b7 broadband-modem: don't cache voice support check AT commands
The result of these commands may be different before and after SIM-PIN
unlock, so never cache them.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
5fef14176a broadband-modem: ignore SIM-related errors in voice support check 2019-10-17 08:31:46 +00:00
Aleksander Morgado
6347a7d783 base-call: catch terminated errors before ATD replies
If we get one of the in-call termination errors before ATD replies OK,
we need to cancel the start() operation right away and return an
error to the caller.

Otherwise, the Call will be reported as "terminated" right away, but
the caller would not get an error back until 90s later:

    $ sudo mmcli --call 0 --start
    error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.ResponseTimeout: Serial command timed out'
2019-10-17 08:31:46 +00:00
Aleksander Morgado
eaf6654750 broadband-modem: keep ports context open while in-call
This is so that we can receive and process URCs even if the modem is
not fully enabled yet.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
c99f767f04 broadband-modem: reorder generic port context logic in sources 2019-10-17 08:31:46 +00:00
Aleksander Morgado
ba1f3af342 broadband-modem: new generic ports_context_open()
Used during initialization, enabling and sim hotswap context setup.
The secondary AT and QCDM ports will only be open during enabling.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
7c8d0d1718 broadband-modem: skip redundant ATE0/AT+CMEE=1 settings
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>'
2019-10-17 08:31:46 +00:00
Aleksander Morgado
657833a400 voice,api: new 'EmergencyOnly' boolean flag
This new flag allows users of the API to know whether general purpose
voice calls are allowed or otherwise only voice calls to the
registered emergency numbers should be performed.

ModemManager won't really do any distinction between emergency and
non-emergency calls at this point, this flag is just an early
indication for the user of the API that no normal voice call should be
attempted.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
7971844318 iface-modem-voice: all methods available even if not enabled 2019-10-17 08:31:46 +00:00
Aleksander Morgado
ed3a1264af iface-modem-voice: call list setup during initialization
We're going to allow emergency calls at any point, so prepare the call
list handling logic during initialization, not when the modem is first
enabled.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
00a39cd060 broadband-modem: voice interface available in failed/locked state 2019-10-17 08:31:46 +00:00
Aleksander Morgado
27405a44ca broadband-modem: new initialization step when failed/locked
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.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
d555c4c45c iface-modem-simple: allow single ongoing Connect() attempt
We only allow one single Simple.Connect() attempt at a time. If more
than one arrives, the second and next ones will be forbidden.

The ongoing connection attempt can now always be cancelled via
Simple.Disconnect(), not only *after* the bearer object connection has
started. i.e. if Simple.Disconnect() is called e.g. while waiting to
be registered, we would also be cancelled properly.
2019-10-17 08:07:10 +00:00
Aleksander Morgado
f228d0dd6f base-bearer,iface-modem-simple: log user requests to connect/disconnect 2019-10-17 08:07:10 +00:00
Aleksander Morgado
667d1613a8 x22x: add support for the Alcatel X602D
As discussed in https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/130

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/130
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/129
2019-10-17 09:27:21 +02:00
Aleksander Morgado
407cfa0cd7 x22x: ignore unhandled URCs in the Alcatel X602D 2019-10-17 09:27:11 +02:00
Aleksander Morgado
f30d3d46b9 ci: ignore errors on apt update
Just to avoid e.g. invalid signature errors. The important command is
the actual install of required packages.
2019-10-16 18:33:50 +02:00
Aleksander Morgado
5316e9e4e5 simtech: handle 'MISSED_CALL' URCs
https://source.puri.sm/Librem5/ModemManager/issues/6
2019-10-16 18:04:47 +02:00
Aleksander Morgado
eb66e8ae68 simtech: setup USB audio channel when in-call
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-16 17:50:16 +02:00
Aleksander Morgado
e3a1364ddc core: allow flagging ports as 'audio'
Instead of flagging them as 'ignored' so that they aren't probed, we
can also flag them as 'audio' now, so that the logic knows which port
to report as used for audio in the Call object.
2019-10-15 13:19:10 +02:00
Aleksander Morgado
d61cb4a21c simtech: handle '+RXDTMF' URCs reporting DTMF tones 2019-10-15 11:14:40 +02:00
Aleksander Morgado
345922caa1 simtech: handle non-standard '+CRING' URCs
The SIM7600E ends up emitting these URCs with too many <CR>s, and the
generic +CRING handler doesn't catch them, interfering with other
actions, e.g.:

  $ sudo mmcli --call 1 --accept
  error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response '+CRING: VOICE

  +CRING: VOICE''
2019-10-15 11:14:40 +02:00
Aleksander Morgado
395b22178c simtech: handle 'VOICE CALL' URCs
Just processing and parsing them for now, so that they don't interfere
with other commands:

  $ sudo mmcli --call 1 --accept
  error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response '

  VOICE CALL: BEGIN''
2019-10-15 10:30:00 +02:00
Aleksander Morgado
1a17996ccb iface-modem-voice: ignore unknown calls reported as terminated
If the full list reporting includes calls in terminated state (e.g. on
modems managed by the Simtech plugin), then ignore those no longer
known to us, because it just means that they have already been
processed.

    <debug> [1571060859.227759] (ttyUSB2): <-- '<CR><LF>+CLCC: 1,0,6,0,0,"639335936",129<CR><LF>'
    <debug> [1571060859.227890] Reported 1 ongoing calls
    <debug> [1571060859.227913] call at index 1: direction outgoing, state terminated, number 639335936
    <debug> [1571060859.227946] call info matched (matched direction/state no, matched index yes, matched terminated no) with call at '/org/freedesktop/ModemManager1/Call/1'
    <debug> [1571060859.227963]   state updated: terminated
    <info>  [1571060859.227978] Call state changed: dialing -> terminated (unknown)
    <debug> [1571060859.228173] (ttyUSB3): <-- '<CR><LF>+CLCC: 1,0,6,0,0,"639335936",129<CR><LF>'
    <debug> [1571060859.228234] Reported 1 ongoing calls
    <debug> [1571060859.228251] call at index 1: direction outgoing, state terminated, number 639335936
    <warn>  [1571060859.228274] unexpected outgoing call to number '639335936' report2ed in call list: state terminated
2019-10-14 15:54:56 +02:00
Aleksander Morgado
089faef88c modem-helpers: support reporting 'terminated' call state in +CLCC 2019-10-14 15:45:18 +02:00
Aleksander Morgado
89c9566ede simtech: implement +CLCC URC based call list management 2019-10-14 15:32:20 +02:00
Aleksander Morgado
b99597b594 tests,helpers: minor alignment fix 2019-10-14 15:30:29 +02:00
Aleksander Morgado
d5d0ed0b24 tests: print MM logs only on verbose test mode
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
2019-10-14 15:30:27 +02:00
Aleksander Morgado
03223fe786 tests,sms: print PDUs only on verbose test mode
Therefore, avoid needing TEST_SMS_PART_ENABLE_TRACE build symbol.
2019-10-14 15:30:03 +02:00
Aleksander Morgado
3b18d21ba5 tests: avoid g_print() and use g_debug() instead
The debug-level logs won't be printed e.g. during 'make check', but
will be included when running the tester manually.
2019-10-14 15:30:03 +02:00
Aleksander Morgado
cc4e7f6cfd shared-qmi: fix NAS SSP support check during supported caps loading 2019-10-14 12:44:47 +02:00
Aleksander Morgado
c8d715e5f0 api: set enum values not part of the API as private
So that we can avoid gtk-doc complaining about them:

  2019-10-14 10:46:59,583:common.py:ParseEnumDeclaration:427:WARNING:Cannot parse enumeration member:
  ../../../include/ModemManager-enums.h:924: warning: Value description for MMModemLocationSource::MM_MODEM_LOCATION_SOURCE_FIRST is missing in source code comment block.
  ../../../include/ModemManager-enums.h:924: warning: Value description for MMModemLocationSource::MM_MODEM_LOCATION_SOURCE_LAST is missing in source code comment block.
2019-10-14 11:05:50 +02:00
Eric Caruso
33140e1fc3 mm-broadband-modem-mbim: fix incorrect log message
The log message would display a value based on combining the
notification flags with a CID, which doesn't make sense. Test
against the flag for this notification instead.
2019-10-12 04:23:26 +00:00
Aleksander Morgado
6cbeb96aa0 simtech: +CNSMOD value may have multiple digits
We don't expect them in the set of values we support, but they may
happen according to the spec.
2019-10-11 09:24:22 +00:00
Aleksander Morgado
e1d18afe39 simtech: add support for reporting LTE 2019-10-11 09:24:22 +00:00
Aleksander Morgado
61f3c3c8c4 simtech: rework access tech value mapping 2019-10-11 09:24:22 +00:00
Aleksander Morgado
7fcefc7af0 simtech: rework enabling/disabling unsolicited events
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-11 09:24:22 +00:00