100 Commits
Author SHA1 Message Date
Aleksander Morgado e9d016f088 huawei: setup unsolicited message handlers also in the AT cdc-wdm ports 2014-06-23 18:12:27 +02:00
Aleksander Morgado 75a5c48345 huawei: use the cdc-wdm port dialing if available
With the new 'huawei-cdc-ncm' driver in the kernel, we now may get a
/dev/cdc-wdm AT-capable port exposed by the Huawei device. If so, we must use
this port for NDISDUP dialling in order to get the network interface connected.
2014-06-23 18:12:27 +02:00
Aleksander Morgado 3914808120 zte: support for QMI-based modems
E.g. the ZTE MF190

[/dev/cdc-wdm1] QMI Device supports 4 services:
[/dev/cdc-wdm1]    ctl (1.2)
[/dev/cdc-wdm1]    wds (1.3)
[/dev/cdc-wdm1]    dms (1.2)
[/dev/cdc-wdm1]    nas (1.0)
2014-01-24 18:35:40 +01:00
Aleksander Morgado 52d34ce0db bearer-mbim: parse replies on failure
Based on a patch from: Bjørn Mork <bjorn@mork.no>

Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
2013-12-19 18:43:14 +01:00
Aleksander Morgado 004924b038 broadband-modem-qmi: fix segfault when using AT-fallback mode for messaging
The default broadband modem implementation doesn't have a method to disable
unsolicited messages for SMS.
2013-12-16 12:37:20 +01:00
Aleksander Morgado 5b078edc21 release: bump version to 1.1.900 (1.2-rc1)
Also bump soname of libmm-glib, as the interface has grown since the last tag.
2013-12-10 14:27:35 +01:00
Aleksander Morgado fc42b2df8c huawei: handle empty response to AT^SYSCFG=?
Some Huawei modems (e.g. E220) may give an empty response for AT^SYSCFG=?, even
if they do support the command. Handle this case by prividing a default fallback
format string when this happens.
2013-12-09 23:07:19 +01:00
Aleksander Morgado e81fdd07c3 huawei: new current mode setting based on the supported combinations 2013-12-09 23:07:19 +01:00
Aleksander Morgado c337f52e30 huawei: new current mode loading based on the supported combinations 2013-12-09 23:07:19 +01:00
Aleksander Morgado 02839b2e44 huawei: new ^SYSCFGEX? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 9ac136028b huawei: new ^SYSCFG? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 4e5c35a69f huawei: new ^PREFMODE? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 8cc3eff661 huawei: load supported modes, not just assume them 2013-12-09 23:07:19 +01:00
Aleksander Morgado ef526395df huawei: consolidate command support checks 2013-12-09 23:07:19 +01:00
Aleksander Morgado 47640a6507 huawei: new ^SYSCFGEX=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado 677dd7da91 huawei: new ^SYSCFG=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado ceb578a824 huawei: new ^PREFMODE=? test parser 2013-12-09 23:07:18 +01:00
Aleksander Morgado 0dcf609dcc huawei,tests: enable log traces in the tests 2013-12-09 23:07:18 +01:00
Aleksander Morgado c30a8f67ef base-modem: also release cdc-wdm ports 2013-11-22 15:00:52 +01:00
Aleksander Morgado a787d1bbb8 docs,libmm-glib: add missing methods for the new properties 2013-11-21 12:46:05 +01:00
Aleksander Morgado f7546ad824 introspection,api: new 'Messages' property in the Messaging interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 11:36:21 +01:00
Aleksander Morgado 7f442b777c introspection,api: new 'Bearers' property in the Modem interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 10:50:49 +01:00
Aleksander Morgado 5e7fee1d11 build: use 'g_cclosure_marshal_generic' by default
Avoid custom marshalers, and just use libffi-based 'g_cclosure_marshal_generic'.
2013-11-20 15:17:09 +01:00
Aleksander Morgado fe744b4534 base-modem: fix port validity checks 2013-11-20 15:00:07 +01:00
Aleksander Morgado 974408760c introspection,api: fix Messaging documentation
We don't have a Completed signal.
2013-11-15 19:35:17 +01:00
Aleksander Morgado 85d5d96824 port: remove 'carrier-detect' property
It is no longer used since commit 736aa0d2d.
2013-11-15 17:25:33 +01:00
Aleksander Morgado 1b3114a0f9 modem-helpers: handle +CGDCONT=? replies with single context
https://bugzilla.gnome.org/show_bug.cgi?id=708983
2013-11-01 15:50:12 +01:00
Aleksander Morgado 04b52d590f tests: enable logging if 'ENABLE_TEST_MESSAGE_TRACES' is defined 2013-11-01 15:50:09 +01:00
Aleksander Morgado deaeeec367 x22x: handle QMI modems
With some bits and pieces developed by Dan Williams <dcbw@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710439
2013-10-31 17:12:24 +01:00
Aleksander Morgado fcc2b1be2c altair-lte: fix LDFLAGS in the helper tests 2013-10-31 11:33:26 +01:00
Aleksander Morgado e9523a6abd huawei: clear only once the timeout to wait for the first interface
As soon as we get a match between the current interface being probed, and the
first expected interface to probe, clear the timeout. But this doesn't mean that
this interface being probed will be the correct one, so it may be the case that
we end up expecting a new first interface and probing another one.

