Commit Graph

7297 Commits

Author SHA1 Message Date
Dan Williams
d1708f243d x22x: add Archos G9 device tags 2013-04-24 17:09:04 -05:00
Aleksander Morgado
b017064a58 altair-lte: minor coding style fixes 2013-04-24 23:06:41 +02:00
ori inbar
ba83bc61d0 altair-lte: Add SIM unlock retries query to the Altair plugin. 2013-04-24 23:05:35 +02:00
Aleksander Morgado
126d89b2f3 x22x: fix regex when parsing +SYSSEL response
The numbers reported by +SYSSEL may have more than one digit, e.g.:
  +SYSSEL: 14,2,0,0

https://bugzilla.gnome.org/show_bug.cgi?id=698774
2013-04-24 22:48:18 +02:00
Ben Chan
4ac3a6d4f2 bearer: allow specifying default IP family for bearers
This patch adds a 'bearer-default-ip-family' property to MMBearer, which
specifies the default IP family to use for a bearer when no explicit
value is given via the simple connect properties. The default IP family
is set to IPv4 in MMBearer but can be overridden by a MMBearer subclass,
which allows a modem plugin to specify an appropriate default value.
2013-04-23 15:25:48 +02:00
Dan Williams
60845f10c9 broadband-modem-qmi: work around old Gobi 1K firmware SetDataFormat issue
It seems that really old Gobi 1K firmware (from ~2008) doesn't implement
the SetDataFormat command, and will simply ignore the request without
replying to it.  But the device works just fine if we retry the
QMI port open operation without the SetDataFormat request.

The downside of this is is that on older kernels, the qmi_wwan driver
won't automatically fix up any raw-ip packets it receives, but the
old Gobi devices don't ever send raw-ip packets anyway, so it's not
a problem.
2013-04-19 16:24:17 -05:00
Aleksander Morgado
aa4fd7c421 broadband-modem-mbim: don't make no-SIM errors directly fatal, retry instead
The MC7710 will report a MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED status
when initializing and the SIM is not ready yet. So retry a couple of times as we
do for MBIM_SUBSCRIBER_READY_STATE_NOT_INITIALIZED. If all retries are consumed,
get the last reported status to build the error.

This change makes all modems without SIM require up to 10s to get fully
initialized and exposed in DBus; but it shouldn't be a big deal as the modems
are unusable anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=698264
2013-04-19 09:37:20 +02:00
Dan Williams
92035fdf1c iface-modem: skip modem_after_sim_unlock() for CDMA-only devices
We don't support SIM/RUIM on CDMA devices (yet), so for now it makes
no sense to run the after-sim-unlock step on CDMA-only devices where
a SIM won't be present.

