Commit Graph
2182 Commits
Author SHA1 Message Date
Aleksander Morgado 663017a3d2 sms: clear generated parts when storing/sending fails 2013-10-25 19:47:20 +02:00
Aleksander Morgado bd05787b51 sms-qmi: check whether the modem supports the specific SMS type 2013-10-25 19:47:20 +02:00
Aleksander Morgado b728b14efb sms: only set concat reference on multipart messages 2013-10-25 19:47:19 +02:00
Aleksander Morgado 9ed42af537 sms: handle CDMA SMS part creation 2013-10-25 19:47:19 +02:00
Aleksander Morgado 7a56b143aa sms-qmi: handle CDMA SMS messages 2013-10-25 19:47:19 +02:00
Aleksander Morgado 2eb5e0d578 sms-part-cdma: new CDMA SMS creator
Currently very limited:
 * Only WMT teleservice.
 * Only DMTF-encoded numbers.
 * Only either raw binary data or ASCII-7 text.
2013-10-25 19:47:19 +02:00
Aleksander Morgado cadbc0412d sms-part-3gpp: ensure PDU type in part is the correct one when building SUBMIT 2013-10-25 19:47:19 +02:00
Aleksander Morgado 3a6bdabcdf sms-part-cdma: consolidate logging 2013-10-25 19:47:19 +02:00
Aleksander Morgado 49ab6ce980 sms-part-cdma: read 7-bit ASCII text or raw data 2013-10-25 19:47:19 +02:00
Aleksander Morgado aba7efb615 broadband-modem-qmi: add CDMA SMS parts if found 2013-10-25 19:47:19 +02:00
Aleksander Morgado e493292b7a tests: new CDMA SMS part tester 2013-10-25 19:47:19 +02:00
Aleksander Morgado c440f121cc tests: rename 3GPP SMS part tester 2013-10-25 19:47:19 +02:00
Aleksander Morgado 5ecdae8dc8 sms-part-cdma: new CDMA SMS parser 2013-10-25 19:47:18 +02:00
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 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 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
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
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
Thieu Le f9a4f87d52 iface-modem-3gpp: add SubscriptionState property 2013-10-09 09:59:42 +02: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 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
Ben Chan aa74ea1aa6 iface-modem: fix MODEM_STATE_IS_INTERMEDIATE macro 2013-09-18 08:40:04 +02: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
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
Dan Williams 11a7e3dfdf core: add helper for parsing and validating the ICCID 2013-09-10 09:42:36 +02:00
Aleksander Morgado ac343d390b iface-modem-oma: fix OMA session state reporting
Reported by Arman Uguray <armansito@google.com>
2013-09-09 10:20:42 +02:00
Aleksander Morgado 03dc346add broadband-modem-qmi: implement OMA CancelSession() 2013-09-09 10:19:21 +02:00
Aleksander Morgado 76835446eb iface-modem-oma: ensure the session id is known when accepting/rejecting it 2013-09-09 10:19:20 +02:00
Aleksander Morgado 3ba2fee6fc broadband-modem-qmi: never add UNKNOWN OMA session types to the pending list 2013-09-09 10:19:20 +02:00
Aleksander Morgado 461d75dae9 broadband-modem-qmi: implement OMA AcceptNetworkInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 0c7def2f34 broadband-modem-qmi: implement OMA StartClientInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 72be4f1d57 broadband-modem-qmi: implement OMA Setup() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 959c7b9cde broadband-modem-qmi: implement OMA feature loading 2013-09-09 10:19:20 +02:00
Aleksander Morgado e6a7c85661 broadband-modem-qmi: handle OMA indications 2013-09-09 10:19:20 +02:00
Aleksander Morgado df47f1ac8f broadband-modem-qmi: check support for OMA capabilities 2013-09-09 10:19:18 +02:00