Commit Graph

7297 Commits

Author SHA1 Message Date
Aleksander Morgado
7db17b64a3 sms-part: handle CDMA teleservice ID and service category 2013-10-25 19:47:18 +02:00
Aleksander Morgado
df986c076d sms: split SMS part handling into common and 3GPP-specific 2013-10-25 19:47:18 +02:00
Aleksander Morgado
e90ff4155c api,header: added new CDMA-specific 'MMSmsDeliveryState' enumeration values 2013-10-25 19:47:18 +02:00
Aleksander Morgado
0bb91ce53d api: add 'ServiceCategory' property to the SMS interface
Will be used in 3GPP2 SMS messages.
2013-10-25 19:47:16 +02:00
Aleksander Morgado
d0fb94c49f api: add 'TeleserviceId' property to the SMS interface
Will be used in 3GPP2 SMS messages.
2013-10-25 19:46:37 +02:00
Aleksander Morgado
2864e777ae cli,sms: 'class' and 'smsc' are 3GPP specific 2013-10-25 19:36:14 +02:00
Aleksander Morgado
13595dcd7f api,introspection: minor indentation fixes in 'Validity' property definition 2013-10-25 19:36:14 +02:00
Aleksander Morgado
1ebbd16f98 api,header: added new CDMA-specific 'MMSmsPduType' enumeration values 2013-10-25 19:36:14 +02:00
Aleksander Morgado
c37f94ffd0 broadband-modem-qmi: SM storage not supported in CDMA-only modems 2013-10-25 19:36:14 +02:00
Aleksander Morgado
cb42a80b1e broadband-modem-qmi: also request to read 3GPP2 SMS 2013-10-25 19:36:14 +02:00
Ben Chan
9a9638ef20 iface-modem: remove unnecessary G_SIMPLE_ASYNC_RESULT() cast
This patch removes an unnecessary G_SIMPLE_ASYNC_RESULT() cast of the
'result' field, which is already of type GSimpleAsyncResult, of
InternalLoadUnlockRequiredContext.
2013-10-24 17:39:59 +02:00
Aleksander Morgado
5dc6db1962 libmm-glib: fix some more introspection annotations 2013-10-24 17:38:36 +02:00
Aleksander Morgado
e1c0621b09 libmm-glib: fix several introspection annotations 2013-10-24 17:16:33 +02:00
Ben Chan
babc4aa259 broadband-modem: remove unnecessary G_SIMPLE_ASYNC_RESULT() casts
This patch removes unnecessary G_SIMPLE_ASYNC_RESULT() casts of the
'result' field, which is already of type GSimpleAsyncResult, of
InitializeContext, EnablingContext and DisablingContext.
2013-10-24 17:09:46 +02:00
Ben Chan
686caef536 huawei: handle pending network-initiated disconnection in disconnect_3gpp
If a client-initiated disconnection attempt is issued while a
network-initiated disconnection is still pending, the latter may
interfere with the former. Also, when the client-initiated disconnection
attempt fails but the bearer status is reported as 'disconnected', the
pending network-initiated disconnection is not cleared and may result
in an assertion when a connection attempt is issued.