Unfortunately we don't know at this point whether there is a SIM
or not, so if the modem is a multi-mode device (implying it has a SIM
slot) and its plugin implements the modem_after_sim_unlock() hook,
the hook will still be executed and might cause an unecessary delay
when a SIM is not inserted.
2013-04-18 12:22:28 -05:00
Aleksander Morgado
7d668eb407 iface-modem: for multimode 3GPP+3GPP2 devices, check if SIM is available
If SIM is not available, no 3GPP caps in current caps.
2013-04-18 18:47:25 +02:00
Aleksander Morgado
4f3932cb2b iface-modem: ignore SIM errors in 3GPP2-capable devices
We already fully skipped SIM unlock check in 3GPP2-only devices; now we also
ignore SIM errors if the device is a 3GPP+3GPP2 device.
2013-04-18 18:47:25 +02:00
Dan Williams
27e1936277 core: rework logging code to remove log message truncation (bgo #698312)
Use a static GString which will resize itself if the log message
is bigger than the current string size, but will also ensure we
don't do a ton of memory reallocation on every log message.

Previously all log messages were trucated at 512 bytes due to the
log buffer char array being 512 bytes long.
2013-04-18 11:23:57 -05:00
Aleksander Morgado
3cb639a6bb plugin-manager: handle race condition during probing
The specific case:
 * Modem exposes cdc-wdm port, Generic plugin probes it successfully as QMI.
 * Modem exposes new ports, including the wwan one. All ttys fail probing
   because they're neither AT nor QCDM (CnS in this case).
 * The wwan port ends up without a port being suggested and is not grabbed.

The root cause of this is that we do not propagate the suggested plugin to newly
added ports when it's the Generic one. If it wasn't the Generic one, the newly
added ports would start with the suggested one for probing.

Now, handle this by looking for the device-specified plugin when the port
probing ends without a specific port given. If there is such a device-specified
plugin accept the port, and otherwise, reject it.
2013-04-18 16:46:47 +02:00
Dan Williams
4d4d614138 broadband-modem: read current capabilities via QCDM if available (bgo #698229)
Many multi-mode Qualcomm devices report all available modes in their
AT+GCAP response (for example, CDMA/EVDO and GSM/UMTS) but they cannot
actually function in all these modes at the same time.  The modem's
actual current capabilities are expressed by the QCDM NV ModePref
item, which is not reflected in the AT+GCAP response.

Reading the current capabilities from the NV ModePref item ensures
that ModemManager does not create interfaces for the modem which
the modem cannot actually implement.

Because the generic modem plugin does not implement the Modem
Capabilities hook (because there is no standard way to determine
what access technologies a modem supports), the Current Capabilities
are copied to the Modem Capabilities.  For devices that support
QCDM this means that Modem Capabilies which used to be created from
the GCAP response and thus would contain all available capabilities
now contain only current capabilities.  This isn't a problem though
since there was no way to switch the devices to use any of their
other capabilities, becuase there aren't any standard commands for
it.  Plugins that know how to switch their modem's capabilities
should (and they already do) override load_current_capabilities
and load_modem_capabilities to get the correct information.
2013-04-18 09:34:21 -05:00
Aleksander Morgado
95274bfa23 sms-part: check UDH length vs available size before trying to read it
https://bugzilla.gnome.org/show_bug.cgi?id=698246
2013-04-18 14:43:37 +02:00
Dan Williams
9fa5b9001a qcdm: fix CDMA1x Pilot Sets pilot handling
The helper functions got the return code of qcdm_result_* wrong
and thus failed all requests for pilot sets.
2013-04-17 17:21:28 -05:00
Aleksander Morgado
b95dc3f2f5 mbm: allow MBIM devices 2013-04-17 19:15:24 +02:00
Aleksander Morgado
0e60d964b3 build: MBIM support is auto
Use it if found, don't use it if not found.

Can be explicitly requested with --with-mbim.
2013-04-17 15:34:23 +02:00
Aleksander Morgado
f8e7f2ebe1 device: look for vendor/product ID on the grandparent for MBIM devices 2013-04-17 15:23:24 +02:00
Aleksander Morgado
56387bb79c sierra: allow MBIM modems handled by the plugin 2013-04-17 15:19:50 +02:00
Aleksander Morgado
99694dec93 bearer-mbim: handle static IP configuration 2013-04-17 15:19:50 +02:00
Aleksander Morgado
91e4c9832a bearer-mbim: update connection timeout values 2013-04-17 15:19:50 +02:00
Aleksander Morgado
07d4aa9938 bearer-mbim: activate packet service during connection request 2013-04-17 15:19:50 +02:00
Aleksander Morgado
6cbb3e9fc9 bearer-mbim: no auth protocol if neither user nor password given 2013-04-17 15:19:50 +02:00
Aleksander Morgado
a9f20e90be bearer-mbim: implement bearer disconnection 2013-04-17 15:19:50 +02:00
Aleksander Morgado
032911ec20 bearer-mbim: gather a unique session id in the [0,255] range 2013-04-17 15:19:41 +02:00
Aleksander Morgado
4609f708b8 bearer-mbim: implement bearer connection 2013-04-17 15:19:41 +02:00
Aleksander Morgado
3c4a26cb91 bearer-mbim: log available provisioned contexts during connection 2013-04-17 15:19:41 +02:00
Aleksander Morgado
0e9a0eb4c7 broadband-modem-mbim: implement access technologies updates 2013-04-17 15:19:41 +02:00
Aleksander Morgado
6b5dd6af51 broadband-modem-mbim: add TODO about the network scan 2013-04-17 15:19:41 +02:00
Aleksander Morgado
854c371c8a broadband-modem-mbim: implement 3GPP registration request 2013-04-17 15:19:41 +02:00
Aleksander Morgado
c7f3d33b3e api,errors: define new GPRS related errors 2013-04-17 15:19:41 +02:00
Aleksander Morgado
9cdd8c901d broadband-modem-mbim: implement 3GPP registration logic 2013-04-17 15:19:41 +02:00
Aleksander Morgado
6333b239ff sim-mbim: add TODO about the home provider info 2013-04-17 15:19:41 +02:00
Aleksander Morgado
916dc3466f broadband-modem-mbim: implement signal quality updates 2013-04-17 15:19:40 +02:00
Aleksander Morgado
10f2cdebcb broadband-modem-mbim: process signal state indications 2013-04-17 15:19:40 +02:00
Aleksander Morgado
6b827cc7a3 broadband-modem-mbim: implement 3GPP unsolicited messages setup/cleanup 2013-04-17 15:19:40 +02:00
Aleksander Morgado
3e758d5394 broadband-modem-mbim: implement enabled facility locks loading 2013-04-17 15:19:40 +02:00
Aleksander Morgado
115bf6c077 broadband-modem-mbim: implement IMEI loading 2013-04-17 15:19:40 +02:00
Aleksander Morgado
e878a8ef06 broadband-modem-mbim: implement the 3GPP interface 2013-04-17 15:19:40 +02:00
Aleksander Morgado
bb9031ed38 broadband-modem-mbim: build fake manufacturer and model strings 2013-04-17 15:19:40 +02:00
Aleksander Morgado
45ae6dd672 broadband-modem-mbim: implement power up/down 2013-04-17 15:19:40 +02:00
Aleksander Morgado
9504cb9339 broadband-modem-mbim: simplify power state loading 2013-04-17 15:19:40 +02:00
Aleksander Morgado
f6958bb362 broadband-modem-mbim,sim-mbim: update message creator/parser names
Sync with libmbim commit:
    commit b73673bf30a82e95819deb17296c9234399f0795
    Author: Aleksander Morgado <aleksander@lanedo.com>
    Date:   Thu Apr 11 20:07:12 2013 +0200

        mbim-codegen: properly define the 4 types of messages that we may have
2013-04-17 15:19:40 +02:00
Aleksander Morgado
67c322361e broadband-modem-mbim: implement own numbers loading 2013-04-17 15:19:40 +02:00
Aleksander Morgado
04d515497d sim-mbim: implement SIM identifier and IMSI loading 2013-04-17 15:19:40 +02:00
Aleksander Morgado
6024142fac sim-mbim: these modems don't allow to enable/disable/change PIN if locked 2013-04-17 15:19:40 +02:00
Aleksander Morgado
cd610fb620 sim-mbim: implement PIN changing 2013-04-17 15:19:39 +02:00
Aleksander Morgado
ef7e6a14f0 broadband-modem-mbim: check SIM status with 'Subscriber Ready Status' 2013-04-17 15:19:39 +02:00
Aleksander Morgado
659d942c33 mbim-port: make port closing async always
Don't just close the port and forget, really wait to get the CLOSE response
before going on.
2013-04-17 15:19:39 +02:00
Aleksander Morgado
d1d5616ca5 sim-mbim: implement PIN enabling/disabling 2013-04-17 15:19:39 +02:00