With an example probably seen better...

Modem appears with interfaces 2, 3 and 4.

1. We first try to look for interface 0, which is not in the set:
  1.1. Probing interfaces 2, 3 and 4 get deferred.

2. First-interface timeout happens because interface 0 doesn't appear, so we
switch to wait for interface 1:
  2.1 Probing interfaces 2, 3 and 4 get deferred.

3. First-interface timeout happens because interface 1 doesn't appear, so we
switch to wait for interface 2:
  3.1. We get a match on interface 2, which exists. We now remove the
       first-interface timeout and start running the init sequence there.
  3.2. Probing interfaces 3 and 4 get deferred.

4. Init sequence in interface 2 fails, because it is not an AT port, so we
switch to wait for interface 3:
  3.1. We get a match on interface 3, which exists. We do *not* need to remove
now the first-interface timeout because this interface we are testing is
actually the second one which we tried.

So, just check whether the timeout exists or not, and if it exists remove it.
Yeah, this commit just fixes a warning at the end.
2013-10-30 20:18:11 +01:00
Aleksander Morgado 6a26ad7b53 blacklist: include the whole Openmoko VID 2013-10-30 16:12:06 +01:00
Aleksander Morgado b09044bcb3 plugin: for non-AT ports, don't expect vendor/product string probing
When running the pre-probing VID/PID filters, the ports were not filtered out if
the plugin had configured post-probing vendor/product string filters. But, these
post-probing filters are only applicable to AT ports.

From now on, this logic will not be applied to non-serial ports. In other words,
pre-probing VID/PID filters applied to non-serial ports will always result in
the port being filtered out or being allowed, regardless of any additional
vendor/product string post-probing filter configured by the plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=710437
2013-10-28 18:13:14 +01:00
Aleksander Morgado 9c2be510f6 build: ignore built translation files 2013-10-28 17:57:43 +01:00
Aleksander Morgado c65c01703b mtk: fix GOTO tag in udev rules 2013-10-28 17:51:02 +01:00
Aleksander Morgado adc7df200f sms-part-cdma,test: new tests for Latin and Unicode encodings 2013-10-25 19:49:57 +02:00
Aleksander Morgado c669464eec sms-part-cdma: fix log message 2013-10-25 19:49:56 +02:00
Aleksander Morgado 364df3106a sms-part-cdma: improve logging when creating PDUs 2013-10-25 19:49:56 +02:00
Aleksander Morgado 80f55923ed sms-part-cdma: support parsing SMS with Unicode encoding 2013-10-25 19:49:56 +02:00
Aleksander Morgado 66f134b7bd sms-part-cdma: support generating SMS with Latin or Unicode encodings 2013-10-25 19:49:56 +02:00
Aleksander Morgado 3174b7b73f sms-part-cdma: support receiving SMS with Latin encoding 2013-10-25 19:49:56 +02:00
Aleksander Morgado 57882f6dad sms: decide whether to create a 3GPP2 or 3GPP SMS based on caps
Don't rely on receiving a Teleservice ID. If none received, and the modem is
CDMA-only, default to WMT.
2013-10-25 19:49:56 +02:00
Aleksander Morgado 43694e2677 sms: unknown delivery state in newly created SMS objects 2013-10-25 19:49:56 +02:00
Aleksander Morgado 0341c1663c sms: handle CDMA SMS when creating new ones from MMSmsProperties 2013-10-25 19:49:56 +02:00
Aleksander Morgado 86795b928e libmm-glib: allow new 'teleservice-id' and 'service-category' keywords in MMSmsProperties 2013-10-25 19:49:54 +02:00
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 5267cf6f4a cli,sms: print properties just when they are available
The logic to decide whether a property is valid in a given PDU type is kind of
fuzzy for 3GPP2 as it is currently implemented; so just print whatever we have
in the interface.
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 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
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
Aleksander Morgado e529cd3212 build: ignore plugin testers 2013-10-10 08:34:52 +02:00
Aleksander Morgado 92a2953e93 docs: fixed a couple of issues regarding the new MMModem3gppSubscriptionState enum 2013-10-09 10:19:21 +02:00
Aleksander Morgado 564b3610fd TODO: remove already implemented or no longer applicable items 2013-10-08 10:15:57 +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
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
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
Aleksander Morgado 0d96662a0a sim-huawei: fix refcount
g_async_result_get_source_object() returns a full reference, which needs to get
unref-ed when no longer used.
2013-09-10 09:47:50 +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 cf78c385d6 libmm-glib: fix return type
Reported by Arman Uguray <armansito@google.com>
2013-09-09 10:20:42 +02:00
Aleksander Morgado 7751f2d6ed mmcli,oma: support for the new OMA interface 2013-09-09 10:20:40 +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
Aleksander Morgado d37b21e116 iface-modem-oma: new object interface to handle the OMA DBus interface 2013-09-09 10:18:23 +02:00
Aleksander Morgado 8ab38ae968 libmm-glib: support for the 'OMA' interface 2013-09-09 10:15:18 +02:00
Aleksander Morgado 32de7d6fef introspection,api: new 'Oma' interface 2013-09-09 10:12:55 +02:00