This patch addresses the issue by clearing any pending network-initiated
disconnection before proceeding with a client-initiated disconnection.
2013-10-24 16:44:05 +02:00
Dan Williams
613155cb2e broadband-modem: report signal quality as 0 when no service/unknown/etc
Instead of using the NO_NETWORK error, which is only ever read
internally by ModemManager and not very useful when reading quality,
just report signal quality as zero.  Before MM 1.0, the signal quality
could be explicitly requested by clients, so the NO_NETWORK error was of
some use, but now that the quality is updated automatically by MM and is
a property instead of a D-Bus method call, the error is pointless.
2013-10-23 19:39:04 -05:00
Prathmesh Prabhu
f81a3fc0b4 broadband-modem: mark SIM provisioned by default in load_subscription_state
load_subscription_state is called only after a successful registration, so the
default behaviour should be to mark the SIM as provisioned.
This default behaviour is needed because it is not possible for plugins to
detect a successful registration state during the registration update itself.
So, this function is the first place where a plugin can detect a successful
registration update.
2013-10-20 17:13:50 +02:00
Ben Chan
18053540ea huawei: handle unquoted strings in ^SYSINFOEX response
The original sysinfoex_parse() in MMBroadbandModemHuawei does not handle
unquoted <sysmode_name> and <submode_name> fields in ^SYSINFOEX responses,
which are sen on some Huawei modems (e.g. E303). This patch moves the
^SYSINFOEX parsing code to mm-modem-helpers-huawei.c, fixes the regex for
handling unquoted strings in ^SYSINFOEX responses, and adds unit tests.
2013-10-20 17:01:59 +02:00
Ben Chan
49d4163a2b huawei: fix ^SYSINFO parsing
The original sysinfo_parse() in MMBroadbandModemHuawei incorrectly sets
'out_sys_submode_valid' to TRUE even when <sys_submode> is not present
in a ^SYSINFO response. This patch moves the code to
mm-modem-helpers-huawei.c, fixes the regex for parsing ^SYSINFO
responses, and adds unit tests.
2013-10-20 17:01:51 +02:00
Aleksander Morgado
e529cd3212 build: ignore plugin testers 2013-10-10 08:34:52 +02:00
Prathmesh Prabhu
09ea458f78 altair-lte: obtain subscription state of SIM from registration failure code
This patch uses the extended error code after a registration failure to
determine if the SIM in the relevant modem is associated with a non-provisioned
account. It uses the standard AT+CEER command, but the implementation is
restricted to the altair plugin.
2013-10-10 08:29:56 +02:00
Aleksander Morgado
92a2953e93 docs: fixed a couple of issues regarding the new MMModem3gppSubscriptionState enum 2013-10-09 10:19:21 +02:00
Thieu Le
f9a4f87d52 iface-modem-3gpp: add SubscriptionState property 2013-10-09 09:59:42 +02:00
Aleksander Morgado
564b3610fd TODO: remove already implemented or no longer applicable items 2013-10-08 10:15:57 +02:00
Thieu Le
a006761c71 novatel-lte: abort connect request if call failed
Change-Id: Iae16ec87e12aaaf314b7e66b2f9c72a13251e352
2013-10-01 12:16:35 -05:00
Ben Chan
b5ef861d12 modem-helpers,sim: auto-detect if ICCID response is character swapped
This patch modifies mm_3gpp_parse_iccid() to auto-detect if an ICCID
response is character swapped or not by comparsing the major industry
identifier part of the ICCID response to the known value (89) for
telecommunication purposes. This addresses the issue where the same AT
command (e.g. AT^ICCID used by the huawei plugin) does not report ICCID
in a consistent format.
2013-09-26 20:23:51 +02:00
Ben Chan
b786ac0deb serial-port: ensure GCancellable handler is disconnected when serial port is closed 2013-09-26 09:22:33 +02:00
Aleksander Morgado
2a611c3856 cinterion: support QMI-based Cinterion PLXX and PHXX modules
E.g. with a Cinterion PLS8 LTE modem:

  $ sudo mmcli -m 0

  /org/freedesktop/ModemManager1/Modem/0 (device id '0042872f6597b3d772a3d9d3cd6f14f152af8a0b')
    -------------------------
    Hardware |   manufacturer: 'QUALCOMM INCORPORATED'
             |          model: '0'
             |       revision: 'M9615A-CETWMAZM-2.0.19015  1  [Jan 31 2013 00:00:00]'
             |      supported: 'gsm-umts
             |                  lte
             |                  gsm-umts, lte'
             |        current: 'gsm-umts, lte'
             |   equipment id: 'unknown'
    -------------------------
    System   |         device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7'
             |        drivers: 'option1, qmi_wwan'
             |         plugin: 'Cinterion'
             |   primary port: 'cdc-wdm0'
             |          ports: 'ttyUSB2 (at), cdc-wdm0 (qmi), wwp0s29u1u7i4 (net)'
    -------------------------
    Numbers  |           own : 'unknown'
    -------------------------
    Status   |           lock: 'sim-pin'
             | unlock retries: 'sim-pin (3), sim-pin2 (2), sim-puk (10), sim-puk2 (10)'
             |          state: 'locked'
             |    power state: 'on'
             |    access tech: 'unknown'
             | signal quality: '0' (cached)
    -------------------------
    Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'
             |        current: 'allowed: 2g, 3g, 4g; preferred: none'
    -------------------------
    Bands    |      supported: 'cdma-bc15-aws, dcs, egsm, u2100, u1800, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx'
             |        current: 'cdma-bc15-aws, dcs, egsm, u2100, u1800, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx'
    -------------------------
    IP       |      supported: 'ipv4, ipv6, ipv4v6'
    -------------------------
    SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'
2013-09-25 17:46:31 +02:00
Aleksander Morgado
0dd93549a1 blacklist: add Bluegiga BLE112B
https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1229748
2013-09-24 16:50:59 +02:00
Aleksander Morgado
2f7ec3df8c blacklist: add some missing commas 2013-09-24 16:49:13 +02:00
Arun Raghavan
6774d93aca blacklist: Add Adafruit Flora
The official PID is 8004, but I've seen the device sometimes turn up
with a 0004, so adding both to be safe.

https://bugzilla.gnome.org/show_bug.cgi?id=708644
2013-09-23 21:39:15 +02:00
Aleksander Morgado
21a5aaf4fe huawei: delay processing of network-initiated disconnection
Originally developed by:
  Prathmesh Prabhu <pprabhu@chromium.org>
  Ben Chan <benchan@chromium.org>

Huawei MU736 prematurely fires a ^NDISSTAT unsolicited message upon a
network-initiated disconnection. The modem can go into a bad state if a
reconnect attempt happens before the disconnection completes. This patch works
around the issue by delaying the reporting of the disconnection.
2013-09-23 08:29:21 +02:00
Aleksander Morgado
d818d9fe06 bearer: consolidate unsolicited connection status reports
Originally developed by:
  Ben Chan <benchan@chromium.org>

This patch replaces mm_bearer_report_disconnection() with a more generic
mm_bearer_report_connection_status(), which allows reporting any
connection status of a bearer. This further allows getting rid of those
custom report_connection_status functions in plugic specific bearer
subclasses.

Note that while plugin-specific implementations can receive multiple
'MMBearerConnectionStatus' values, the generic implementation is only allowed
to receive DISCONNECTED. Plugins need to make sure that they process all the
other status values, and only report DISCONNECTED to the parent when required.

MBM:
  The MBM bearer implementation of report_connection_status() expects either
  CONNECTED or DISCONNECTED. If any of these is received and there is an ongoing
  connection attempt, the corresponding operation will be completed. If there is
  no connection attempt, we will just handle the DISCONNECTED state, calling the
  parent method to notify that the modem got network-disconnected.

Icera:
  The Icera bearer implementation of report_connection_status() expects either
  CONNECTED, CONNECT FAILED or DISCONNECTED. If any of these is received and
  there is an ongoing connection or disconnection attempt, the corresponding
  operation will be completed. If there is no connection or disconnection
  attempt, we will just handle the CONNECT FAILED and DISCONNECTED states,
  calling the parent method (always with DISCONNECTED) to notify that the modem
  got network-disconnected.

Option/HSO:
  The Option/HSO bearer implementation of report_connection_status() expects
  either CONNECTED, CONNECTION FAILED or DISCONNECTED. If any of these is
  received and there is an ongoing connection or disconnection attempt, the
  corresponding operation will be completed. If there is no connection or
  disconnection attempt, we will just handle the CONNECTION FAILED and
  DISCONNECTED states, calling the parent method (always with DISCONNECTED) to
  notify that the modem got network-disconnected.

Huawei:
  The Huawei bearer implementation of report_connection_status() expects either
  CONNECTED or DISCONNECTED. These messages are not used to process pending
  connection or disconnection attempts; so if they are received while one of
  these is on-going, it will just be ignored. CONNECTED reports are also
  ignored, so we will just handle the DISCONNECTED state, calling the parent
  method to notify that the modem got network-disconnected.

Altair-LTE:
  The Altair-LTE bearers will only report DISCONNECTED on network-disconnected
  cases. There is no custom report_connection_status().

Novatel-LTE:
  The Novatel-LTE bearers will only report DISCONNECTED on network-disconnected
  cases. There is no custom report_connection_status().
2013-09-23 08:29:15 +02:00
Aleksander Morgado
6b4602a335 broadband-modem-qmi: make 'internal' errors on pin check retriable
When we get an internal error while checking the lock status, tell the upper
layers that we can retry the check. It's been observed that this internal error
may be issued not only when e.g. there is no SIM, but also when the SIM is not
yet fully ready.
2013-09-19 09:33:08 -05:00
Aleksander Morgado
13c7319bff iface-modem: consolidate new unlock required check with retries
The new internal_load_unlock_required() method will take care of running the
subclassed load_unlock_required(), if available, and also retry the check up
to 6 times.

This method will be used both by the standard unlock required check and by the
check within the current capabilities loading for multimode devices.
2013-09-19 09:33:08 -05:00
Lionel Landwerlin
43d1c904e6 plugins: fix linkage of huawei test program
https://bugzilla.gnome.org/show_bug.cgi?id=704481
2013-09-19 11:25:57 +02:00
Lionel Landwerlin
b330752432 plugins: add missing linker flags
https://bugzilla.gnome.org/show_bug.cgi?id=704481
2013-09-19 11:25:41 +02:00
Ben Chan
2b20264215 huawei: handle disconnection via ^NDISSTAT unsolicited message
This patch changes MMBroadbandModemHuawei to use ^NDISSTAT unsolicited
messages to handle network-initiated disconnection. As a ^NDISSTAT
unsolicited message is similar to a ^NDISSTATQRY response, the patch
extends the ^NDISSTATQRY parser code to handle both ^NDISSTAT and
^NDISSTATQRY responses.
2013-09-18 11:37:19 +02:00
Ben Chan
aa74ea1aa6 iface-modem: fix MODEM_STATE_IS_INTERMEDIATE macro 2013-09-18 08:40:04 +02:00
Ben Chan
1eee8824fd altair-lte: use mm_base_modem_at_command_full{,_finish} correctly
This patch fixes own_enable_unsolicited_events_ready() to use
mm_base_modem_at_command_full_finish(), instead of
mm_base_modem_at_sequence_full_finish(), as the %STATCM=1 command is
issued via mm_base_modem_at_command_full().
2013-09-17 08:57:32 +02:00
Ben Chan
9aced8311b huawei: ignore ^CONNECT unsolicited messages 2013-09-17 08:55:50 +02:00
Dan Williams
0755beff07 mtk: update udev rules to always match both VID/PID together
See commit c79d266e62.

    If the rules to tag specific USB interface numbers only apply on the PID, we'll
    end up seeing that if the port has a parent with another PID, and that other
    PID also has a rule, port will get tagged multiple times.
2013-09-16 11:54:16 -05:00
Dan Williams
872bd3e837 mtk: add D-Link DWM-156 udev rules
For HW version A5 and possibly later, which are based on MediaTek
chipsets instead of Qualcomm ones.
2013-09-16 11:54:16 -05:00
Quentin.Li
c22eca999b mtk: add plugin for various MediaTek devices
Signed-off-by: Quentin.Li <snowmanli88@gmail.com>
2013-09-16 11:53:58 -05:00
Ben Chan
5d8efff291 iface-modem: free GError when interface initialization is cancelled
This patch fixes an assertion failure 'ctx->fatal_error == NULL' in
initialization_context_complete_and_free(), which happens if
'fatal_error' of the initialization context is set during the modem
interface initialization and the initialization is later cancelled.
2013-09-16 07:51:53 +02:00
Ben Chan
8a857b7b26 broadband-modem: use InProgress instead of WrongState when appropriate
This patch changes MMBroadbandModem to report an
org.freedesktop.ModemManager1.Error.Core.InProgress error, instead of an
org.freedesktop.ModemManager1.Error.Core.WrongState error, when one
tries to initialize a modem that is already being initialized, or to
enable a modem that is already being enabled.
2013-09-13 11:00:07 +02:00
Bjørn Mork
e446037aa7 mbm: add another H5321gw ID
This device ID is used in a Lenovo Thinkpad T430.

Link: http://bugs.debian.org/705942
Reported-by: Etienne Bagnoud <etienne.bagnoud@irovision.ch>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-09-11 22:16:42 +02:00
Aleksander Morgado
e755181fd5 broadband-modem: only used CIND? for signal quality if actually reported
The Huawei MU736 supports CIND? but not for signal quality reporting:

AT+CIND=?
   +CIND : ("call",(0,1)), ("message",(0,1)), ("roam",(0,1))
   OK

AT+CIND?
   +CIND:0,0,0
   OK

Which ended up with the following during execution:

ModemManager[3044]: (ttyUSB1) Could not parse CIND signal quality results;
                              signal index (255) outside received range (0-3)

Just avoid this, and make CIND? be used for signal quality retrieval only if
(1) CIND? is actually supported and (2) CIND? reports signal quality
information.
2013-09-11 17:08:27 +02:00
Aleksander Morgado
0ff4da71e3 error-helpers: don't warn when unknown errors are found
Just add the messages with debug level, so that they don't get reported at
syslog. Having this kind of warnings in syslog is not useful, specially because
we wouldn't know which was the specific command that issued the warning. Errors
due to critical issues will anyway be reported in syslog in some way or another.
2013-09-11 17:00:43 +02:00
Aleksander Morgado
4f451cf767 qmi-port: use the new qmi-proxy if available 2013-09-10 18:47:35 +02:00